3

I'm trying to merge the latest revision of our main branch into a much older branch. There's only two files that have conflicts, but the conflicts are complicated and I'd like to manually copy the changes from the more recent revision and fix some things. There's been a tonne of commits since the last commit into the old branch and I don't know when those two files were changed.

Using TortoiseHg, how can I find the latest revision on any branch where a particular file was changed?

Clonkex
  • 3,373
  • 7
  • 38
  • 55

1 Answers1

5

From Windows Explorer, right click on the file whose history you are interested in.

In the TortoiseHG menu, select "Revision History":

enter image description here

This will bring up a window showing only the changesets which have modified that file (in any branch). It should also show history across tracked file renames (if the hg log "follow" option is enabled in hgrc), copies, and moves.


You can also get to the same thing from within the THG Workbench application, from the lower files list, where it is called "File History":

enter image description here

Either will bring you to:

enter image description here


Furthermore, command line equivalents of this screen would be to use hg log file and hg annotate file.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
  • Aha! Perfect, thank you! My dev work happens on Ubuntu (which I forgot to mention) so I don't have Explorer extensions, but as you say I can get to the file history from the list of files changed in a commit. – Clonkex Jun 15 '18 at 04:28
  • @Clonkex I've updated the answer with some more info for the Workbench route. I've never used THG on linux but I assume/hope the GUI is basically the same. – StayOnTarget Jun 15 '18 at 18:17
  • 1
    Nice, that's good info. And yep I use it on Windows and Linux and it's virtually identical. – Clonkex Jun 17 '18 at 03:05