forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.2'
Conflicts: qtcreator.pri qtcreator.qbs src/plugins/coreplugin/editormanager/editormanager.cpp src/plugins/projectexplorer/editorconfiguration.cpp src/plugins/projectexplorer/projectfilewizardextension.cpp src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp Change-Id: I8de0f6fcdd8d214fbc14e79f74cb0206e6e2c6c1
This commit is contained in:
@@ -124,13 +124,19 @@ public:
|
||||
|
||||
private slots:
|
||||
void slotShowDescriptionReceived(const QString &data);
|
||||
void slotDiffOutputReceived(const QString &contents);
|
||||
void slotTextualDiffOutputReceived(const QString &contents);
|
||||
|
||||
private:
|
||||
void postCollectShowDescription(const QString &id);
|
||||
void postCollectDiffOutput(const QStringList &arguments);
|
||||
void postCollectDiffOutput(const QList<QStringList> &argumentsList);
|
||||
void addJob(VcsBase::Command *command, const QStringList &arguments);
|
||||
void postCollectTextualDiffOutputUsingDiffCommand(const QStringList &arguments);
|
||||
void postCollectTextualDiffOutputUsingDiffCommand(const QList<QStringList> &argumentsList);
|
||||
void postCollectTextualDiffOutputUsingShowCommand(const QStringList &arguments);
|
||||
void postCollectTextualDiffOutput(const QString &gitCommand,
|
||||
const QList<QStringList> &argumentsList);
|
||||
void addJob(VcsBase::Command *command,
|
||||
const QString &gitCommand,
|
||||
const QStringList &arguments);
|
||||
QStringList addHeadWhenCommandInProgress() const;
|
||||
int timeout() const;
|
||||
QProcessEnvironment processEnvironment() const;
|
||||
Utils::FileName gitPath() const;
|
||||
@@ -154,7 +160,9 @@ GitDiffHandler::GitDiffHandler(DiffEditor::DiffEditorController *controller,
|
||||
|
||||
void GitDiffHandler::diffFile(const QString &fileName)
|
||||
{
|
||||
postCollectDiffOutput(QStringList() << QLatin1String("--") << fileName);
|
||||
postCollectTextualDiffOutputUsingDiffCommand(addHeadWhenCommandInProgress()
|
||||
<< QLatin1String("--")
|
||||
<< fileName);
|
||||
}
|
||||
|
||||
void GitDiffHandler::diffFiles(const QStringList &stagedFileNames,
|
||||
@@ -169,28 +177,31 @@ void GitDiffHandler::diffFiles(const QStringList &stagedFileNames,
|
||||
arguments << stagedArguments;
|
||||
|
||||
if (!unstagedFileNames.isEmpty()) {
|
||||
QStringList unstagedArguments;
|
||||
QStringList unstagedArguments = addHeadWhenCommandInProgress();
|
||||
unstagedArguments << QLatin1String("--");
|
||||
unstagedArguments << unstagedFileNames;
|
||||
arguments << unstagedArguments;
|
||||
}
|
||||
|
||||
postCollectDiffOutput(arguments);
|
||||
postCollectTextualDiffOutputUsingDiffCommand(arguments);
|
||||
}
|
||||
|
||||
void GitDiffHandler::diffProjects(const QStringList &projectPaths)
|
||||
{
|
||||
postCollectDiffOutput(QStringList() << QLatin1String("--") << projectPaths);
|
||||
postCollectTextualDiffOutputUsingDiffCommand(addHeadWhenCommandInProgress()
|
||||
<< QLatin1String("--")
|
||||
<< projectPaths);
|
||||
}
|
||||
|
||||
void GitDiffHandler::diffRepository()
|
||||
{
|
||||
postCollectDiffOutput(QStringList());
|
||||
postCollectTextualDiffOutputUsingDiffCommand(addHeadWhenCommandInProgress());
|
||||
}
|
||||
|
||||
void GitDiffHandler::diffBranch(const QString &branchName)
|
||||
{
|
||||
postCollectDiffOutput(QStringList() << branchName);
|
||||
postCollectTextualDiffOutputUsingDiffCommand(addHeadWhenCommandInProgress()
|
||||
<< branchName);
|
||||
}
|
||||
|
||||
void GitDiffHandler::show(const QString &id)
|
||||
@@ -206,6 +217,7 @@ void GitDiffHandler::postCollectShowDescription(const QString &id)
|
||||
return;
|
||||
}
|
||||
|
||||
m_controller->requestSaveState();
|
||||
m_controller->clear(m_waitMessage);
|
||||
VcsBase::Command *command = new VcsBase::Command(gitPath(),
|
||||
m_workingDirectory,
|
||||
@@ -231,7 +243,11 @@ void GitDiffHandler::slotShowDescriptionReceived(const QString &description)
|
||||
return;
|
||||
}
|
||||
|
||||
postCollectDiffOutput(QStringList() << m_id + QLatin1Char('^') << m_id);
|
||||
postCollectTextualDiffOutputUsingShowCommand(QStringList()
|
||||
<< QLatin1String("--format=format:") // omit header, already generated
|
||||
<< QLatin1String(noColorOption)
|
||||
<< QLatin1String(decorateOption)
|
||||
<< m_id);
|
||||
|
||||
// need to be called after postCollectDiffOutput(), since it clears the description
|
||||
m_controller->setDescription(
|
||||
@@ -239,10 +255,14 @@ void GitDiffHandler::slotShowDescriptionReceived(const QString &description)
|
||||
description));
|
||||
}
|
||||
|
||||
void GitDiffHandler::addJob(VcsBase::Command *command, const QStringList &arguments)
|
||||
void GitDiffHandler::addJob(VcsBase::Command *command,
|
||||
const QString &gitCommand,
|
||||
const QStringList &arguments)
|
||||
{
|
||||
QStringList args;
|
||||
args << QLatin1String("diff");
|
||||
args << gitCommand;
|
||||
args << QLatin1String("-m"); // show diff agains parents instead of merge commits
|
||||
args << QLatin1String("--first-parent"); // show only first parent
|
||||
if (m_controller->isIgnoreWhitespace())
|
||||
args << QLatin1String("--ignore-space-change");
|
||||
args << QLatin1String("--unified=") + QString::number(
|
||||
@@ -251,34 +271,57 @@ void GitDiffHandler::addJob(VcsBase::Command *command, const QStringList &argume
|
||||
command->addJob(args, timeout());
|
||||
}
|
||||
|
||||
void GitDiffHandler::postCollectDiffOutput(const QStringList &arguments)
|
||||
QStringList GitDiffHandler::addHeadWhenCommandInProgress() const
|
||||
{
|
||||
postCollectDiffOutput(QList<QStringList>() << arguments);
|
||||
QStringList args;
|
||||
// This is workaround for lack of support for merge commits and resolving conflicts,
|
||||
// we compare the current state of working tree to the HEAD of current branch
|
||||
// instead of showing unsupported combined diff format.
|
||||
GitClient::CommandInProgress commandInProgress = m_gitClient->checkCommandInProgress(m_workingDirectory);
|
||||
if (commandInProgress != GitClient::NoCommand)
|
||||
args << QLatin1String(HEAD);
|
||||
return args;
|
||||
}
|
||||
|
||||
void GitDiffHandler::postCollectDiffOutput(const QList<QStringList> &argumentsList)
|
||||
void GitDiffHandler::postCollectTextualDiffOutputUsingDiffCommand(const QStringList &arguments)
|
||||
{
|
||||
postCollectTextualDiffOutputUsingDiffCommand(QList<QStringList>() << arguments);
|
||||
}
|
||||
|
||||
void GitDiffHandler::postCollectTextualDiffOutputUsingDiffCommand(const QList<QStringList> &argumentsList)
|
||||
{
|
||||
postCollectTextualDiffOutput(QLatin1String("diff"), argumentsList);
|
||||
}
|
||||
|
||||
void GitDiffHandler::postCollectTextualDiffOutputUsingShowCommand(const QStringList &arguments)
|
||||
{
|
||||
postCollectTextualDiffOutput(QLatin1String("show"), QList<QStringList>() << arguments);
|
||||
}
|
||||
|
||||
void GitDiffHandler::postCollectTextualDiffOutput(const QString &gitCommand, const QList<QStringList> &argumentsList)
|
||||
{
|
||||
if (m_controller.isNull()) {
|
||||
deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
m_controller->requestSaveState();
|
||||
m_controller->clear(m_waitMessage);
|
||||
VcsBase::Command *command = new VcsBase::Command(gitPath(),
|
||||
m_workingDirectory,
|
||||
processEnvironment());
|
||||
command->setCodec(EditorManager::defaultTextCodec());
|
||||
connect(command, SIGNAL(output(QString)),
|
||||
this, SLOT(slotDiffOutputReceived(QString)));
|
||||
this, SLOT(slotTextualDiffOutputReceived(QString)));
|
||||
command->addFlags(diffExecutionFlags());
|
||||
|
||||
for (int i = 0; i < argumentsList.count(); i++)
|
||||
addJob(command, argumentsList.at(i));
|
||||
addJob(command, gitCommand, argumentsList.at(i));
|
||||
|
||||
command->execute();
|
||||
}
|
||||
|
||||
void GitDiffHandler::slotDiffOutputReceived(const QString &contents)
|
||||
void GitDiffHandler::slotTextualDiffOutputReceived(const QString &contents)
|
||||
{
|
||||
if (m_controller.isNull()) {
|
||||
deleteLater();
|
||||
@@ -290,6 +333,7 @@ void GitDiffHandler::slotDiffOutputReceived(const QString &contents)
|
||||
= DiffEditor::DiffUtils::readPatch(
|
||||
contents, m_controller->isIgnoreWhitespace(), &ok);
|
||||
m_controller->setDiffFiles(fileDataList, m_workingDirectory);
|
||||
m_controller->requestRestoreState();
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
@@ -713,7 +757,7 @@ GitClient::~GitClient()
|
||||
{
|
||||
}
|
||||
|
||||
QString GitClient::findRepositoryForDirectory(const QString &dir)
|
||||
QString GitClient::findRepositoryForDirectory(const QString &dir) const
|
||||
{
|
||||
if (dir.isEmpty() || dir.endsWith(QLatin1String("/.git"))
|
||||
|| dir.contains(QLatin1String("/.git/"))) {
|
||||
@@ -937,7 +981,7 @@ VcsBase::VcsBaseEditorWidget *GitClient::createVcsEditor(
|
||||
|
||||
void GitClient::diff(const QString &workingDirectory,
|
||||
const QStringList &unstagedFileNames,
|
||||
const QStringList &stagedFileNames)
|
||||
const QStringList &stagedFileNames) const
|
||||
{
|
||||
GitDiffEditorReloader::DiffType diffType = GitDiffEditorReloader::DiffProjectList;
|
||||
|
||||
@@ -968,19 +1012,24 @@ void GitClient::diff(const QString &workingDirectory,
|
||||
controller->setReloader(reloader);
|
||||
|
||||
reloader->setWorkingDirectory(workingDirectory);
|
||||
reloader->setDiffType(diffType);
|
||||
if (diffType == GitDiffEditorReloader::DiffFileList)
|
||||
reloader->setFileList(stagedFileNames, unstagedFileNames);
|
||||
else if (diffType == GitDiffEditorReloader::DiffProjectList)
|
||||
reloader->setProjectList(unstagedFileNames);
|
||||
}
|
||||
|
||||
DiffEditor::DiffEditorController *controller = diffEditorDocument->controller();
|
||||
GitDiffEditorReloader *reloader = static_cast<GitDiffEditorReloader *>(controller->reloader());
|
||||
reloader->setDiffType(diffType);
|
||||
// we force setFileList, since the lists can be different
|
||||
// e.g. when double click for the second time on different file inside commit editor
|
||||
if (diffType == GitDiffEditorReloader::DiffFileList)
|
||||
reloader->setFileList(stagedFileNames, unstagedFileNames);
|
||||
else if (diffType == GitDiffEditorReloader::DiffProjectList) // the same when unstaged file was clicked
|
||||
reloader->setProjectList(unstagedFileNames);
|
||||
|
||||
diffEditorDocument->controller()->requestReload();
|
||||
|
||||
EditorManager::activateEditorForDocument(diffEditorDocument);
|
||||
}
|
||||
|
||||
void GitClient::diff(const QString &workingDirectory, const QString &fileName)
|
||||
void GitClient::diff(const QString &workingDirectory, const QString &fileName) const
|
||||
{
|
||||
const QString title = tr("Git Diff \"%1\"").arg(fileName);
|
||||
const QString sourceFile = VcsBase::VcsBaseEditorWidget::getSource(
|
||||
@@ -1006,7 +1055,7 @@ void GitClient::diff(const QString &workingDirectory, const QString &fileName)
|
||||
}
|
||||
|
||||
void GitClient::diffBranch(const QString &workingDirectory,
|
||||
const QString &branchName)
|
||||
const QString &branchName) const
|
||||
{
|
||||
const QString title = tr("Git Diff Branch \"%1\"").arg(branchName);
|
||||
const QString documentId = QLatin1String("Branch:") + branchName;
|
||||
@@ -1521,7 +1570,7 @@ static inline bool splitCommitParents(const QString &line,
|
||||
}
|
||||
|
||||
bool GitClient::synchronousRevListCmd(const QString &workingDirectory, const QStringList &arguments,
|
||||
QString *output, QString *errorMessage)
|
||||
QString *output, QString *errorMessage) const
|
||||
{
|
||||
QByteArray outputTextData;
|
||||
QByteArray errorText;
|
||||
@@ -1545,7 +1594,7 @@ bool GitClient::synchronousParentRevisions(const QString &workingDirectory,
|
||||
const QStringList &files /* = QStringList() */,
|
||||
const QString &revision,
|
||||
QStringList *parents,
|
||||
QString *errorMessage)
|
||||
QString *errorMessage) const
|
||||
{
|
||||
QString outputText;
|
||||
QString errorText;
|
||||
@@ -1578,7 +1627,7 @@ bool GitClient::synchronousParentRevisions(const QString &workingDirectory,
|
||||
static const char defaultShortLogFormatC[] = "%h (%an \"%s";
|
||||
static const int maxShortLogLength = 120;
|
||||
|
||||
QString GitClient::synchronousShortDescription(const QString &workingDirectory, const QString &revision)
|
||||
QString GitClient::synchronousShortDescription(const QString &workingDirectory, const QString &revision) const
|
||||
{
|
||||
// Short SHA 1, author, subject
|
||||
QString output = synchronousShortDescription(workingDirectory, revision,
|
||||
@@ -1593,7 +1642,7 @@ QString GitClient::synchronousShortDescription(const QString &workingDirectory,
|
||||
return output;
|
||||
}
|
||||
|
||||
QString GitClient::synchronousCurrentLocalBranch(const QString &workingDirectory)
|
||||
QString GitClient::synchronousCurrentLocalBranch(const QString &workingDirectory) const
|
||||
{
|
||||
QByteArray outputTextData;
|
||||
QStringList arguments;
|
||||
@@ -1611,7 +1660,7 @@ QString GitClient::synchronousCurrentLocalBranch(const QString &workingDirectory
|
||||
}
|
||||
|
||||
bool GitClient::synchronousHeadRefs(const QString &workingDirectory, QStringList *output,
|
||||
QString *errorMessage)
|
||||
QString *errorMessage) const
|
||||
{
|
||||
QStringList args;
|
||||
args << QLatin1String("show-ref") << QLatin1String("--head")
|
||||
@@ -1643,7 +1692,7 @@ bool GitClient::synchronousHeadRefs(const QString &workingDirectory, QStringList
|
||||
}
|
||||
|
||||
// Retrieve topic (branch, tag or HEAD hash)
|
||||
QString GitClient::synchronousTopic(const QString &workingDirectory)
|
||||
QString GitClient::synchronousTopic(const QString &workingDirectory) const
|
||||
{
|
||||
// First try to find branch
|
||||
QString branch = synchronousCurrentLocalBranch(workingDirectory);
|
||||
@@ -1711,7 +1760,7 @@ QString GitClient::synchronousTopRevision(const QString &workingDirectory, QStri
|
||||
}
|
||||
|
||||
void GitClient::synchronousTagsForCommit(const QString &workingDirectory, const QString &revision,
|
||||
QString &precedes, QString &follows)
|
||||
QString &precedes, QString &follows) const
|
||||
{
|
||||
QByteArray pr;
|
||||
QStringList arguments;
|
||||
@@ -1789,7 +1838,7 @@ bool GitClient::isFastForwardMerge(const QString &workingDirectory, const QStrin
|
||||
|
||||
// Format an entry in a one-liner for selection list using git log.
|
||||
QString GitClient::synchronousShortDescription(const QString &workingDirectory, const QString &revision,
|
||||
const QString &format)
|
||||
const QString &format) const
|
||||
{
|
||||
QString description;
|
||||
QByteArray outputTextData;
|
||||
@@ -1831,7 +1880,7 @@ static inline QString creatorStashMessage(const QString &keyword = QString())
|
||||
* StashIgnoreUnchanged: Be quiet about unchanged repositories (used for IVersionControl's snapshots). */
|
||||
|
||||
QString GitClient::synchronousStash(const QString &workingDirectory, const QString &messageKeyword,
|
||||
unsigned flags, bool *unchanged)
|
||||
unsigned flags, bool *unchanged) const
|
||||
{
|
||||
if (unchanged)
|
||||
*unchanged = false;
|
||||
@@ -1874,7 +1923,7 @@ QString GitClient::synchronousStash(const QString &workingDirectory, const QStri
|
||||
|
||||
bool GitClient::executeSynchronousStash(const QString &workingDirectory,
|
||||
const QString &message,
|
||||
QString *errorMessage)
|
||||
QString *errorMessage) const
|
||||
{
|
||||
QByteArray outputText;
|
||||
QByteArray errorText;
|
||||
@@ -1893,7 +1942,7 @@ bool GitClient::executeSynchronousStash(const QString &workingDirectory,
|
||||
// Resolve a stash name from message
|
||||
bool GitClient::stashNameFromMessage(const QString &workingDirectory,
|
||||
const QString &message, QString *name,
|
||||
QString *errorMessage)
|
||||
QString *errorMessage) const
|
||||
{
|
||||
// All happy
|
||||
if (message.startsWith(QLatin1String(stashNamePrefix))) {
|
||||
@@ -1917,7 +1966,7 @@ bool GitClient::stashNameFromMessage(const QString &workingDirectory,
|
||||
}
|
||||
|
||||
bool GitClient::synchronousBranchCmd(const QString &workingDirectory, QStringList branchArgs,
|
||||
QString *output, QString *errorMessage)
|
||||
QString *output, QString *errorMessage) const
|
||||
{
|
||||
branchArgs.push_front(QLatin1String("branch"));
|
||||
QByteArray outputText;
|
||||
@@ -1931,7 +1980,7 @@ bool GitClient::synchronousBranchCmd(const QString &workingDirectory, QStringLis
|
||||
}
|
||||
|
||||
bool GitClient::synchronousTagCmd(const QString &workingDirectory, QStringList tagArgs,
|
||||
QString *output, QString *errorMessage)
|
||||
QString *output, QString *errorMessage) const
|
||||
{
|
||||
tagArgs.push_front(QLatin1String("tag"));
|
||||
QByteArray outputText;
|
||||
@@ -1945,7 +1994,7 @@ bool GitClient::synchronousTagCmd(const QString &workingDirectory, QStringList t
|
||||
}
|
||||
|
||||
bool GitClient::synchronousForEachRefCmd(const QString &workingDirectory, QStringList args,
|
||||
QString *output, QString *errorMessage)
|
||||
QString *output, QString *errorMessage) const
|
||||
{
|
||||
args.push_front(QLatin1String("for-each-ref"));
|
||||
QByteArray outputText;
|
||||
@@ -1960,7 +2009,7 @@ bool GitClient::synchronousForEachRefCmd(const QString &workingDirectory, QStrin
|
||||
}
|
||||
|
||||
bool GitClient::synchronousRemoteCmd(const QString &workingDirectory, QStringList remoteArgs,
|
||||
QString *output, QString *errorMessage, bool silent)
|
||||
QString *output, QString *errorMessage, bool silent) const
|
||||
{
|
||||
remoteArgs.push_front(QLatin1String("remote"));
|
||||
QByteArray outputText;
|
||||
@@ -1975,7 +2024,7 @@ bool GitClient::synchronousRemoteCmd(const QString &workingDirectory, QStringLis
|
||||
}
|
||||
|
||||
QMap<QString,QString> GitClient::synchronousRemotesList(const QString &workingDirectory,
|
||||
QString *errorMessage)
|
||||
QString *errorMessage) const
|
||||
{
|
||||
QMap<QString,QString> result;
|
||||
QString output;
|
||||
@@ -2001,7 +2050,7 @@ QMap<QString,QString> GitClient::synchronousRemotesList(const QString &workingDi
|
||||
}
|
||||
|
||||
QStringList GitClient::synchronousSubmoduleStatus(const QString &workingDirectory,
|
||||
QString *errorMessage)
|
||||
QString *errorMessage) const
|
||||
{
|
||||
QByteArray outputTextData;
|
||||
QByteArray errorText;
|
||||
@@ -2018,7 +2067,7 @@ QStringList GitClient::synchronousSubmoduleStatus(const QString &workingDirector
|
||||
return commandOutputLinesFromLocal8Bit(outputTextData);
|
||||
}
|
||||
|
||||
SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory)
|
||||
SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory) const
|
||||
{
|
||||
SubmoduleDataMap result;
|
||||
QString gitmodulesFileName = workingDirectory + QLatin1String("/.gitmodules");
|
||||
@@ -2076,7 +2125,7 @@ SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory)
|
||||
}
|
||||
|
||||
bool GitClient::synchronousShow(const QString &workingDirectory, const QString &id,
|
||||
QString *output, QString *errorMessage)
|
||||
QString *output, QString *errorMessage) const
|
||||
{
|
||||
if (!canShow(id)) {
|
||||
*errorMessage = msgCannotShow(id);
|
||||
@@ -2253,7 +2302,7 @@ bool GitClient::isValidRevision(const QString &revision) const
|
||||
Utils::SynchronousProcessResponse GitClient::synchronousGit(const QString &workingDirectory,
|
||||
const QStringList &gitArguments,
|
||||
unsigned flags,
|
||||
QTextCodec *outputCodec)
|
||||
QTextCodec *outputCodec) const
|
||||
{
|
||||
return VcsBasePlugin::runVcs(workingDirectory, gitExecutable(), gitArguments,
|
||||
settings()->intValue(GitSettings::timeoutKey) * 1000,
|
||||
@@ -2339,7 +2388,7 @@ void GitClient::fetchFinished(const QVariant &cookie)
|
||||
}
|
||||
|
||||
GitClient::StatusResult GitClient::gitStatus(const QString &workingDirectory, StatusMode mode,
|
||||
QString *output, QString *errorMessage)
|
||||
QString *output, QString *errorMessage) const
|
||||
{
|
||||
// Run 'status'. Note that git returns exitcode 1 if there are no added files.
|
||||
QByteArray outputText;
|
||||
@@ -2378,7 +2427,7 @@ GitClient::StatusResult GitClient::gitStatus(const QString &workingDirectory, St
|
||||
return StatusUnchanged;
|
||||
}
|
||||
|
||||
QString GitClient::commandInProgressDescription(const QString &workingDirectory)
|
||||
QString GitClient::commandInProgressDescription(const QString &workingDirectory) const
|
||||
{
|
||||
switch (checkCommandInProgress(workingDirectory)) {
|
||||
case NoCommand:
|
||||
@@ -2396,7 +2445,7 @@ QString GitClient::commandInProgressDescription(const QString &workingDirectory)
|
||||
return QString();
|
||||
}
|
||||
|
||||
GitClient::CommandInProgress GitClient::checkCommandInProgress(const QString &workingDirectory)
|
||||
GitClient::CommandInProgress GitClient::checkCommandInProgress(const QString &workingDirectory) const
|
||||
{
|
||||
const QString gitDir = findGitDirForRepository(workingDirectory);
|
||||
if (QFile::exists(gitDir + QLatin1String("/MERGE_HEAD")))
|
||||
@@ -2490,7 +2539,7 @@ void GitClient::continuePreviousGitCommand(const QString &workingDirectory,
|
||||
}
|
||||
}
|
||||
|
||||
QString GitClient::extendedShowDescription(const QString &workingDirectory, const QString &text)
|
||||
QString GitClient::extendedShowDescription(const QString &workingDirectory, const QString &text) const
|
||||
{
|
||||
if (!text.startsWith(QLatin1String("commit ")))
|
||||
return text;
|
||||
@@ -2509,7 +2558,7 @@ QString GitClient::extendedShowDescription(const QString &workingDirectory, cons
|
||||
// Quietly retrieve branch list of remote repository URL
|
||||
//
|
||||
// The branch HEAD is pointing to is always returned first.
|
||||
QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryURL)
|
||||
QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryURL) const
|
||||
{
|
||||
QStringList arguments(QLatin1String("ls-remote"));
|
||||
arguments << repositoryURL << QLatin1String(HEAD) << QLatin1String("refs/heads/*");
|
||||
@@ -3071,7 +3120,7 @@ void GitClient::fetch(const QString &workingDirectory, const QString &remote)
|
||||
|
||||
bool GitClient::executeAndHandleConflicts(const QString &workingDirectory,
|
||||
const QStringList &arguments,
|
||||
const QString &abortCommand)
|
||||
const QString &abortCommand) const
|
||||
{
|
||||
// Disable UNIX terminals to suppress SSH prompting.
|
||||
const unsigned flags = VcsBasePlugin::SshPasswordPrompt
|
||||
@@ -3374,7 +3423,7 @@ void GitClient::stashPop(const QString &workingDirectory)
|
||||
bool GitClient::synchronousStashRestore(const QString &workingDirectory,
|
||||
const QString &stash,
|
||||
bool pop,
|
||||
const QString &branch /* = QString()*/)
|
||||
const QString &branch /* = QString()*/) const
|
||||
{
|
||||
QStringList arguments(QLatin1String("stash"));
|
||||
if (branch.isEmpty())
|
||||
@@ -3386,7 +3435,7 @@ bool GitClient::synchronousStashRestore(const QString &workingDirectory,
|
||||
|
||||
bool GitClient::synchronousStashRemove(const QString &workingDirectory,
|
||||
const QString &stash /* = QString() */,
|
||||
QString *errorMessage /* = 0 */)
|
||||
QString *errorMessage /* = 0 */) const
|
||||
{
|
||||
QStringList arguments(QLatin1String("stash"));
|
||||
if (stash.isEmpty())
|
||||
@@ -3408,7 +3457,7 @@ bool GitClient::synchronousStashRemove(const QString &workingDirectory,
|
||||
|
||||
bool GitClient::synchronousStashList(const QString &workingDirectory,
|
||||
QList<Stash> *stashes,
|
||||
QString *errorMessage /* = 0 */)
|
||||
QString *errorMessage /* = 0 */) const
|
||||
{
|
||||
stashes->clear();
|
||||
QStringList arguments(QLatin1String("stash"));
|
||||
|
||||
Reference in New Issue
Block a user