The branch name won't be updated in case one switches branches in certain scenarios. Example: Repository is located in /foo, hence there will be /foo/.git Project is located in /foo/myproject Project is opened in KDevelop from /foo/myproject/ In case one switches branch, KDevelop won't notice it. I think the reason is that KDevelop tries to detect branch changes by tracking some file in $PROJECT_ROOT/.git, but in this special case .git/ is not located in $PROJECT_ROOT. Reproducible: Always
Sounds likely, can you check if this patch fixes the problem? http://paste.ubuntu.com/5664541
Your patch won't work because of the later code in VcsOverlayProxyModel: void VcsOverlayProxyModel::repositoryBranchChanged(const KUrl& url) { IProject* project = ICore::self()->projectController()->findProjectForUrl(url); ... } So we probably need a findProjectByRepositoryRoot(url) function (in either ProjectController or as local function)
Created attachment 79888 [details] subproject branch change patch This patch changes the behavior so the projects' branches under the changed repository are fetched again.
I fear that there are more problems wrt this issue: Another scenario is that one has two projects open that reside in a single repository. In this case only one of the projects will be updated with VCS information in the project explorer. Correct me if I'm wrong. I can have a closer look at it at some point.
No, in those cases it will be sent to all projects (while probably unneeded, but optimizable in the future). I'll just commit it, then we can iterate over it.
Git commit 5833edd1cdf42fd156f1b5b28f0319578311c991 by Aleix Pol. Committed on 15/05/2013 at 17:29. Pushed by apol into branch 'master'. Bear in mind that the project root might not be the repository root In the git side, look up the project root. In the consumer side, don't assume it's the root url. M +1 -1 plugins/git/gitplugin.cpp M +12 -10 plugins/projectmanagerview/vcsoverlayproxymodel.cpp http://commits.kde.org/kdevplatform/5833edd1cdf42fd156f1b5b28f0319578311c991