[svk-commit] r2492 - in branches/2.0-releng/lib/SVK: .

nobody at bestpractical.com nobody at bestpractical.com
Tue Jul 17 11:59:47 EDT 2007


Author: clkao
Date: Tue Jul 17 11:59:46 2007
New Revision: 2492

Modified:
   branches/2.0-releng/lib/SVK/Command.pm
   branches/2.0-releng/lib/SVK/Command/Diff.pm

Log:
merge from trunk:
 r2400 at trunk:  clkao | 2007-06-01 23:54:55 +0100
 svk diff -r:123 should report invalid -r rather than blow up.
 
 Reported by: nelhage
 


Modified: branches/2.0-releng/lib/SVK/Command.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/Command.pm	(original)
+++ branches/2.0-releng/lib/SVK/Command.pm	Tue Jul 17 11:59:46 2007
@@ -1147,6 +1147,8 @@
             die loc ("Invalid -r.\n");
         } else {
             $revspec = [map {split /:/} @$revspec];
+            # reject -r :123
+            die loc ("Invalid -r.\n") unless length $revspec->[0];
             ($r1, $r2) = map {
                 $self->resolve_revision($target,$_);
             } @$revspec;

Modified: branches/2.0-releng/lib/SVK/Command/Diff.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/Command/Diff.pm	(original)
+++ branches/2.0-releng/lib/SVK/Command/Diff.pm	Tue Jul 17 11:59:46 2007
@@ -104,7 +104,7 @@
 	    $target2 = $target->new;
 	    $report = $target->report; # get the report before it turns to depotpath
 	    $target = $target->as_depotpath;
-	    $target = $target->seek_to($r1) if $r1;
+	    $target = $target->seek_to($r1) if defined $r1;
 	    $target2 = $target->as_depotpath->seek_to($r2) if $r2;
 	    # if no revision is specified, use the xdroot as target1's root
 	    $oldroot = $target2->create_xd_root unless $r1 || $r2;


More information about the svk-commit mailing list