aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-04-29 15:26:19 -0400
committerNick Mathewson <nickm@torproject.org>2011-04-29 15:27:44 -0400
commit751e40805556fadec616aa79150f12e3bf87c46b (patch)
tree91908cee7eec9e960fc3e280cbb117a3f1ada474
parenta23ec308e4b0a9286589b798bb3831c93949e3ce (diff)
downloadtor-751e40805556fadec616aa79150f12e3bf87c46b.tar
tor-751e40805556fadec616aa79150f12e3bf87c46b.tar.gz
Make findMergedChanges.pl print a usage msg when started with no args
Otherwise I need to figure out what it does and how to make it do it every time I want to use it. It did that unixy thing where running it with no arguments printed nothing and returned.
-rwxr-xr-xcontrib/findMergedChanges.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/findMergedChanges.pl b/contrib/findMergedChanges.pl
index 169471680..460424f30 100755
--- a/contrib/findMergedChanges.pl
+++ b/contrib/findMergedChanges.pl
@@ -16,6 +16,26 @@ sub nChanges {
my $look_for_type = "merged";
+if (! @ARGV) {
+ print <<EOF
+Usage:
+ findMergedChanges.pl [--merged/--unmerged/--weird/--list] changes/*
+
+A change is "merged" if it has ever been merged to release-0.2.2 and it has had
+no subsequent changes in master.
+
+A change is "unmerged" if it has never been merged to release-0.2.2 and it
+has had changes in master.
+
+A change is "weird" if it has been merged to release-0.2.2 and it *has* had
+subsequent changes in master.
+
+Suggested application:
+ findMergedChanges.pl --merged changes/* | xargs -n 1 git rm
+
+EOF
+}
+
while (@ARGV and $ARGV[0] =~ /^--/) {
my $flag = shift @ARGV;
if ($flag =~ /^--(weird|merged|unmerged|list)/) {