Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2015 09:33:10 +0000 (UTC)
From:      Marcus von Appen <mva@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r379493 - in head/devel/p5-PatchReader: . files
Message-ID:  <201502210933.t1L9XAaV042472@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mva
Date: Sat Feb 21 09:33:09 2015
New Revision: 379493
URL: https://svnweb.freebsd.org/changeset/ports/379493
QAT: https://qat.redports.org/buildarchive/r379493/

Log:
  - 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)

Modified:
  head/devel/p5-PatchReader/Makefile
  head/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm

Modified: head/devel/p5-PatchReader/Makefile
==============================================================================
--- head/devel/p5-PatchReader/Makefile	Sat Feb 21 08:46:47 2015	(r379492)
+++ head/devel/p5-PatchReader/Makefile	Sat Feb 21 09:33:09 2015	(r379493)
@@ -3,7 +3,7 @@
 
 PORTNAME=	PatchReader
 PORTVERSION=	0.9.6
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel perl5
 MASTER_SITES=	CPAN
 MASTER_SITE_SUBDIR=	CPAN:TMANNERM

Modified: head/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm
==============================================================================
--- head/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm	Sat Feb 21 08:46:47 2015	(r379492)
+++ head/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm	Sat Feb 21 09:33:09 2015	(r379493)
@@ -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;
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502210933.t1L9XAaV042472>