hg annotate -unl aFile
Shows:
jim 1519:477: a = 4
bob 1518:468: b = 5
joe 1496:402: return a
How do I get it to show
jim 401: a = 4
bob 402: b = 5
joe 403: return a
Where 401, 402, 403
are the current line numbers. Better yet would be something like git has with git blame -L 401,403 aFile
.
To show current line numbers:
hg annotate -u aFile | cat -n
To also select only a certain range of line numbers:
hg annotate -u aFile | cat -n | sed -n 401,403p
I always use the annotate view in hg serve
or from TortoiseHg. I find the command line annotate pretty poor since I cannot quickly jump to a parent revision. The hgweb annotate can be seen here:
It includes (current) line numbers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With