User: sits
Date: 07/06/28 22:38:31
Modified: . CHANGELOG
lib/Codestriker/FileParser PatchBasicDiff.pm PatchUnidiff.pm
Added: test/testtopictexts differing_binaries.patch
Log:
Improved patch file parsing for handling binary file changes.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -r1.203 -r1.204
--- CHANGELOG 28 Jun 2007 07:01:07 -0000 1.203
+++ CHANGELOG 29 Jun 2007 05:38:30 -0000 1.204
@@ -13,6 +13,8 @@
* Support subversion diff files which contain "Copied:" entries.
+* Improved patch file parsing for handling binary file changes.
+
Version 1.9.3
* The project list screen now displays for each project, the total
Index: differing_binaries.patch
===================================================================
RCS file: differing_binaries.patch
diff -N differing_binaries.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ differing_binaries.patch 29 Jun 2007 05:38:30 -0000 1.1
@@ -0,0 +1,13 @@
+diff -rNu tmp/b1 tmp2/b1
+--- tmp/b1 2007-06-25 13:18:01.010674300 +0200
++++ tmp2/b1 2007-06-25 13:18:11.073401100 +0200
+@@ -1 +1 @@
+-hi
++hi2
+Files tmp/b1.exe and tmp2/b1.exe differ
+diff -rNu tmp/f1 tmp2/f1
+--- tmp/f1 2007-06-25 13:11:41.722741900 +0200
++++ tmp2/f1 2007-06-25 13:12:20.016828700 +0200
+@@ -1 +1 @@
+-some file text
++some file text a
Index: PatchBasicDiff.pm
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/PatchBasicDiff.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PatchBasicDiff.pm 5 Jun 2004 10:03:00 -0000 1.1
+++ PatchBasicDiff.pm 29 Jun 2007 05:38:30 -0000 1.2
@@ -58,7 +58,8 @@
# Unfortunately, when you provide the "-N" argument to diff,
# it doesn't indicate new files or removed files properly. Without
# the -N argument, it then indicates "Only in ...".
- if ($line =~ /^Binary files .* and (.*) differ$/) {
+ if ($line =~ /^Binary files .* and (.*) differ$/ ||
+ $line =~ /^Files .* and (.*) differ$/) {
$filename = $1;
$binary = 1;
} elsif ($line =~ /^Only in (.*): (.*)$/) {
Index: PatchUnidiff.pm
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/PatchUnidiff.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PatchUnidiff.pm 31 Mar 2003 12:49:02 -0000 1.4
+++ PatchUnidiff.pm 29 Jun 2007 05:38:31 -0000 1.5
@@ -51,7 +51,8 @@
# Unfortunately, when you provide the "-N" argument to diff,
# it doesn't indicate new files or removed files properly. Without
# the -N argument, it then indicates "Only in ...".
- if ($line =~ /^Binary files .* and (.*) differ$/) {
+ if ($line =~ /^Binary files .* and (.*) differ$/ ||
+ $line =~ /^Files .* and (.*) differ$/) {
$filename = $1;
$binary = 1;
} elsif ($line =~ /^Only in (.*): (.*)$/) {
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits