Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
01c7d06b
Commit
01c7d06b
authored
11 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Add some more options to the findMoreChanges.pl kludge-script
parent
3e096719
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/findMergedChanges.pl
+6
-3
6 additions, 3 deletions
contrib/findMergedChanges.pl
with
6 additions
and
3 deletions
contrib/findMergedChanges.pl
+
6
−
3
View file @
01c7d06b
...
...
@@ -8,7 +8,7 @@ sub nChanges {
local
*F
;
# 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
",
"
--pretty=format:%H
",
$branches
,
"
--
",
$fname
open
F
,
"
-|
",
"
git
",
"
log
",
"
--no-merges
",
"
--pretty=format:%H
",
$branches
,
"
--
",
$fname
or
die
"
$!
";
my
@changes
=
<
F
>
;
return
scalar
@changes
...
...
@@ -19,7 +19,7 @@ my $look_for_type = "merged";
if
(
!
@ARGV
)
{
print
<<EOF
Usage:
findMergedChanges.pl [--merged/--unmerged/--weird/--list] [--branch=<branchname] changes/*
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.
...
...
@@ -37,6 +37,7 @@ EOF
}
my
$target_branch
=
"
origin/release-0.2.4
";
my
$head
=
"
origin/master
";
while
(
@ARGV
and
$ARGV
[
0
]
=~
/^--/
)
{
my
$flag
=
shift
@ARGV
;
...
...
@@ -44,6 +45,8 @@ while (@ARGV and $ARGV[0] =~ /^--/) {
$look_for_type
=
$
1
;
}
elsif
(
$flag
=~
/^--branch=(\S+)/
)
{
$target_branch
=
$
1
;
}
elsif
(
$flag
=~
/^--head=(\S+)/
)
{
$head
=
$
1
;
}
else
{
die
"
Unrecognized flag
$flag
";
}
...
...
@@ -51,7 +54,7 @@ while (@ARGV and $ARGV[0] =~ /^--/) {
for
my
$changefile
(
@ARGV
)
{
my
$n_merged
=
nChanges
(
$target_branch
,
$changefile
);
my
$n_postmerged
=
nChanges
("
${target_branch}
..
origin/master
",
$changefile
);
my
$n_postmerged
=
nChanges
("
${target_branch}
..
${head}
",
$changefile
);
my
$type
;
if
(
$n_merged
!=
0
and
$n_postmerged
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment