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

nobody at bestpractical.com nobody at bestpractical.com
Thu Jul 17 15:11:26 EDT 2008


Author: clkao
Date: Thu Jul 17 15:11:18 2008
New Revision: 2996

Modified:
   trunk/lib/SVK/Depot.pm

Log:
fix mpath for mirror on root that caused base merge base entry.


Modified: trunk/lib/SVK/Depot.pm
==============================================================================
--- trunk/lib/SVK/Depot.pm	(original)
+++ trunk/lib/SVK/Depot.pm	Thu Jul 17 15:11:18 2008
@@ -106,6 +106,11 @@
 	my $mpath = $spec;
 	return ($m, '') if $mpath eq $mspec;
 	next unless $mpath =~ s{^\Q$mspec\E/}{/};
+
+        # the common usage for $mpath is $m->path . $mpath, so if the
+        # mirror is anchored on /, we need to get rid of the leading /
+        # in $mpath.
+        $mpath = substr($mpath, 1) if $m->path eq '/';
 	$mpath = '' if $mpath eq '/'; # XXX: why still need this?
 	return ($m, $mpath);
     }


More information about the svk-commit mailing list