Wed Nov 5 23:18:18 2008 UTC ()
Ignore more uninteresting output.
Tries to address PR 39291.

Welcome to 0.121.


(wiz)
diff -r1.65 -r1.66 pkgsrc/pkgtools/pkgdiff/Makefile
diff -r1.9 -r1.10 pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl

cvs diff -r1.65 -r1.66 pkgsrc/pkgtools/pkgdiff/Makefile (expand / switch to context diff)
--- pkgsrc/pkgtools/pkgdiff/Makefile 2008/02/16 22:21:35 1.65
+++ pkgsrc/pkgtools/pkgdiff/Makefile 2008/11/05 23:18:18 1.66
@@ -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

cvs diff -r1.9 -r1.10 pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl (expand / switch to context diff)
--- pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2008/02/16 22:21:35 1.9
+++ pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2008/11/05 23:18:18 1.10
@@ -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";
 	}