hg log
, but only to realize that I wanted a couple of lines before and after the line which matched as well.I am sure this is common knowledge, but I did not know how to do it, so am sharing it in the hope that someone finds it useful.
hg log | grep --before-context=2 --after-context=2 username
Running the above showed me changeset number, comments etc for all the mercurial changesets committed by the specified user.
2 comments:
Haven't actually tried this, but I believe --context=4 should give you the same results. Just a shortcut if you want equal amount of context around the matched line.
Hi Saagar,
You are right, that too worked.
Post a Comment