[svk-commit] r2820 - in trunk: t/bm

nobody at bestpractical.com nobody at bestpractical.com
Wed May 7 08:41:41 EDT 2008


Author: clsung
Date: Wed May  7 08:41:40 2008
New Revision: 2820

Modified:
   trunk/lib/SVK/Command/Branch.pm
   trunk/t/bm/prop-setup.t

Log:
- verbose info
  - ref: http://task.hm/EALI/

Modified: trunk/lib/SVK/Command/Branch.pm
==============================================================================
--- trunk/lib/SVK/Command/Branch.pm	(original)
+++ trunk/lib/SVK/Command/Branch.pm	Wed May  7 08:41:40 2008
@@ -103,9 +103,6 @@
     } else {
         $target->root->check_path($target->path)
             or die loc("Path %1 does not exist.\n", $target->depotpath);
-        $logger->info(
-            loc("Project not found. use 'svk branch --setup %1' to initial.\n", $target->depotpath)
-        );
     }
 
     return;
@@ -121,7 +118,28 @@
     $fromProp = 1 if $proj;
     $proj ||= SVK::Project->create_from_path(
 	    $target->depot, $target->path );
-    return $proj;
+    return $proj if $proj;
+
+    if ($SVN::Node::dir == $target->root->check_path($target->_to_pclass($target->path)->subdir('trunk'))) {
+	my $possible_pname = $target->_to_pclass($target->path)->dir_list(-1);
+	$logger->info(
+	    loc("I found a \"trunk\" directory for project '%1', but I can't find a \"branches\" directory.",
+		$possible_pname)
+	);
+	$logger->info(
+	    loc('You should either run "svk mkdir %1/branches" to set up the standard',
+		$target->depotpath)
+	);
+	$logger->info(
+	    loc('project layout or run "svk br --setup %1" to specify an alternate layout.',
+		$target->depotpath)
+	);
+    } else {
+	$logger->info(
+	    loc("Project not found. use 'svk branch --setup %1' to initial.\n", $target->depotpath)
+	);
+    }
+    return ;
 }
 
 sub expand_branch {

Modified: trunk/t/bm/prop-setup.t
==============================================================================
--- trunk/t/bm/prop-setup.t	(original)
+++ trunk/t/bm/prop-setup.t	Wed May  7 08:41:40 2008
@@ -31,7 +31,9 @@
 
 chdir($copath);
 
-is_output ($svk, 'branch', ['--list', '//mirror/nomeans/A'], ['No project found.']);
+is_output ($svk, 'branch', ['--list', '//mirror/nomeans/A'],
+    ["Project not found. use 'svk branch --setup //mirror/nomeans/A' to initial.",
+     "No project found."]);
 #TODO: {
 #local $TODO = 'Need to implement br --setup ';
 $answer = ['', '','/A-b',''];


More information about the svk-commit mailing list