pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkgdiff Ignore more uninteresting output.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c0277e5a4df5
branches:  trunk
changeset: 549609:c0277e5a4df5
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Nov 05 23:18:18 2008 +0000

description:
Ignore more uninteresting output.
Tries to address PR 39291.

Welcome to 0.121.

diffstat:

 pkgtools/pkgdiff/Makefile           |   4 ++--
 pkgtools/pkgdiff/files/patchdiff.pl |  21 ++++++++++++++++++---
 2 files changed, 20 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 6814b4e9d4b4 -r c0277e5a4df5 pkgtools/pkgdiff/Makefile
--- a/pkgtools/pkgdiff/Makefile Wed Nov 05 22:50:16 2008 +0000
+++ b/pkgtools/pkgdiff/Makefile Wed Nov 05 23:18:18 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.65 2008/02/16 22:21:35 apb Exp $
+# $NetBSD: Makefile,v 1.66 2008/11/05 23:18:18 wiz Exp $
 #
 
-DISTNAME=      pkgdiff-0.120
+DISTNAME=      pkgdiff-0.121
 CATEGORIES=    pkgtools devel
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 6814b4e9d4b4 -r c0277e5a4df5 pkgtools/pkgdiff/files/patchdiff.pl
--- a/pkgtools/pkgdiff/files/patchdiff.pl       Wed Nov 05 22:50:16 2008 +0000
+++ b/pkgtools/pkgdiff/files/patchdiff.pl       Wed Nov 05 23:18:18 2008 +0000
@@ -1,6 +1,6 @@
 #!@PERL5@
 #
-# $NetBSD: patchdiff.pl,v 1.9 2008/02/16 22:21:35 apb Exp $
+# $NetBSD: patchdiff.pl,v 1.10 2008/11/05 23:18:18 wiz Exp $
 #
 # patchdiff: compares a set of patches patch-aa, patch-ab, ... in
 #   $WRKDIR/.newpatches in the with another set in patches.
@@ -96,8 +96,23 @@
     if (defined($orig{$patch})) {
 #      system("diff",$orig{$patch},$new{$patch});
        $diff=`diff $orig{$patch} $new{$patch}`;
-       $diff=~s/^\dc\d\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m;
-       $diff=~s/^\dc\d\n..\+\+\+.*\n---\n..\+\+\+.*\n//m;
+       # the following regex try to eliminate uninteresting differences
+       # The general structure of the diffs-to-be-removed is:
+       # 25c25
+       # < --- something.orig 2008-08-08 08:08
+       # ---
+       # > --- something.orig 2008-08-08 18:08
+       #
+       # In particular, remove hunks with:
+       # . NetBSD RCS Id tag differences
+       $diff=~s/^\d+c\d+\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m;
+       # . only the name or date of the output file changed
+       $diff=~s/^\d+c\d+\n..\+\+\+.*\n---\n..\+\+\+.*\n//m;
+       # . only the name or date of the input file changed
+       $diff=~s/^\d+c\d+\n.\s---\s.*\.orig\s.*\n---\n.\s---\s.*\n//m;
+       $diff=~s/^\d+c\d+\n.\s---\s.*\n---\n.\s---\s.*\.orig\s.*\n//m;
+       # . only line numbers changed
+       $diff=~s/^\d+c\d+\n.\s@@\s.*\s@@.*\n---\n.\s@@\s.*\s@@.*\n//mg;
        if ($diff) {
             print "Comparing $orig{$patch} to $new{$patch}\n$diff";
        }



Home | Main Index | Thread Index | Old Index