Commit b26ef7e6 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

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: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 5fa7b60b
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment