Bug 213337 - Git repository browser refresh
Git repository browser refresh
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Git
7.1.2
PC All
: P3 (vote)
: 7.4
Assigned To: Ondrej Vrabec
issues@versioncontrol
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-31 17:47 UTC by sparkee
Modified: 2013-01-29 03:28 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sparkee 2012-05-31 17:47:39 UTC
The Git repository browser does not refresh in the many cases when it should. It is often showing branches that don't exist.  

If you open two projects that both use git SCM, you will see two repositories.  But closing a project does not make one disappear.

It may be difficult for Netbeans to determine when a git change has been made behind the scenes using the git command line client (as I often do to as needed for more control).  But there at least ought to be some kind of way to manually refresh the repository browser in Netbeans so it matches up, and when a project is closed, its repository should disappear.
Comment 1 Ondrej Vrabec 2012-05-31 18:01:51 UTC
(In reply to comment #0)
> If you open two projects that both use git SCM, you will see two repositories. 
> But closing a project does not make one disappear.
Right, because it still tracks the folder and it exists on the hard drive. No bug, NetBeans versioning support are not project-oriented but simply file/folder-oriented.
> It may be difficult for Netbeans to determine when a git change has been made
> behind the scenes using the git command line client (as I often do to as needed
> for more control).  But there at least ought to be some kind of way to manually
> refresh the repository browser in Netbeans so it matches up
Could you please describe one scenario when this happens? What do you do externally and what do you expect from the browser to change?
BTW, there is a refresh action: select the Branches node and from its contextual menu select Refresh. The same applies to Tags.
> and when a project is closed, its repository should disappear.
No. Again, Git support is not project-oriented. Simply because you do not need to have a project opened to run Git actions. You can also call them from the Favorites view which does works directly with files and folders
Comment 2 Ondrej Vrabec 2012-06-01 08:22:07 UTC
right, creating or deleting a branch externally on commandline does not refresh the browser automatically, you need to manually call Refresh action. Maybe we could try to handle it somehow.
Comment 3 sparkee 2012-06-08 19:14:40 UTC
(In reply to comment #2)
> right, creating or deleting a branch externally on commandline does not refresh
> the browser automatically, you need to manually call Refresh action. Maybe we
> could try to handle it somehow.

I was sure I tried right-clicking the branches and got nothing.  But, I was wrong there is a refresh on branches and it appears to work.  That corrects one aspect of the problem. I am fine with closing this on that basis - your call.  You have to admit though, it is a bit obscured to have the refresh operation there.

It would still be nice to do something with the repository browser in terms of removing repositories for closed projects.
Comment 4 Ondrej Vrabec 2013-01-28 16:07:42 UTC
fix: http://hg.netbeans.org/core-main/rev/952a95581038
Comment 5 Quality Engineering 2013-01-29 03:28:54 UTC
Integrated into 'main-golden', will be available in build *201301290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/952a95581038
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #213337 - Git repository browser refresh
listen also on changes inside .git/refs folder


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo