How do I find out who is responsible for a specific line of code? I know the linenumber and the filename but I would like Mercurial to tell me the author(s) of that specific line of code. Is there a command for that?
+1
A:
If you are using TortoiseHG
hgtk annotate <filename>
Or by finding the file in the log, rightclicking it and selecting "Annotate file"
artemb
2010-02-09 10:11:43
+7
A:
On the command-line, you'd want to use hg annotate -u (-u can be combined with -n to get the local revision number, which might come in useful). Check hg help anno for more options.
djc
2010-02-09 10:44:39
I love how the alias to annotate is blame.
Daniel W
2010-02-09 13:32:17
+4
A:
Hi,
I was a fan of "svn blame"
, so I've added to my ~/.hgrc
:
[alias]
blame = annotate --user --number
so I can just type "hg blame"
;-)
Cheers,
Christophe.
= The future, according to some scientists, will be exactly =
= like the past, only far more expensive. --John Sladek =
Christophe Muller
2010-02-11 10:08:51