There is a small bug with parallel when using a perforce repository,
actually this seem to be broken for any repo.
When doing a parallel view codestriker will pull the current version of
the file from perforce and placing each line of the file into an array.
When codestriker is displaying the common parts of the file when doing
a side by side diff it was using the run line number of the previous
version of the file.
Since the line numbers and the actual lines in the array do not
correspond now this resulted in missing lines.
Patch attached.
Also added a check to make sure there are actual lines in the file array
since a failed p4 print would result in an empty array and then a side
by side diff with a bunch of blank lines.
-Russell Cattelan
Index: codestriker/lib/Codestriker/Action/ViewTopicFile.pm
===================================================================
--- codestriker.orig/lib/Codestriker/Action/ViewTopicFile.pm 2007-07-16 14:13:31.872872000 -0500
+++ codestriker/lib/Codestriker/Action/ViewTopicFile.pm 2007-07-16 14:23:09.227613000 -0500
@@ -146,7 +146,9 @@ sub process($$$) {
my $next_delta_linenumber = $delta->{old_linenumber};
for (my $i = $render->{old_linenumber};
$i < $next_delta_linenumber; $i++) {
+ if ( $filedata[$i]) {
$delta_text .= " $filedata[$i]\n";
+ }
}
$render->delta_text($filename, $fn, $revision,
$render->{old_linenumber},
@@ -162,7 +164,7 @@ sub process($$$) {
# Render the tail part of the file, again by building up a delta.
my $delta_text = "";
- for (my $i = $render->{old_linenumber}; $i <= $#filedata; $i++) {
+ for (my $i = $render->{new_linenumber}; $i <= $#filedata; $i++) {
$delta_text .= " $filedata[$i]\n";
}
$render->delta_text($filename, $fn, $revision, $render->{old_linenumber},
-------------------------------------------------------------------------
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-user mailing list
Codestriker-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/codestriker-user