[svk-commit] r3114 - branches/delta-refactor/lib/SVK/Root
nobody at bestpractical.com
nobody at bestpractical.com
Mon Nov 3 05:19:38 EST 2008
Author: clkao
Date: Mon Nov 3 05:19:38 2008
New Revision: 3114
Modified:
branches/delta-refactor/lib/SVK/Root/Checkout.pm
Log:
Make root::checkout able to represent obstruct node.
Modified: branches/delta-refactor/lib/SVK/Root/Checkout.pm
==============================================================================
--- branches/delta-refactor/lib/SVK/Root/Checkout.pm (original)
+++ branches/delta-refactor/lib/SVK/Root/Checkout.pm Mon Nov 3 05:19:38 2008
@@ -73,11 +73,23 @@
my ($copath,$root) = $self->_get_copath($path, $pool);
lstat ($copath);
- return $SVN::Node::none unless -e _;
+ my $sche;
+
+ if (!-e _) {
+ # If the path exist in the base of the checkout, and is not scheduled for deletion,
+ # make it unknown
+ return $SVN::Node::none
+ if !$root->check_path($path, $pool);
+ $sche = $self->path->xd->{checkout}->get($copath, 1)->{'.schedule'} || '';
+ return $sche eq 'delete' ? $SVN::Node::none : $SVN::Node::unknown;
+ }
+
+ $sche = $self->path->xd->{checkout}->get($copath, 1)->{'.schedule'}
+ unless defined $sche;
return (is_symlink || -f _) ? $SVN::Node::file : $SVN::Node::dir
if $self->path->xd->{checkout}->get($copath, 1)->{'.schedule'} or
- $root->check_path($path, $pool);
+ $root->check_path($path, $pool) ;
return $SVN::Node::unknown;
}
@@ -150,11 +162,12 @@
next if m/^\.+$/;
lstat $_;
my $kind = -d _ ? $SVN::Node::dir : $SVN::Node::file;
- if ($entries->{$_}) {
+ if ($entries->{$_} && $kind == $entries->{$_}->kind) {
$coentries->{$_} = $entries->{$_};
}
else {
- # Do we know about the node?
+ # See if we know about the node. If type mismatch, we
+ # make it unknown to represent obstruct node
$coentries->{$_} = SVK::Root::Checkout::Entry->new
({ kind => $self->path->xd->{checkout}->get("$copath/$_", 1)->{'.schedule'} ?
$kind : $SVN::Node::unknown });
More information about the svk-commit
mailing list