diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-07-14 00:05:07 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-07-14 08:03:40 +0000 |
commit | 8060ca52041b780ecc5d38f3b8704f6c2417a4df (patch) | |
tree | f32da087b1606b28c7a9dbdadad44383fdd91272 /plugins/fossil | |
parent | d44056f9d861b0f3794a1b593c89c92f3b8bbffb (diff) |
Adapt to upstream changes
Change-Id: I0ec67b57432ac03b3cf3f93802686effdfce78c7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'plugins/fossil')
-rw-r--r-- | plugins/fossil/fossilclient.cpp | 32 | ||||
-rw-r--r-- | plugins/fossil/fossilplugin.cpp | 6 |
2 files changed, 17 insertions, 21 deletions
diff --git a/plugins/fossil/fossilclient.cpp b/plugins/fossil/fossilclient.cpp index 5885e0f..ab01a8e 100644 --- a/plugins/fossil/fossilclient.cpp +++ b/plugins/fossil/fossilclient.cpp @@ -31,7 +31,6 @@ #include <vcsbase/vcsbaseeditor.h> #include <vcsbase/vcsbaseeditorconfig.h> #include <vcsbase/vcsoutputwindow.h> -#include <vcsbase/vcscommand.h> #include <utils/algorithm.h> #include <utils/fileutils.h> @@ -39,6 +38,7 @@ #include <utils/processenums.h> #include <utils/qtcassert.h> #include <utils/qtcprocess.h> +#include <utils/shellcommand.h> #include <utils/utilsicons.h> #include <QSyntaxHighlighter> @@ -56,6 +56,12 @@ using namespace Utils; namespace Fossil { namespace Internal { +// Disable UNIX terminals to suppress SSH prompting +const unsigned s_pullFlags = ShellCommand::SshPasswordPrompt + | ShellCommand::ShowStdOut + | ShellCommand::ShowSuccessMessage; + + // Parameter widget controlling whitespace diff mode, associated with a parameter class FossilDiffConfig : public VcsBase::VcsBaseEditorConfig { @@ -739,13 +745,8 @@ bool FossilClient::synchronousPull(const FilePath &workingDir, const QString &sr } args << extraOptions; - // Disable UNIX terminals to suppress SSH prompting - const unsigned flags = - VcsBase::VcsCommand::SshPasswordPrompt - | VcsBase::VcsCommand::ShowStdOut - | VcsBase::VcsCommand::ShowSuccessMessage; QtcProcess proc; - vcsSynchronousExec(proc, workingDir, args, flags); + vcsSynchronousExec(proc, workingDir, args, s_pullFlags); const bool success = (proc.result() == ProcessResult::FinishedWithSuccess); if (success) emit changed(workingDir.toVariant()); @@ -764,13 +765,8 @@ bool FossilClient::synchronousPush(const FilePath &workingDir, const QString &ds } args << extraOptions; - // Disable UNIX terminals to suppress SSH prompting - const unsigned flags = - VcsBase::VcsCommand::SshPasswordPrompt - | VcsBase::VcsCommand::ShowStdOut - | VcsBase::VcsCommand::ShowSuccessMessage; QtcProcess proc; - vcsSynchronousExec(proc, workingDir, args, flags); + vcsSynchronousExec(proc, workingDir, args, s_pullFlags); return (proc.result() == ProcessResult::FinishedWithSuccess); } @@ -817,7 +813,7 @@ VcsBase::VcsBaseEditorWidget *FossilClient::annotate(const FilePath &workingDir, if (VcsBase::VcsBaseEditorConfig *editorConfig = fossilEditor->editorConfig()) effectiveArgs = editorConfig->arguments(); - VcsBase::VcsCommand *cmd = createCommand(workingDir, fossilEditor); + ShellCommand *cmd = createCommand(workingDir, fossilEditor); // here we introduce a "|BLAME|" meta-option to allow both annotate and blame modes int pos = effectiveArgs.indexOf("|BLAME|"); @@ -1109,9 +1105,9 @@ void FossilClient::revertFile(const FilePath &workingDir, args << extraOptions << file; // Indicate file list - VcsBase::VcsCommand *cmd = createCommand(workingDir); + ShellCommand *cmd = createCommand(workingDir); cmd->setCookie(QStringList(workingDir.toString() + "/" + file)); - connect(cmd, &VcsBase::VcsCommand::success, this, &VcsBase::VcsBaseClient::changed, Qt::QueuedConnection); + connect(cmd, &ShellCommand::success, this, &VcsBase::VcsBaseClient::changed, Qt::QueuedConnection); enqueueJob(cmd, args); } @@ -1135,9 +1131,9 @@ void FossilClient::revertAll(const FilePath &workingDir, const QString &revision } // Indicate repository change - VcsBase::VcsCommand *cmd = createCommand(workingDir); + ShellCommand *cmd = createCommand(workingDir); cmd->setCookie(QStringList(workingDir.toString())); - connect(cmd, &VcsBase::VcsCommand::success, this, &VcsBase::VcsBaseClient::changed, Qt::QueuedConnection); + connect(cmd, &ShellCommand::success, this, &VcsBase::VcsBaseClient::changed, Qt::QueuedConnection); enqueueJob(createCommand(workingDir), args); } diff --git a/plugins/fossil/fossilplugin.cpp b/plugins/fossil/fossilplugin.cpp index 17a2658..63c51a2 100644 --- a/plugins/fossil/fossilplugin.cpp +++ b/plugins/fossil/fossilplugin.cpp @@ -60,10 +60,10 @@ #include <vcsbase/basevcseditorfactory.h> #include <vcsbase/basevcssubmiteditorfactory.h> -#include <vcsbase/vcsbasesubmiteditor.h> +#include <vcsbase/vcsbaseclient.h> #include <vcsbase/vcsbaseconstants.h> #include <vcsbase/vcsbaseeditor.h> -#include <vcsbase/vcscommand.h> +#include <vcsbase/vcsbasesubmiteditor.h> #include <vcsbase/vcsoutputwindow.h> #include <QtPlugin> @@ -1043,7 +1043,7 @@ Utils::ShellCommand *FossilPluginPrivate::createInitialCheckoutCommand(const QSt checkoutPath.createDir(); // Setup the wizard page command job - auto command = new VcsBase::VcsCommand(checkoutPath, m_client.processEnvironment()); + auto command = VcsBaseClient::createVcsCommand(checkoutPath, m_client.processEnvironment()); if (!isLocalRepository && !cloneRepository.exists()) { |