[svk-commit] r2159 - in trunk: t

clkao at bestpractical.com clkao at bestpractical.com
Fri Nov 17 20:47:31 EST 2006


Author: clkao
Date: Fri Nov 17 20:47:31 2006
New Revision: 2159

Modified:
   trunk/lib/SVK/Command/Depotmap.pm
   trunk/t/01depotmap.t

Log:
Fix error messages in depot --relocate.

Modified: trunk/lib/SVK/Command/Depotmap.pm
==============================================================================
--- trunk/lib/SVK/Command/Depotmap.pm	(original)
+++ trunk/lib/SVK/Command/Depotmap.pm	Fri Nov 17 20:47:31 2006
@@ -25,10 +25,11 @@
     return undef
 	unless $self->{add} or $self->{detach} or $self->{relocate};
 
-        @arg or die loc("Need to specify a depot name");
+        @arg or die loc("Need to specify a depot name.\n");
 
         my $depot = shift(@arg);
-        @arg or die loc("Need to specify a path name") unless $self->{detach};
+        @arg or die loc("Need to specify a path name for depot.\n")
+            unless $self->{detach};
 
         my $map = $self->{xd}{depotmap};
         my $path = $depot;

Modified: trunk/t/01depotmap.t
==============================================================================
--- trunk/t/01depotmap.t	(original)
+++ trunk/t/01depotmap.t	Fri Nov 17 20:47:31 2006
@@ -3,7 +3,7 @@
 use SVK::Util qw( catdir tmpdir );
 use File::Spec;
 use SVK::Test;
-plan tests => 17;
+plan tests => 18;
 
 our ($answer, $output, @TOCLEAN);
 my $xd = SVK::XD->new (depotmap => {},
@@ -51,6 +51,9 @@
 is_output ($svk, 'depotmap', ['//', $repospath],
 	   ["Depot '' already exists; use 'svk depotmap --detach' to remove it first."], 'depotpath - add again');
 
+is_output ($svk, 'depotmap', ['--relocate', '//'],
+	   ["Need to specify a path name for depot."]);
+
 $answer = 'n';
 is_output ($svk, 'depotmap', ['--relocate', '//', "$repospath.new"],
 	   [__("Depot '' relocated to '$repospath.new'.")], 'depotpath - relocate');


More information about the svk-commit mailing list