[svk-commit] r2378 - in trunk/lib/SVK: . Mirror/Backend
nobody at bestpractical.com
nobody at bestpractical.com
Sun Apr 8 04:08:40 EDT 2007
Author: clkao
Date: Sun Apr 8 04:08:40 2007
New Revision: 2378
Modified:
trunk/lib/SVK/Editor/MapRev.pm
trunk/lib/SVK/Mirror/Backend/SVNRa.pm
trunk/lib/SVK/Path.pm
trunk/lib/SVK/XD.pm
Log:
Use wrap_without_copy.
Modified: trunk/lib/SVK/Editor/MapRev.pm
==============================================================================
--- trunk/lib/SVK/Editor/MapRev.pm (original)
+++ trunk/lib/SVK/Editor/MapRev.pm Sun Apr 8 04:08:40 2007
@@ -80,4 +80,16 @@
$self->$func(@arg);
}
+sub wrap_without_copy {
+ my ($class, $editor, $revision) = @_;
+ return $class->new(
+ { _editor => [$editor],
+ cb_resolve_rev => sub {
+ my ( $func, $rev ) = @_;
+ return $func =~ m/^add/ ? $rev : $target->revision;
+ }
+ }
+ );
+}
+
1;
Modified: trunk/lib/SVK/Mirror/Backend/SVNRa.pm
==============================================================================
--- trunk/lib/SVK/Mirror/Backend/SVNRa.pm (original)
+++ trunk/lib/SVK/Mirror/Backend/SVNRa.pm Sun Apr 8 04:08:40 2007
@@ -511,14 +511,7 @@
sub _get_sync_editor {
my ($self, $editor, $target) = @_;
- $editor = SVK::Editor::MapRev->new(
- { _editor => [$editor],
- cb_resolve_rev => sub {
- my ( $func, $rev ) = @_;
- return $func =~ m/^add/ ? $rev : $target->revision;
- }
- }
- );
+ $editor = SVK::Editor::MapRev->wrap_without_copy($editor $target->revision);
$editor = SVK::Editor::CopyHandler->new(
_editor => $editor,
Modified: trunk/lib/SVK/Path.pm
==============================================================================
--- trunk/lib/SVK/Path.pm (original)
+++ trunk/lib/SVK/Path.pm Sun Apr 8 04:08:40 2007
@@ -118,7 +118,6 @@
$self->_root(SVK::Root->new({ root => $self->repos->fs->revision_root
($self->revision, $pool) }))
unless $self->_root;
-
return $self->_root;
}
@@ -253,14 +252,7 @@
my ($base_rev, $editor) = $m->get_merge_back_editor
($mpath, $arg{message}, $mcallback);
$editor->{_debug}++ if $logger->is_debug();
- $editor = SVK::Editor::MapRev->new(
- { _editor => [$editor],
- cb_resolve_rev => sub {
- my ( $func, $rev ) = @_;
- return $func =~ m/^add/ ? $rev : $root_baserev;
- }
- });
-
+ $editor = SVK::Editor::MapRev->wrap_without_copy($editor, $root_baserev);
# XXX: fix me, need local knowledge about txn as well
return ($editor, $self->inspector,
mirror => $m,
Modified: trunk/lib/SVK/XD.pm
==============================================================================
--- trunk/lib/SVK/XD.pm (original)
+++ trunk/lib/SVK/XD.pm Sun Apr 8 04:08:40 2007
@@ -1523,7 +1523,7 @@
};
my ($entry) = $self->get_entry($arg{copath}, 1);
- my $baton = $arg{editor}->open_root ($entry->{revision})
+ my $baton = $arg{editor}->open_root ($entry->{revision});
$self->_delta_dir (%arg, baton => $baton, root => 1, base => 1, type => 'directory');
$arg{editor}->close_directory ($baton);
$arg{editor}->close_edit ();
More information about the svk-commit
mailing list