[svk-commit] r2264 - branches/2.0-releng/lib/SVK/Path

nobody at bestpractical.com nobody at bestpractical.com
Sun Dec 24 10:42:14 EST 2006


Author: clkao
Date: Sun Dec 24 10:42:13 2006
New Revision: 2264

Modified:
   branches/2.0-releng/lib/SVK/Path/Checkout.pm

Log:
Unbreak previous commit.

Modified: branches/2.0-releng/lib/SVK/Path/Checkout.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/Path/Checkout.pm	(original)
+++ branches/2.0-releng/lib/SVK/Path/Checkout.pm	Sun Dec 24 10:42:13 2006
@@ -106,9 +106,13 @@
     my (undef, $coroot) = $self->xd->{checkout}->get($copath, 1);
     Carp::cluck $copath.YAML::Syck::Dump($self->xd->{checkout}) unless $coroot;
     my @paths = $self->xd->{checkout}->find($coroot, {revision => qr'.*'});
-    my $tmp = $self->_to_pclass($copath)->relative($coroot)->as_foreign('Unix');
+
+    my $tmp = $self->_to_pclass($copath)->relative($coroot)->as_foreign('Unix')->absolute('/');
+    $tmp = '' if $tmp eq '/';
+
     my $coroot_path = $self->path;
-    $coroot_path =~ s/\Q$tmp\E$//;
+    $coroot_path =~ s/\Q$tmp\E$// or return $self->source->root;
+    $coroot_path = '/' unless length $coroot_path;
 
     my $base_root = $self->source->root;
     return $base_root if $#paths <= 0;


More information about the svk-commit mailing list