Skip Menu |
 

This queue is for tickets about the PatchReader CPAN distribution.

Report information
The Basics
Id: 47625
Status: resolved
Priority: 0/
Queue: PatchReader

People
Owner: tmannerm [...] cpan.org
Requestors: filbranden [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.9.5
Fixed in: 0.9.6



Subject: File names not preserved in patch created with concatenated "diff -u"'s
Download (untitled) / with headers
text/plain 694b
If a patch is created by concatenating the output of several "diff -u"'s, it will be a valid patch, however PatchReader will not get the separate file names and will only print one of them. A patch with this issue looks like this: --- filename.c.orig 2009-05-03 +++ filename.c 2009-06-07 @@ -3,5 +3,5 @@ aaa bbb -ccc +ddd eee fff --- otherfile.h.orig 2009-05-03 +++ otherfile.h 2009-06-07 @@ -4,5 +4,5 @@ 111 222 -333 +444 555 666 I was able to fix it by triggering a "_maybe_end_file" where the /^---/ regular expression is found in Raw.pm. I am attaching a patch to fix this issue. Thanks, Filipe
Subject: patchreader_filename.patch
--- Raw.pm.orig 2004-07-17 03:14:35.000000000 -0400 +++ Raw.pm 2009-07-06 14:57:52.000000000 -0400 @@ -42,6 +42,7 @@ # patch header parsing if ($line =~ /^---\s*(\S+)\s*\t([^\t\r\n]*)\s*(\S*)/) { + $this->_maybe_end_file(); if ($1 eq "/dev/null") { $this->{FILE_STATE}{is_add} = 1; } else {


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.