I'm not sure if it's a bug in SVN or Codestriker, but the diff parser doesn't like "empty" files (files with 0 bytes). We sometimes have these in directories for various "tag" purposes. The SVN diff looks like this:
One index right after another. VERSION_1_0_2 was the empty file.
To fix, add these last three lines in SubversionDiff.pm
# The separator line appears next.
return () unless defined $line && $line =~ /^==========================$
$line = <$fh>;
#sometimes our VERSION_X_X_X files throw off svn and it prints out
#seemingly invalid diff files where there is an Index:, then
#separator, then another immediate Index:. Handle that case.
if ($line =~ /^Index: (.*)$/o) {
next;
}
Thanks for this software. Still playing around with it, but pretty cool so far.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm not sure if it's a bug in SVN or Codestriker, but the diff parser doesn't like "empty" files (files with 0 bytes). We sometimes have these in directories for various "tag" purposes. The SVN diff looks like this:
[snip]
Index: common/ToxicityReportingSystem/trunk/build/VERSION_1_0_2
===================================================================
Index: common/ToxicityReportingSystem/trunk/build/windows.properties
===================================================================
--- common/ToxicityReportingSystem/trunk/build/windows.properties (revision 14786)
+++ common/ToxicityReportingSystem/trunk/build/windows.properties (revision 14785)
[snip]
One index right after another. VERSION_1_0_2 was the empty file.
To fix, add these last three lines in SubversionDiff.pm
# The separator line appears next.
return () unless defined $line && $line =~ /^==========================$
$line = <$fh>;
#sometimes our VERSION_X_X_X files throw off svn and it prints out
#seemingly invalid diff files where there is an Index:, then
#separator, then another immediate Index:. Handle that case.
if ($line =~ /^Index: (.*)$/o) {
next;
}
Thanks for this software. Still playing around with it, but pretty cool so far.
Greg
Actually, it's more of a workaround than a fix since the empty file doesn't get added to the review... but it's empty, who cares!
Thanks again-
Greg
Thanks - I'll make sure this gets in to 1.9.3, and add it as another test case.