In metaconfig.git, the branch master has been updated <http://perl5.git.perl.org/metaconfig.git/commitdiff/aa86caabf87d2aebcb7cf723bce62dfa9cddc1d5?hp=53d216c6579742505443585d5a0a160661e59fd5>
- Log ----------------------------------------------------------------- commit aa86caabf87d2aebcb7cf723bce62dfa9cddc1d5 Author: H.Merijn Brand - Tux <[email protected]> Date: Fri Apr 22 17:13:31 2016 +0200 Update dist/U from dist-git/mcon/U First step. perl ls-diff.pl will show # Git Dist Perl Diff Unit === ========= ====== ========= ====== ========= ====== ====================== 1 3974/135 1113 4014/135 4732 3804/138 4687 Checkcc.U 2 2327/ 63 696 2372/ 63 2221 2182/ 61 2176 Compile.U 3 4076/114 2496 4161/114 2463 4153/111 3289 Config_h.U : : size of the unit/number of lines in the unit size of the diff compared to the next column. Last diff is the size of the diff between dist-git and modified. Next steps will include updating dist/U from dist-git/mcon/U followed by the same updates from dist/U into U (our modified versions). That last step should either remove our modified version or result in feedback to Rafael in order to explain what we changed and why, hoping it'll find its way upstream so we can remove yet another modified unit not to maintain :) Expect a flurry of commits to dist/U where only comments and typoes are fixed. ----------------------------------------------------------------------- Summary of changes: dist/U/src.U | 8 ++++---- ls-diff.pl | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 ls-diff.pl diff --git a/dist/U/src.U b/dist/U/src.U index 10966b5..7eb0775 100644 --- a/dist/U/src.U +++ b/dist/U/src.U @@ -1,12 +1,12 @@ -?RCS: $Id: src.U 1 2006-08-24 12:32:52Z rmanfredi $ +?RCS: $Id$ ?RCS: ?RCS: Copyright (c) 1996, Cygnus Support ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Original Author: Tom Tromey <[email protected]> @@ -47,7 +47,7 @@ case "$src" in esac ?X: ?X: Now check whether we have found the right source tree (i.e. the one for the -?X: package we're abount to configure). The original unit from Tom Tromey forced +?X: package we're about to configure). The original unit from Tom Tromey forced ?X: the user to pick a unique file from his distribution, and we were merely ?X: checking the existence of that file. I prefer to rely on Configure (which ?X: we know *is* present since this unit is part of it!) and look for the diff --git a/ls-diff.pl b/ls-diff.pl new file mode 100644 index 0000000..4cb8f9e --- /dev/null +++ b/ls-diff.pl @@ -0,0 +1,65 @@ +#!/pro/bin/perl + +use 5.18.2; +use warnings; + +our $VERSION = "0.01"; + +sub usage { + my $err = shift and select STDERR; + say "usage: $0 [--list] [--diff]"; + exit $err; + } # usage + +use File::Find; +use Text::Diff; +use Getopt::Long qw(:config bundling); +GetOptions ( + "help|?" => sub { usage (0); }, + "V|version" => sub { say $0 =~ s{.*/}{}r, " [$VERSION]"; exit 0; }, + + "l|list!" => \my $opt_l, + "d|diff=s" => \my $opt_d, + ) or usage (1); + +my $pat = shift // "."; +$pat = qr{$pat}; + +my %m; + +foreach my $u ( [ "d", "dist/U" ], + [ "m", "U" ], + [ "g", "dist-git/mcon/U" ], + ) { + my ($t, $dir) = @$u; + find (sub { + -l $_ and return; + m/\.U$/ or return; + m{$pat} or return; + + my $u = do { local (@ARGV, $/) = $_; <> }; + $m{$_}{$t} = [ $File::Find::dir, $u, length ($u), ($u =~ tr/\n/\n/) ]; + }, $dir); + } + +$opt_d //= ""; + +say " # Git Dist Perl Diff Unit"; +say "=== ========= ====== ========= ====== ========= ====== ======================"; +my $i = 1; +foreach my $u (sort keys %m) { + my $d = $m{$u}{d} or next; + my $m = $m{$u}{m} or next; + my $g = $m{$u}{g} or next; + + printf "%3d %5d/%3d %6d %5d/%3d %6d %5d/%3d %6d %s\n", $i++, + $g->[2], $g->[3], length (diff (\$g->[1], \$d->[1])), + $d->[2], $d->[3], length (diff (\$d->[1], \$m->[1])), + $m->[2], $m->[3], length (diff (\$g->[1], \$m->[1])), + $u; + $opt_l and say " $m{$u}{$_}[0]/$u" for qw( g d m ); + + $opt_d eq "dm" and system "diff", "-w", "$d->[0]/$u", "$m->[0]/$u"; + $opt_d eq "dg" and system "diff", "-w", "$d->[0]/$u", "$g->[0]/$u"; + $opt_d eq "gm" and system "diff", "-w", "$g->[0]/$u", "$m->[0]/$u"; + } -- perl5 metaconfig repository
