[svk-commit] r2749 - branches/path-resolver/lib/SVK/Editor
nobody at bestpractical.com
nobody at bestpractical.com
Tue Apr 22 05:59:08 EDT 2008
Author: ruz
Date: Tue Apr 22 05:59:07 2008
New Revision: 2749
Modified:
branches/path-resolver/lib/SVK/Editor/Merge.pm
Log:
* add $skip_tail argument to add_directory_back
Modified: branches/path-resolver/lib/SVK/Editor/Merge.pm
==============================================================================
--- branches/path-resolver/lib/SVK/Editor/Merge.pm (original)
+++ branches/path-resolver/lib/SVK/Editor/Merge.pm Tue Apr 22 05:59:07 2008
@@ -680,7 +680,7 @@
}
sub add_directory_back {
- my ($self, @arg) = @_;
+ my ($self, $skip_tail, @arg) = @_;
return unless $self->{return_back};
my @add = sort { length($a) <=> length($b) } keys %{ $self->{return_back} };
@@ -690,9 +690,10 @@
my $pdir = $add[0];
$pdir =~ s{(?:/|^)[^/]+$}{};
+ my $pool = pop @arg;
foreach my $path(@add) {
my $baton = $self->{storage}->add_directory(
- $path, $self->{storage_baton}{$pdir}, undef, -1, @arg
+ $path, $self->{storage_baton}{$pdir}, undef, -1, $pool
);
unless (defined $baton) {
$logger->error("no baton");
@@ -703,11 +704,9 @@
$self->{notify}->node_status ($path, 'A');
$pdir = $path;
}
- if ( $self->{returned_back} ) {
- $self->{returned_back} = { %{ $self->{returned_back} }, %{ delete $self->{return_back} } };
- } else {
- $self->{returned_back} = delete $self->{return_back};
- }
+ delete $self->{return_back};
+ pop @add if $skip_tail;
+ $self->{returned_back}{$_} = 1 foreach @add;
}
More information about the svk-commit
mailing list