diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-07-06 17:00:35 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-05-28 09:19:29 +0200 |
commit | 02b83d1ddb195be6f048441f9eb4a39ae14d2740 (patch) | |
tree | 16f6c9e589a2dcf1ac85a2c33692320c8d12ccf6 /Porting | |
parent | 8b5692380409165c56f3858735141b00875ff0f1 (diff) | |
download | perl-02b83d1ddb195be6f048441f9eb4a39ae14d2740.tar.gz |
Add --gold option to bisect.pl for the revision to use for "recent" files.
Historically when bisect-runner.pl wanted to check out a known good recent
version of a file (such as makedepend.SH) it would check out the revision
from blead. However, that may not be wise as blead isn't guaranteed always to
be stable and therefore "known good". So default to using the most recent
tagged stable release.
Diffstat (limited to 'Porting')
-rwxr-xr-x | Porting/bisect-runner.pl | 13 | ||||
-rwxr-xr-x | Porting/bisect.pl | 6 |
2 files changed, 15 insertions, 4 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index 89db0e4f76..7253f3c05c 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -62,7 +62,8 @@ unless(GetOptions(\%options, }, 'force-manifest', 'force-regen', 'test-build', 'validate', 'all-fixups', 'early-fixup=s@', 'late-fixup=s@', 'valgrind', - 'check-args', 'check-shebang!', 'usage|help|?', 'A=s@', + 'check-args', 'check-shebang!', 'usage|help|?', 'gold=s', + 'A=s@', 'D=s@' => sub { my (undef, $val) = @_; if ($val =~ /\A([^=]+)=(.*)/s) { @@ -603,6 +604,14 @@ run C<../perl/Porting/bisect.pl /usr/bin/perl ~/test/testcase.pl> =item * +--gold + +Revision to use when checking out known-good recent versions of files, +such as F<makedepend.SH>. F<bisect-runner.pl> defaults this to I<blead>, +but F<bisect.pl> will default it to the most recent stable release. + +=item * + --usage =item * @@ -904,7 +913,7 @@ sub revert_commit { sub checkout_file { my ($file, $commit) = @_; - $commit ||= 'blead'; + $commit ||= $options{gold} || 'blead'; system "git show $commit:$file > $file </dev/null" and die_255("Could not extract $file at revision $commit"); } diff --git a/Porting/bisect.pl b/Porting/bisect.pl index 0423fd3125..14ee6027cb 100755 --- a/Porting/bisect.pl +++ b/Porting/bisect.pl @@ -11,9 +11,9 @@ Documentation for this is in bisect-runner.pl # Which isn't what we want. use Getopt::Long qw(:config pass_through no_auto_abbrev); -my ($start, $end, $validate, $usage, $bad, $jobs, $make); +my ($start, $end, $validate, $usage, $bad, $jobs, $make, $gold); $bad = !GetOptions('start=s' => \$start, 'end=s' => \$end, - 'jobs|j=i' => \$jobs, 'make=s' => \$make, + 'jobs|j=i' => \$jobs, 'make=s' => \$make, 'gold=s' => \$gold, validate => \$validate, 'usage|help|?' => \$usage); unshift @ARGV, '--help' if $bad || $usage; unshift @ARGV, '--validate' if $validate; @@ -74,6 +74,8 @@ unshift @stable, qw(perl-5.005 perl-5.6.0 perl-5.8.0); } } +unshift @ARGV, '--gold', defined $gold ? $gold : $stable[-1]; + $end = 'blead' unless defined $end; # Canonicalising branches to revisions before moving the checkout permits one |