summaryrefslogtreecommitdiff
path: root/src/plugins/git
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2011-09-13 15:05:50 +0000
committerTobias Hunger <tobias.hunger@nokia.com>2011-09-14 10:53:20 +0200
commitc5c94206ba5a903215771bd6bf68c0919380e5c7 (patch)
treed17c6ca9d1a63045de946cf86b7db6ea9e14c4fa /src/plugins/git
parentd8c7dc8c52ba8089e2de109ae59c0d80497cb2ef (diff)
downloadqt-creator-c5c94206ba5a903215771bd6bf68c0919380e5c7.tar.gz
VCS: Make initialization of a repo trigger updateActions
Make initialization/cloning of a repo trigger an updateActions. This is needed to e.g. enable git actions after a git repo is created. Reviewed-by: Hugues Delorme Change-Id: Ia8513a216e584fe8e512fdd5d6215aa96c075f3f Reviewed-on: http://codereview.qt-project.org/4878 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins/git')
-rw-r--r--src/plugins/git/gitclient.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 5cd1f9bf48..cdb1028634 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -46,6 +46,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
+#include <coreplugin/vcsmanager.h>
#include <coreplugin/id.h>
#include <coreplugin/filemanager.h>
#include <coreplugin/iversioncontrol.h>
@@ -965,6 +966,11 @@ bool GitClient::synchronousInit(const QString &workingDirectory)
outputWindow()->append(commandOutputFromLocal8Bit(outputText));
if (!rc)
outputWindow()->appendError(commandOutputFromLocal8Bit(errorText));
+ else {
+ // TODO: Turn this into a VCSBaseClient and use resetCachedVcsInfo(...)
+ Core::VcsManager *vcsManager = m_core->vcsManager();
+ vcsManager->resetVersionControlForDirectory(workingDirectory);
+ }
return rc;
}
@@ -2371,7 +2377,10 @@ bool GitClient::cloneRepository(const QString &directory,const QByteArray &url)
workingDirectory.cdUp();
const Utils::SynchronousProcessResponse resp =
synchronousGit(workingDirectory.path(), arguments, flags);
- return resp.result == Utils::SynchronousProcessResponse::Finished;
+ // TODO: Turn this into a VCSBaseClient and use resetCachedVcsInfo(...)
+ Core::VcsManager *vcsManager = m_core->vcsManager();
+ vcsManager->resetVersionControlForDirectory(workingDirectory.absolutePath());
+ return (resp.result == Utils::SynchronousProcessResponse::Finished);
}
}