aboutsummaryrefslogtreecommitdiffstats
path: root/devel/p5-PatchReader/files
diff options
context:
space:
mode:
authormva <mva@FreeBSD.org>2015-02-21 17:33:09 +0800
committermva <mva@FreeBSD.org>2015-02-21 17:33:09 +0800
commit28eaf8d26e1873658f1981efb326fdf78f08b36e (patch)
tree45e49be34f931b7db5aa9ee80f43a382dea2c227 /devel/p5-PatchReader/files
parent2678730c8a3a8ee6a237b2751ae46fdf5bb4371f (diff)
downloadfreebsd-ports-gnome-28eaf8d26e1873658f1981efb326fdf78f08b36e.tar.gz
freebsd-ports-gnome-28eaf8d26e1873658f1981efb326fdf78f08b36e.tar.zst
freebsd-ports-gnome-28eaf8d26e1873658f1981efb326fdf78f08b36e.zip
- Ignore SVN property changes in PatchReader::Raw. They were mistaken
for line changes of the original patch. - This fixes Bugzilla's patch viewer not to show SVN property changes as line additions or removals of a file. PR: 197607 Reported by: dim@ Approved by: toni.viemero@iki.fi (maintainer)
Diffstat (limited to 'devel/p5-PatchReader/files')
-rw-r--r--devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm24
1 files changed, 21 insertions, 3 deletions
diff --git a/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm b/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm
index 84b6ff5a2e2e..78368a15df89 100644
--- a/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm
+++ b/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm
@@ -1,15 +1,33 @@
---- lib/PatchReader/Raw.pm.orig 2014-09-20 06:54:09 UTC
+--- lib/PatchReader/Raw.pm.orig 2015-02-19 16:02:48 UTC
+++ lib/PatchReader/Raw.pm
-@@ -41,7 +41,7 @@
+@@ -40,8 +40,25 @@ sub next_line {
+
return if $line =~ /^\?/;
++ # FreeBSD bug #197607 - svn property changes are
++ # displayed as line additions in Bugzilla. We'll
++ # just ignore the whole property section.
++ if ($this->{in_prop} == 1) {
++ if ($line =~ /^Index:\s*([\S ]+)/) {
++ # End of property changes, continue normally.
++ $this->{in_prop} = 0;
++ } else {
++ # Ignore property lines
++ return;
++ }
++ } elsif ($line =~ /^Property changes on:.*$/) {
++ # SVN property changes, skip everything until the next index...
++ $this->{in_prop} = 1;
++ return;
++ }
++
# patch header parsing
- if ($line =~ /^---\s*([\S ]+)\s*\t([^\t\r\n]*)\s*(\S*)/) {
+ if ($line =~ /^---\s+([\S ]+)\s*?(?:\t([^\t\r\n]*)\s*(\S*))?/) {
$this->_maybe_end_file();
if ($1 eq "/dev/null") {
-@@ -54,9 +54,11 @@
+@@ -54,9 +71,11 @@ sub next_line {
$this->{IN_HEADER} = 1;