Adapt to upstream changes

Change-Id: I521016449a1e779647a25b3e6a1d98f7990f6a10
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-09-02 15:53:53 +02:00
parent ec32aa0427
commit 3e322ba3a6

View File

@@ -267,7 +267,7 @@ unsigned int FossilClient::synchronousBinaryVersion() const
QStringList args("version"); QStringList args("version");
const CommandResult result = vcsFullySynchronousExec(FilePath(), args); const CommandResult result = vcsSynchronousExec(FilePath(), args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return 0; return 0;
@@ -304,7 +304,7 @@ BranchInfo FossilClient::synchronousCurrentBranch(const FilePath &workingDirecto
return BranchInfo(); return BranchInfo();
// First try to get the current branch from the list of open branches // First try to get the current branch from the list of open branches
const CommandResult result = vcsFullySynchronousExec(workingDirectory, {"branch", "list"}); const CommandResult result = vcsSynchronousExec(workingDirectory, {"branch", "list"});
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return BranchInfo(); return BranchInfo();
@@ -315,7 +315,7 @@ BranchInfo FossilClient::synchronousCurrentBranch(const FilePath &workingDirecto
if (!currentBranch.isCurrent()) { if (!currentBranch.isCurrent()) {
// If not available from open branches, request it from the list of closed branches. // If not available from open branches, request it from the list of closed branches.
const CommandResult result = vcsFullySynchronousExec(workingDirectory, {"branch", "list", "--closed"}); const CommandResult result = vcsSynchronousExec(workingDirectory, {"branch", "list", "--closed"});
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return BranchInfo(); return BranchInfo();
@@ -337,7 +337,7 @@ QList<BranchInfo> FossilClient::synchronousBranchQuery(const FilePath &workingDi
return QList<BranchInfo>(); return QList<BranchInfo>();
// First get list of open branches // First get list of open branches
CommandResult result = vcsFullySynchronousExec(workingDirectory, {"branch", "list"}); CommandResult result = vcsSynchronousExec(workingDirectory, {"branch", "list"});
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return QList<BranchInfo>(); return QList<BranchInfo>();
@@ -345,7 +345,7 @@ QList<BranchInfo> FossilClient::synchronousBranchQuery(const FilePath &workingDi
QList<BranchInfo> branches = branchListFromOutput(output); QList<BranchInfo> branches = branchListFromOutput(output);
// Append a list of closed branches. // Append a list of closed branches.
result = vcsFullySynchronousExec(workingDirectory, {"branch", "list", "--closed"}); result = vcsSynchronousExec(workingDirectory, {"branch", "list", "--closed"});
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return QList<BranchInfo>(); return QList<BranchInfo>();
@@ -385,7 +385,7 @@ RevisionInfo FossilClient::synchronousRevisionQuery(const FilePath &workingDirec
if (!id.isEmpty()) if (!id.isEmpty())
args << id; args << id;
const CommandResult result = vcsFullySynchronousExec(workingDirectory, args, const CommandResult result = vcsSynchronousExec(workingDirectory, args,
VcsCommand::SuppressCommandLogging); VcsCommand::SuppressCommandLogging);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return RevisionInfo(); return RevisionInfo();
@@ -449,7 +449,7 @@ QStringList FossilClient::synchronousTagQuery(const FilePath &workingDirectory,
if (!id.isEmpty()) if (!id.isEmpty())
args << id; args << id;
const CommandResult result = vcsFullySynchronousExec(workingDirectory, args); const CommandResult result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return QStringList(); return QStringList();
@@ -471,7 +471,7 @@ RepositorySettings FossilClient::synchronousSettingsQuery(const FilePath &workin
const QStringList args("settings"); const QStringList args("settings");
const CommandResult result = vcsFullySynchronousExec(workingDirectory, args); const CommandResult result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return RepositorySettings(); return RepositorySettings();
@@ -525,7 +525,7 @@ bool FossilClient::synchronousSetSetting(const FilePath &workingDirectory,
if (isGlobal) if (isGlobal)
args << "--global"; args << "--global";
return vcsFullySynchronousExec(workingDirectory, args).result() return vcsSynchronousExec(workingDirectory, args).result()
== ProcessResult::FinishedWithSuccess; == ProcessResult::FinishedWithSuccess;
} }
@@ -581,7 +581,7 @@ QString FossilClient::synchronousUserDefaultQuery(const FilePath &workingDirecto
const QStringList args({"user", "default"}); const QStringList args({"user", "default"});
const CommandResult result = vcsFullySynchronousExec(workingDirectory, args); const CommandResult result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return QString(); return QString();
@@ -597,7 +597,7 @@ bool FossilClient::synchronousSetUserDefault(const FilePath &workingDirectory, c
// set repository-default user // set repository-default user
const QStringList args({"user", "default", userName, "--user", userName}); const QStringList args({"user", "default", userName, "--user", userName});
return vcsFullySynchronousExec(workingDirectory, args).result() return vcsSynchronousExec(workingDirectory, args).result()
== ProcessResult::FinishedWithSuccess; == ProcessResult::FinishedWithSuccess;
} }
@@ -608,7 +608,7 @@ QString FossilClient::synchronousGetRepositoryURL(const FilePath &workingDirecto
const QStringList args("remote-url"); const QStringList args("remote-url");
const CommandResult result = vcsFullySynchronousExec(workingDirectory, args); const CommandResult result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return QString(); return QString();
@@ -660,7 +660,7 @@ bool FossilClient::synchronousCreateRepository(const FilePath &workingDirectory,
if (!adminUser.isEmpty()) if (!adminUser.isEmpty())
args << "--admin-user" << adminUser; args << "--admin-user" << adminUser;
args << extraOptions << repoFilePath.toUserOutput(); args << extraOptions << repoFilePath.toUserOutput();
CommandResult result = vcsFullySynchronousExec(workingDirectory, args); CommandResult result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return false; return false;
@@ -673,7 +673,7 @@ bool FossilClient::synchronousCreateRepository(const FilePath &workingDirectory,
output.clear(); output.clear();
args << "open" << repoFilePath.toUserOutput(); args << "open" << repoFilePath.toUserOutput();
result = vcsFullySynchronousExec(workingDirectory, args); result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return false; return false;
@@ -687,7 +687,7 @@ bool FossilClient::synchronousCreateRepository(const FilePath &workingDirectory,
output.clear(); output.clear();
args << "user" << "default" << adminUser << "--user" << adminUser; args << "user" << "default" << adminUser << "--user" << adminUser;
result = vcsFullySynchronousExec(workingDirectory, args); result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return false; return false;
@@ -713,7 +713,7 @@ bool FossilClient::synchronousMove(const FilePath &workingDir,
QStringList args(vcsCommandString(MoveCommand)); QStringList args(vcsCommandString(MoveCommand));
args << extraOptions << from << to; args << extraOptions << from << to;
return vcsFullySynchronousExec(workingDir, args).result() == ProcessResult::FinishedWithSuccess; return vcsSynchronousExec(workingDir, args).result() == ProcessResult::FinishedWithSuccess;
} }
bool FossilClient::synchronousPull(const FilePath &workingDir, const QString &srcLocation, const QStringList &extraOptions) bool FossilClient::synchronousPull(const FilePath &workingDir, const QString &srcLocation, const QStringList &extraOptions)
@@ -834,7 +834,7 @@ FilePath FossilClient::findTopLevelForFile(const FilePath &file) const
bool FossilClient::managesFile(const FilePath &workingDirectory, const QString &fileName) const bool FossilClient::managesFile(const FilePath &workingDirectory, const QString &fileName) const
{ {
const QStringList args({"finfo", fileName}); const QStringList args({"finfo", fileName});
const CommandResult result = vcsFullySynchronousExec(workingDirectory, args); const CommandResult result = vcsSynchronousExec(workingDirectory, args);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return false; return false;
QString output = sanitizeFossilOutput(result.cleanedStdOut()); QString output = sanitizeFossilOutput(result.cleanedStdOut());