Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352013

Summary: History view should keep selection when changing the scope of changes shown
Product: [Technology] EGit Reporter: Andrew Niefer <aniefer>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: flood, matthias.sohn
Version: 0.12   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Andrew Niefer CLA 2011-07-13 14:24:06 EDT
The history view can change to show changes in the entire repo, the project, the folder or the specific file.

When selecting a given change for a specific file, and then switching to a wider scope (project, repo), the selection should stay on the same commit in the new list.

For the reverse, when switching from the entire repo to a specific file, the selection should be kept if that commit is still in the new list, otherwise reset to the latest commit.
Comment 1 Jan Koops CLA 2014-05-07 05:10:56 EDT
This is important for the use case "finding a commit introducing a bug"

To see if a bug was introduced by a certain commit I want to checkout its parent, but I can't find it via the egit history:
1. Open the history view for one file, filter to commits changing the file ("show all changes of selected resource"). Make sure "search" is switched off.
2. Select an very old commit.
-> Note that the "parent" is the *not* the parent of the commit but the one before in the list! So we need to continue with step 3.
3. Switch to "all changes in repository"
-> selection is not visible in the list.
4. Click on "Parent"-commit link
-> Parent commit is still not visible in the list, so I can't choose checkout in the context menu.
Comment 2 Matthias Sohn CLA 2014-05-07 09:27:48 EDT
(In reply to Jan Koops from comment #1)
> This is important for the use case "finding a commit introducing a bug"
> 
> To see if a bug was introduced by a certain commit I want to checkout its
> parent, but I can't find it via the egit history:
> 1. Open the history view for one file, filter to commits changing the file
> ("show all changes of selected resource"). Make sure "search" is switched
> off.
> 2. Select an very old commit.
> -> Note that the "parent" is the *not* the parent of the commit but the one
> before in the list! So we need to continue with step 3.

I'd say this is a bug, the parent link should reference the parent of the selected commit, filtering shouldn't break this. Instead we should probably remove the filter and set the focus on the parent commit when the user clicks the parent link

> 3. Switch to "all changes in repository"
> -> selection is not visible in the list.
> 4. Click on "Parent"-commit link
> -> Parent commit is still not visible in the list, so I can't choose
> checkout in the context menu.