Last active
December 12, 2015 01:38
-
-
Save kindohm/4692291 to your computer and use it in GitHub Desktop.
hg-churn in powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
changeset = "{files}" | |
file = "{file}\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
changeset = "{files}" | |
file = "{author|user}:{file}\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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