Finding the author of a line of code in Mercurial

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.


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" ;-)


If you are using TortoiseHG

hgtk annotate <filename>

Or by finding the file in the log, rightclicking it and selecting "Annotate file"


I looked for this for ages in Tortoise Workbench; thanks to @artemb and @Steve Pitchers for pointing me in the right direction. Still took me a while to spot it.

enter image description here