From b26ef7e6cdf011150e0635a5363f3163d465e4d2 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Fri, 9 Aug 2013 17:48:46 +0300 Subject: [PATCH] VCS: Emit repositoryChanged on some missed cases * If command fails - it might fail due to a conflict. That doesn't mean the repository hasn't changed. * On runVcs Change-Id: I0acd33a330c90d7c4f0df1f113ef2852eaf0ad03 Reviewed-by: Tobias Hunger --- src/plugins/vcsbase/vcsbaseplugin.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index e47fb10f064..ea3096de5b5 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -1005,9 +1005,11 @@ SynchronousProcessResponse VcsBasePlugin::runVcs(const QString &workingDir, if (!(flags & SuppressFailMessageInLogWindow)) outputWindow->appendError(response.exitMessage(binary, timeOutMS)); } - // TODO tell the document manager that the directory now received all expected changes - // if (flags & ExpectRepoChanges) - // Core::DocumentManager::unexpectDirectoryChange(workingDir); + if (flags & ExpectRepoChanges) { + // TODO tell the document manager that the directory now received all expected changes + // Core::DocumentManager::unexpectDirectoryChange(workingDir); + Core::ICore::vcsManager()->emitRepositoryChanged(workingDir); + } return response; } @@ -1051,16 +1053,14 @@ bool VcsBasePlugin::runFullySynchronous(const QString &workingDirectory, SynchronousProcess::stopProcess(process); return false; } - // TODO tell the document manager that the directory now received all expected changes - // if (flags & ExpectRepoChanges) - // Core::DocumentManager::unexpectDirectoryChange(workingDirectory); - if (process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0) { - if (flags & ExpectRepoChanges) - Core::ICore::vcsManager()->emitRepositoryChanged(workingDirectory); - return true; + if (flags & ExpectRepoChanges) { + // TODO tell the document manager that the directory now received all expected changes + // Core::DocumentManager::unexpectDirectoryChange(workingDirectory); + Core::ICore::vcsManager()->emitRepositoryChanged(workingDirectory); } - return false; + + return process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0; } bool VcsBasePlugin::runPatch(const QByteArray &input, const QString &workingDirectory,