[Codestriker-commits] CVS update: codestriker/lib/Codestriker/FileParser Parser.pm VssDiff.pm
Brought to you by:
sits
|
From: <si...@us...> - 2004-11-12 07:18:49
|
User: sits
Date: 04/11/11 23:18:41
Modified: lib/Codestriker/FileParser Parser.pm VssDiff.pm
Log:
Set uploaded_file if blank in Parse.pm. This is useful for those
topic diffs created by an SCM which could not be parsed, or resulted
in no diff chunks.
Index: Parser.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/Parser.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Parser.pm 12 Nov 2004 03:11:16 -0000 1.16
+++ Parser.pm 12 Nov 2004 07:18:39 -0000 1.17
@@ -142,6 +142,9 @@
# Last stop-gap - the file format is unknown, treat it as a
# single file with filename "unknown".
if ($#diffs == -1) {
+ if (! defined $uploaded_filename || $uploaded_filename eq '') {
+ $uploaded_filename = 'unknown.txt';
+ }
seek($tmpfh, 0, 0) ||
die "Unable to seek to the start of the temporary file: $!";
@diffs = Codestriker::FileParser::UnknownFormat->
Index: VssDiff.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/VssDiff.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- VssDiff.pm 12 Nov 2004 04:07:22 -0000 1.7
+++ VssDiff.pm 12 Nov 2004 07:18:39 -0000 1.8
@@ -61,7 +61,7 @@
# The next part of the diff will be the old style diff format, or
# possibly "No differences." if there are no differences.
$line = <$fh>;
- if ($line !~ /^No differences\./) {
+ if ($line !~ /^No differences\./o) {
my $chunk;
do
{
|