Log: maintain selected file when changing commits to make examining historical differences easier

Chris Kline 2 years ago updated by Marc Strapetz 2 years ago 6

When trying to understand the history of a change, it's common for someone to open the log window and then click back and forth on different commits to see what changed in them.

Currently, when the user clicks on a commit, the differences pane in the log window switches to display the file that is at the top of the Files window based on the current sort order. This makes it cumbersome to switch back and forth between commits to see what happened to a particular file because, unless that file happens to be at the top of the sort order in each commit, the differences pane keeps jumping around between files.

As an example, attached are two screenshots of what happens to the view when I switch between two changelists, both of which contain the same file "DBExternalViewManagerImpl.inl". 

I click on first commit and select DBExternalViewManagerImpl.inl in the files window:

Then I click on next commit in log; DBExternalViewManagerImpl.inl does not remain selected in files window, and the contents of the differences pane therefore change:

What I think the behavior should be is:

  1. the file selected in the current commit should remain selected when switching to another commit, so long as the other commit contains the same file.
  2. when switching to a different commit that does not contain the same file, it should switch to either:
    • The file that was selected most recently for this commit
    • Or the file at the top of the sort order, if no file was previously selected for the commit

#1 is the most important. #2 would really help when skipping around through multiple changelists that may not all contain the same files, but I understand that it would require a tiny amount of state tracking and may not be as easy to implement as #1.

Thanks for considering this request.

(Note: I filed this several years ago via email and it was filed internally as SG-9991. Since I cannot find it here on userecho, I have assumed it got "lost" and am re-filing it)


Confirmed that build 13081 fixes the issue for me (which was specific to subdirectory logs). Thanks!

Satisfaction mark by Chris Kline 2 years ago

Which version are you using?  It does this for me in 18.2 preview.


Right, SG-9991 should be fixed since version 7.2 and works as expected for me, too.

I'm on 18.1.4 #12159, installed: #12086. Interestingly enough, when I do Help > "Check For Latest Build" it tells me I have the latest version. Hmm... another bug perhaps?

I just downloaded 18.2 from the Syntevo website, and it still has the same problem on exactly the same commits. Would you like a video or something showing the issue?

Help|Check for Latest Builds will not jump across major version branches, i.e. it will only give you latest 18.1.x builds.

Marc, here's a video of it not working, from the latest 18.2 Preview 3 build.

Screen Recording 2018-08-10 at 8.51.44 AM.mp4


Fixed in build 13081.