[svk-commit] r2792 - trunk/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Mon May 5 01:06:07 EDT 2008


Author: clsung
Date: Mon May  5 01:06:06 2008
New Revision: 2792

Modified:
   trunk/lib/SVK/Project.pm

Log:
- get the realy preceding path of the mirror

Modified: trunk/lib/SVK/Project.pm
==============================================================================
--- trunk/lib/SVK/Project.pm	(original)
+++ trunk/lib/SVK/Project.pm	Mon May  5 01:06:06 2008
@@ -127,8 +127,14 @@
 
     my $fs              = $pathobj->depot->repos->fs;
     my $root            = $fs->revision_root( $fs->youngest_rev );
-    my ($prop_path)     = $root->node_prop('/','svm:mirror') =~ m/^(\S+)\s+$/;
-    $prop_path ||= '/';
+    my @all_mirrors     = split "\n", $root->node_prop('/','svm:mirror');
+    my $prop_path = '/';
+    foreach my $m_path (@all_mirrors) {
+        if ($pathobj->path =~ m/^$m_path/) {
+            $prop_path = $m_path;
+            last;
+        }
+    }
     my $allprops        = $root->node_proplist($prop_path);
     my ($depotroot)     = '/';
     my %projnames = 


More information about the svk-commit mailing list