Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349763 - Staging view: 'no repository selected' until repository is selected with staging view visible
Summary: Staging view: 'no repository selected' until repository is selected with stag...
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: 4.7   Edit
Assignee: Thomas Wolf CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-19 04:47 EDT by Robert Munteanu CLA
Modified: 2017-01-14 19:15 EST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2011-06-19 04:47:33 EDT
When the staging view is not active, but a repository is selected in the package explorer, activating the view does not display the staged and unstaged content. It is necessary to click in the package explorer with the view visible for the repository selection to be visible.
Comment 1 Matthias Sohn CLA 2011-08-08 17:01:04 EDT
merged as 3e25690c8687568f321a2f04e4fd6a42cfe3f78b
Comment 2 Torbjörn Stabo CLA 2016-05-04 07:36:15 EDT
It seems this bug isn't fixed. I upgraded from Ubuntu 15.10 to 16.04, and I've updated eclipse as well. Current version:

Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600

..and I get exactly the same behavior as Robert Munteanu described.
Comment 3 Torbjörn Stabo CLA 2016-05-04 07:40:03 EDT
(In reply to Torbjörn Stabo from comment #2)
> It seems this bug isn't fixed. I upgraded from Ubuntu 15.10 to 16.04, and
> I've updated eclipse as well. Current version:
> 
> Version: Mars.2 Release (4.5.2)
> Build id: 20160218-0600
> 
> ..and I get exactly the same behavior as Robert Munteanu described.

..well, that was a too short one. What I meant to say was that before upgrading eclipse and Ubuntu 15.10->16.04 I didn't have this problem.
Comment 4 Tom Ford CLA 2017-01-11 03:21:40 EST
(In reply to Torbjörn Stabo from comment #3)
> (In reply to Torbjörn Stabo from comment #2)
> > It seems this bug isn't fixed. I upgraded from Ubuntu 15.10 to 16.04, and
> > I've updated eclipse as well. Current version:
> > 
> > Version: Mars.2 Release (4.5.2)
> > Build id: 20160218-0600
> > 
> > ..and I get exactly the same behavior as Robert Munteanu described.
> 
> ..well, that was a too short one. What I meant to say was that before
> upgrading eclipse and Ubuntu 15.10->16.04 I didn't have this problem.

I can also confirm this. I have just upgraded from Ubuntu 15.10 -> 16.04 and I am experiencing the same issue.

Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600

Egit: 4.6.0.201612231935-r
Comment 5 Thomas Wolf CLA 2017-01-11 06:49:58 EST
Looks like a regression introduced in the fixes for bug 460243.
Comment 6 Eclipse Genie CLA 2017-01-11 06:54:38 EST
New Gerrit change created: https://git.eclipse.org/r/88450
Comment 7 Andrey Loskutov CLA 2017-01-11 06:59:19 EST
What are the steps to reproduce? If I open Staging view, activate Package Explorer and select something there, Staging view shows the right content.
Comment 8 Tom Ford CLA 2017-01-11 07:12:06 EST
(In reply to Andrey Loskutov from comment #7)
> What are the steps to reproduce? If I open Staging view, activate Package
> Explorer and select something there, Staging view shows the right content.

1. Git staging view not active
2. Right click project -> Team -> Commit
3. Staging view pops up and either says "no project selected" or has the wrong project selected
4. Close staging view and reopen, correct project is shown
5. Right click on 1 or more unstaged files and stage them.
6. Normally the files would move to the "staged changed" box but they stay in "unstaged changes" until you close and re-open git staging view.
7. Similarly when you click "Commit" or "Commit and push" the commit does not happen until you close the git staging view (used to happen straight away)
Comment 9 Thomas Wolf CLA 2017-01-11 08:02:27 EST
(In reply to Andrey Loskutov from comment #7)
> What are the steps to reproduce? If I open Staging view, activate Package
> Explorer and select something there, Staging view shows the right content.

Or:

* Have both staging view and repositories view visible. Staging view bottom right, in the pane with the problems/console/etc; repo view in left pane below the package explorer.
* Click on a repo in the repo view. Staging view should update.
* Activate some other view in the bottom-right pane: click on the console tab.
* Click on some other repo in the (still visible) repositories view.
* Click on the staging view tab: comes up still showing the previously shown repository, not the newly selected one.
Comment 10 Thomas Wolf CLA 2017-01-11 08:13:49 EST
(In reply to Tom Ford from comment #8)
> 1. Git staging view not active
> 2. Right click project -> Team -> Commit

Tom, I cannot reproduce that one with the Team -> Commit action with current master. And in fact I think it also should not occur with 4.6.0.201612231935-r; what you describe sounds like bug 491907. Do you have "link with selection" enabled?
Comment 11 Tom Ford CLA 2017-01-11 08:24:57 EST
(In reply to Thomas Wolf from comment #10)
> (In reply to Tom Ford from comment #8)
> > 1. Git staging view not active
> > 2. Right click project -> Team -> Commit
> 
> Tom, I cannot reproduce that one with the Team -> Commit action with current
> master. And in fact I think it also should not occur with
> 4.6.0.201612231935-r; what you describe sounds like bug 491907. Do you have
> "link with selection" enabled?

I tried with "link with selection" enabled and disabled and the problem persisted.

As an aside, this morning I have spent time moving from Mars.2 to Neon.2 and have so far not had any of these problems occur in Neon although I am currently using EGit 4.4.1.201607150455 from the Neon update site rather than installing the latest from the Egit update site which I had done in Mars.
Comment 12 Eclipse Genie CLA 2017-01-12 09:36:15 EST
Gerrit change https://git.eclipse.org/r/88450 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=fff3ed5f6dcb7aa62f22e98bcd509840ced523a2
Comment 13 Andrey Loskutov CLA 2017-01-12 09:37:16 EST
(In reply to Thomas Wolf from comment #9)
> (In reply to Andrey Loskutov from comment #7)
> > What are the steps to reproduce? If I open Staging view, activate Package
> > Explorer and select something there, Staging view shows the right content.
> 
> Or:
> 
> * Have both staging view and repositories view visible. Staging view bottom
> right, in the pane with the problems/console/etc; repo view in left pane
> below the package explorer.
> * Click on a repo in the repo view. Staging view should update.
> * Activate some other view in the bottom-right pane: click on the console
> tab.
> * Click on some other repo in the (still visible) repositories view.
> * Click on the staging view tab: comes up still showing the previously shown
> repository, not the newly selected one.

Yep. Thanks for the patch!
Comment 14 Andrey Loskutov CLA 2017-01-14 03:42:55 EST
Last patch causes a severe regression: staging view doesn't react anymore on changing editors. The code in partActivated need to be partly restored, selection change events alone aren't enough.
Comment 15 Eclipse Genie CLA 2017-01-14 03:55:45 EST
New Gerrit change created: https://git.eclipse.org/r/88695
Comment 16 Eclipse Genie CLA 2017-01-14 07:00:12 EST
Gerrit change https://git.eclipse.org/r/88695 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=cefb94f242e015aec561edda2990af011335a61d
Comment 17 Andrey Loskutov CLA 2017-01-14 07:22:50 EST
Resolving 3rd time, hopefully last one :-)
Comment 18 Matthias Sohn CLA 2017-01-14 19:15:47 EST
thanks for fixing