Skip to content

Instantly share code, notes, and snippets.

@bradmontgomery
Created April 8, 2011 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradmontgomery/910542 to your computer and use it in GitHub Desktop.
Save bradmontgomery/910542 to your computer and use it in GitHub Desktop.
Counting the frequency with which files change in a mercurial repo
# Step 1: Create a style for the output of "hg log"
# See: http://hgbook.red-bean.com/read/customizing-the-output-of-mercurial.html
# I put this in: ~/.hg/templates/fileonly
changeset = '{files}'
file = '{file}\n'
# Step 2: Use the above style and sort/count your output
hg log --style ~/.hg/templates/fileonly --date="2011-01-01 to 2011-04-01" | sort | uniq -c | sort -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment