3 ms·
Btw, you can avoid the grep in hg using a simple template: hg log --user "Shawn Smith" --template "{rev}:{author}\n" | wc -l Of course, hg output is also
by jordigh 12y ago
Btw, you can avoid the grep in hg using a simple template:
hg log --user "Shawn Smith" --template "{rev}:{author}\n" | wc -l
Of course, hg output is also meant to be parseable, so there's nothing wrong with grepping. I just wanted to talk about the awesomeness of hg templates. :-)
http://mercurial.selenic.com/wiki/GenericTemplatingPlan http://mercurial.selenic.com/wiki/GenericTemplatingPlan
Edit: Oh, oh, and another way to count without even using wc -l, using the churn extension and a revset!
hg --config extensions.churn= churn -r "user('Shawn Smith')" -c
Naturally, if you enable the churn extension in your ~/.hgrc, this is just
hg churn -r "user('Shawn Smith')" -c
Mercurial is a very cool DVCS, and it makes me very happy, and its features need to be more frequently talked about. :-)