diff options
author | Alexander Færøy <ahf@torproject.org> | 2021-05-25 11:33:58 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2021-05-25 00:20:46 +0000 |
commit | 8d4bbc337b11e1d3a60158d7f97c90fae7d7bc65 (patch) | |
tree | 1f019189446f81c57003dfb13d1a5fb0bb4fc447 /scripts/maint | |
parent | e247aab4eceeb3920f1667bf5a11d5bc83b950cc (diff) | |
download | tor-8d4bbc337b11e1d3a60158d7f97c90fae7d7bc65.tar.gz tor-8d4bbc337b11e1d3a60158d7f97c90fae7d7bc65.zip |
Rewrite documentation on primary branch usage for Tor.git.
This patch is part of a series of patches where we try to change our
primary branch name of tor.git from master to main.
See: tpo/core/team#2
Diffstat (limited to 'scripts/maint')
-rwxr-xr-x | scripts/maint/findMergedChanges.pl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scripts/maint/findMergedChanges.pl b/scripts/maint/findMergedChanges.pl index d6c4105b74..9b3496403d 100755 --- a/scripts/maint/findMergedChanges.pl +++ b/scripts/maint/findMergedChanges.pl @@ -9,7 +9,7 @@ sub nChanges { # requires perl 5.8. Avoids shell issues if we ever get a changes # file named by the parents of Little Johnny Tables. open F, "-|", "git", "log", "--no-merges", "--pretty=format:%H", $branches, "--", $fname - or die "$!"; + or die "$!"; my @changes = <F>; return scalar @changes } @@ -22,13 +22,13 @@ Usage: findMergedChanges.pl [--merged/--unmerged/--weird/--list] [--branch=<branchname] [--head=<branchname>] changes/* A change is "merged" if it has ever been merged to release-0.2.4 and it has had -no subsequent changes in master. +no subsequent changes in main. A change is "unmerged" if it has never been merged to release-0.2.4 and it -has had changes in master. +has had changes in main. A change is "weird" if it has been merged to release-0.2.4 and it *has* had -subsequent changes in master. +subsequent changes in main. Suggested application: findMergedChanges.pl --merged changes/* | xargs -n 1 git rm @@ -37,18 +37,18 @@ EOF } my $target_branch = "origin/release-0.2.4"; -my $head = "origin/master"; +my $head = "origin/main"; while (@ARGV and $ARGV[0] =~ /^--/) { my $flag = shift @ARGV; if ($flag =~ /^--(weird|merged|unmerged|list)/) { - $look_for_type = $1; + $look_for_type = $1; } elsif ($flag =~ /^--branch=(\S+)/) { $target_branch = $1; } elsif ($flag =~ /^--head=(\S+)/) { $head = $1; } else { - die "Unrecognized flag $flag"; + die "Unrecognized flag $flag"; } } @@ -58,16 +58,16 @@ for my $changefile (@ARGV) { my $type; if ($n_merged != 0 and $n_postmerged == 0) { - $type = "merged"; + $type = "merged"; } elsif ($n_merged == 0 and $n_postmerged != 0) { - $type = "unmerged"; + $type = "unmerged"; } else { - $type = "weird"; + $type = "weird"; } if ($type eq $look_for_type) { - print "$changefile\n"; + print "$changefile\n"; } elsif ($look_for_type eq 'list') { - printf "% 8s: %s\n", $type, $changefile; + printf "% 8s: %s\n", $type, $changefile; } } |