diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-05-19 18:25:36 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-05-23 15:07:27 +0100 |
commit | 844d38432e40db17e5b3b260f7fa76192371dfc6 (patch) | |
tree | 8fc84a1957fcf2dbf9c008b63da14f6b37cef822 /Porting/cmpVERSION.pl | |
parent | e01fd32ac1d024f77b6589d9979905d1cd4e8ca5 (diff) | |
download | perl-844d38432e40db17e5b3b260f7fa76192371dfc6.tar.gz |
Change the -x option of cmpVERSION.pl to exclude upstream ne 'blead'
Previously it was excluding if CPAN were true, which meant that anything
with a DISTRIBUTION was excluded, including files where blead is upstream,
and hence something we should fix.
Diffstat (limited to 'Porting/cmpVERSION.pl')
-rwxr-xr-x | Porting/cmpVERSION.pl | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl index ec6b8691e4..d5e47003bf 100755 --- a/Porting/cmpVERSION.pl +++ b/Porting/cmpVERSION.pl @@ -4,8 +4,10 @@ # for modules that have identical version numbers but different contents. # # with -d option, output the diffs too -# with -x option, exclude dual-life modules (after all, there are tools -# like core-cpan-diff that can already deal with them) +# with -x option, exclude files from modules where blead is not upstream +# +# (after all, there are tools like core-cpan-diff that can already deal with +# them) # # Original by slaven@rezic.de, modified by jhi and matt.w.johnson@gmail.com. # @@ -17,9 +19,9 @@ use File::Compare; use File::Spec::Functions qw(devnull); use Getopt::Long; -my ($diffs, $exclude_dual, $tag_to_compare); +my ($diffs, $exclude_upstream, $tag_to_compare); unless (GetOptions('diffs' => \$diffs, - 'exclude|x' => \$exclude_dual, + 'exclude|x' => \$exclude_upstream, 'tag=s' => \$tag_to_compare, ) && @ARGV == 0) { die "usage: $0 [ -d -x --tag TAG]"; @@ -45,14 +47,15 @@ chomp $tag_exists; die "$0: '$tag_to_compare' is not a known Git tag\n" unless $tag_exists eq $tag_to_compare; -my %dual_files; -if ($exclude_dual) { +my %upstream_files; +if ($exclude_upstream) { unshift @INC, 'Porting'; require Maintainers; - for my $m (grep $Maintainers::Modules{$_}{CPAN}, - keys %Maintainers::Modules) { - $dual_files{$_} = 1 for Maintainers::get_module_files($m); + for my $m (grep {!defined $Maintainers::Modules{$_}{UPSTREAM} + or $Maintainers::Modules{$_}{UPSTREAM} ne 'blead'} + keys %Maintainers::Modules) { + $upstream_files{$_} = 1 for Maintainers::get_module_files($m); } } @@ -76,7 +79,7 @@ my @module_diffs = grep { /\.pm$/ && (!defined($this_dir) || ($this_dir !~ $skip_dirs)) && !exists $skip{$_} && - !exists $dual_files{$_} + !exists $upstream_files{$_} } @all_diffs; my (@output_files, @output_diffs); |