Mercurial - View all changesets that modify specific line in file

mercurial, tortoisehg

Solution

Use Tortoisehg:

- View -> Manifest

- Right click on file interested in and click "File History"

- click "annotate with revision numbers"

The top panel allows you to quickly see the history of the file in terms of commits, the bottom panel shows the annotated file based upon the selected version in the top panel.

Problem

Annotate gets you as far as seeing the most recent change to that line, if that change is a merge then I have no choice but to trawl through the revision history and find the next time it was modified. I've also tried `hg grep -l '[contents of line]'` but: - a) I can't figure out how to target specific files (so it takes forever in a moderately sized repo) - b) It seems to only return the last revision number The following link is vaguely similar - How to find all changsets where a reference to a function was modified?

Original source

Related problems