[svk-commit] r2591 - branches/bm/lib/SVK/Command

nobody at bestpractical.com nobody at bestpractical.com
Wed Nov 7 04:31:56 EST 2007


Author: clsung
Date: Wed Nov  7 04:31:18 2007
New Revision: 2591

Modified:
   branches/bm/lib/SVK/Command/Branch.pm

Log:
- not to create if there's already a named branch

Modified: branches/bm/lib/SVK/Command/Branch.pm
==============================================================================
--- branches/bm/lib/SVK/Command/Branch.pm	(original)
+++ branches/bm/lib/SVK/Command/Branch.pm	Wed Nov  7 04:31:18 2007
@@ -148,6 +148,11 @@
 	$source->path
     );
 
+    if (grep {/^$branch_path$/} @{$proj->branches}) {
+	print loc("Project branch already exists: %1\n", $branch_path);
+	return;
+    }
+
     my $trunk_path = '/'.$proj->depot->depotname.'/'.$proj->trunk;
     my $newbranch_path = '/'.$proj->depot->depotname.'/'.
 	( $self->{local} ? $proj->local_root : $proj->branch_location ).


More information about the svk-commit mailing list