Created
March 22, 2012 18:42
-
-
Save bamboo/2161519 to your computer and use it in GitHub Desktop.
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
import System.Text.RegularExpressions | |
while true: | |
heads = /changeset:\s+(?<revision>\d+)(.|\n)+?summary:\s+.+\n/.Matches(shell("hg", "heads")) | |
break if len(heads) < 2 | |
for head as Match in heads: | |
continue if /tag:\s+tip/.IsMatch(head.Value) | |
revision = head.Groups["revision"].Value | |
print "stripping $revision..." | |
print shell("hg", "strip $revision") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment