[svk-commit] r2742 - branches/path-resolver/lib/SVK/Editor
nobody at bestpractical.com
nobody at bestpractical.com
Mon Apr 21 22:16:45 EDT 2008
Author: ruz
Date: Mon Apr 21 22:16:44 2008
New Revision: 2742
Modified:
branches/path-resolver/lib/SVK/Editor/Merge.pm
Log:
* add 'add_directory_back' that returns back list of directories
we collected
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 22:16:44 2008
@@ -692,6 +692,34 @@
return $path;
}
+sub add_directory_back {
+ my ($self, @arg) = @_;
+
+ my @add = sort { length($a) <=> length($b) } keys %{ $self->{return_back} };
+ return unless @add;
+
+ # XXX: do we have better way?
+ my $pdir = $add[0];
+ $pdir =~ s{(?:/|^)[^/]+$}{};
+
+ foreach my $path(@add) {
+
+ my $baton = $self->{storage}->add_directory(
+ $path, $self->{storage_baton}{$pdir}, undef, -1, @arg
+ );
+ unless (defined $baton) {
+ $logger->error("no baton");
+ last;
+ }
+ $self->{storage_baton}{$path} = $baton;
+ $self->{added}{$path} = 1;
+ $self->{notify}->node_status ($path, 'A');
+ $pdir = $path;
+ }
+ delete $self->{return_back};
+}
+
+
sub resolve_copy {
my ($self, $path, $from, $rev) = @_;
die "unknown copy $from $rev for $path"
More information about the svk-commit
mailing list