Skip to content

Instantly share code, notes, and snippets.

@kindohm
Last active December 12, 2015 01:38
Show Gist options
  • Save kindohm/4692291 to your computer and use it in GitHub Desktop.
Save kindohm/4692291 to your computer and use it in GitHub Desktop.
hg-churn in powershell
changeset = "{files}"
file = "{file}\n"
changeset = "{files}"
file = "{author|user}:{file}\n"
function hg-churn-template($template, $opts){
if ([system.string]::IsNullOrEmpty($opts) -eq $true) {
$opts = '-l 20'
}
hg log $opts --style $template | group-object | sort -prop Count | format-list Count, Name
}
function hg-churn(){
$opts = $args -join ' '
hg-churn-template('c:\\users\\mhodnick\\.hg-churn', $opts)
}
function hg-churn-user(){
$opts = $args -join ' '
hg-churn-template('c:\\users\\mhodnick\\.hg-churn-user', $opts)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment