Alex Rivera | Logout

Mercurial - how to see the history for a specific line of code

Asked 2012-11-25T08:46:45.020
8

I have a CSS file with thousands of lines of code. I want to see when a specific line/chunk of code was changed, without going back and reviewing each revision that changed this file (that will take a looooong time!)

Is there a way, using either TortoiseHg, Eclipse with a Mercurial plugin, or command-line, to view the history of a specific piece of code?

Edit
Report

1 Answer

13

You can use:

hg annotate <file>

to find out in which revision line was changed and then use same command with -r <revision> at the end to go backwards through revisions.

answered 2012-11-25T09:05:52.313

Your Answer