Ticket #2149 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

Patches adding a single line are not shown correctly by patchfs

Reported by: zaytsev Owned by: andrew_b
Priority: major Milestone: 4.7.2
Component: mc-vfs Version: master
Keywords: Cc: kdave, zaytsev
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master committed-stable

Description (last modified by andrew_b) (diff)

Forwarded from Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551528

From: Jakub Wilk <ubanus@users.sf.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: mc: patches adding a single line are not shown correctly by patchfs
Date: Sun, 18 Oct 2009 22:14:57 +0200
$ cat < test.diff 
--- a/foo
+++ b/foo
@@ -0,0 +1 @@
+bar
$ mcview test.diff#patchfs/a/foo.diff 
--- a/foo
+++ b/foo

Change History

comment:1 Changed 14 years ago by andrew_b

  • Cc kdave added

These regression was introduced in #90 (changeset:b29e81556f67087955a9eceec45347d002c781f1)

comment:2 Changed 14 years ago by kdave

  • Status changed from new to accepted
  • Owner set to kdave

--- patchfs.in.orig 2010-04-23 17:37:50.000000000 +0200
+++ patchfs.in 2010-04-23 17:43:57.596590512 +0200
@@ -26,7 +26,7 @@ my $parsedates = eval 'require Date::Par

my $unified_header=qr/--- .*\n\+\+\+ .*\n$/;
my $unified_extract=qr/
--- ([\s]+).*\n\+\+\+ ([\s]+)\s*([\t\n]*)/;
my $unified_contents=qr/
([+\-
\n]|@@ .* @@)/;

-my $unified_hunk=qr/@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+)) @@.*\n/;
+my $unified_hunk=qr/@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*\n/;

my $context_header=qr/\*\*\* .*\n--- .*\n$/;
my $context_extract=qr/
\*\*\* ([\s]+).*\n--- ([\s]+)\s*([\t\n]*)/;

comment:3 follow-up: ↓ 4 Changed 14 years ago by kdave

uh, again

--- patchfs.in.orig     2010-04-23 17:37:50.000000000 +0200
+++ patchfs.in  2010-04-23 17:43:57.596590512 +0200
@@ -26,7 +26,7 @@ my $parsedates = eval 'require Date::Par
 my $unified_header=qr/^--- .*\n\+\+\+ .*\n$/;
 my $unified_extract=qr/^--- ([^\s]+).*\n\+\+\+ ([^\s]+)\s*([^\t\n]*)/;
 my $unified_contents=qr/^([+\-\\ \n]|@@ .* @@)/;
-my $unified_hunk=qr/@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+)) @@.*\n/;
+my $unified_hunk=qr/@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*\n/;

 my $context_header=qr/^\*\*\* .*\n--- .*\n$/;
 my $context_extract=qr/^\*\*\* ([^\s]+).*\n--- ([^\s]+)\s*([^\t\n]*)/;

comment:4 in reply to: ↑ 3 Changed 14 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • severity changed from no branch to on review
  • Cc zaytsev added
  • Keywords stable-candidate added
  • Milestone changed from 4.7 to 4.7.2
  • Owner changed from kdave to andrew_b

Thanks!

Created 2149_patchfs_single_line branch. Parent branch is master.
changeset:a62c59f431ed88988a37c720688883d161f05bd6

comment:5 Changed 14 years ago by zaytsev

Changeset: 73acb913eb245960d97591762f1af0db3c281378 (spelling errors in the commit message)

comment:6 Changed 14 years ago by zaytsev

  • Votes for changeset changed from andrew_b to andrew_b zaytsev

comment:7 Changed 14 years ago by zaytsev

  • severity changed from on review to approved

comment:8 Changed 14 years ago by andrew_b

  • Status changed from accepted to testing
  • Keywords stable-candidate removed
  • Votes for changeset changed from andrew_b zaytsev to commited-master commited-stable
  • Resolution set to fixed
  • severity changed from approved to merged

comment:9 Changed 14 years ago by andrew_b

  • Status changed from testing to closed
  • Description modified (diff)
Note: See TracTickets for help on using tickets.