[svk-commit] r2587 - branches/bm/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Mon Nov 5 03:49:26 EST 2007


Author: clsung
Date: Mon Nov  5 03:49:25 2007
New Revision: 2587

Modified:
   branches/bm/lib/SVK/Project.pm

Log:
- Guess project when already switched in local branched

Modified: branches/bm/lib/SVK/Project.pm
==============================================================================
--- branches/bm/lib/SVK/Project.pm	(original)
+++ branches/bm/lib/SVK/Project.pm	Mon Nov  5 03:49:25 2007
@@ -145,6 +145,12 @@
     my $depotname = $path_obj->depot->depotname;
     my ($path) = $path_obj->depotpath =~ m{^/$depotname/(.*?)(?:/(?:trunk|branches/.*?|tags/.*?))?/?$};
 
+    if ($path =~ m{^local/([^/]+)/?}) { # guess if in local branch
+	# should only be 1 entry
+	($path) = grep {/\/$1$/} $path_obj->depot->mirror->entries;
+	$path =~ s#^/##;
+    }
+
     while (!$project_name) {
 	($mirror_path,$project_name) = # always assume the last entry the projectname
 	    $path =~ m{^(.*)/([\w\-_]+)$}; 


More information about the svk-commit mailing list