[svk-commit] r2744 - branches/path-resolver/lib/SVK/Editor
nobody at bestpractical.com
nobody at bestpractical.com
Mon Apr 21 23:17:32 EDT 2008
Author: ruz
Date: Mon Apr 21 23:17:32 2008
New Revision: 2744
Modified:
branches/path-resolver/lib/SVK/Editor/Merge.pm
Log:
* add returned_back so we can bring resolver for all nested changes
* handle 'return_back' and 'returned_back' in close_directory
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 Mon Apr 21 23:17:32 2008
@@ -694,6 +694,7 @@
sub add_directory_back {
my ($self, @arg) = @_;
+ return unless $self->{return_back};
my @add = sort { length($a) <=> length($b) } keys %{ $self->{return_back} };
return unless @add;
@@ -703,7 +704,6 @@
$pdir =~ s{(?:/|^)[^/]+$}{};
foreach my $path(@add) {
-
my $baton = $self->{storage}->add_directory(
$path, $self->{storage_baton}{$pdir}, undef, -1, @arg
);
@@ -716,7 +716,11 @@
$self->{notify}->node_status ($path, 'A');
$pdir = $path;
}
- delete $self->{return_back};
+ if ( $self->{returned_back} ) {
+ $self->{returned_back} = { %{ $self->{returned_back} }, %{ delete $self->{return_back} } };
+ } else {
+ $self->{returned_back} = delete $self->{return_back};
+ }
}
@@ -767,13 +771,18 @@
no warnings 'uninitialized';
delete $self->{added}{$path};
+
+ $self->{notify}->node_status ($path, '')
+ if $self->{return_back}{$path};
+
$self->{notify}->flush_dir ($path);
+ return if delete $self->{return_back}{$path};
+ delete $self->{returned_back}{$path};
my $baton = $self->{storage_baton}{$path};
$self->cb_merged->( $self->{changes}, 'dir', $self->{ticket})
if $path eq $self->{target} && $self->cb_merged;
-
$self->{storage}->close_directory ($baton, $pool);
delete $self->{storage_baton}{$path}
unless $path eq '';
More information about the svk-commit
mailing list