[svk-commit] r3017 - in trunk/lib/SVK: Mirror/Backend

nobody at bestpractical.com nobody at bestpractical.com
Mon Jul 28 10:09:04 EDT 2008


Author: clkao
Date: Mon Jul 28 10:09:04 2008
New Revision: 3017

Modified:
   trunk/lib/SVK/Mirror/Backend/SVNRa.pm
   trunk/lib/SVK/Path.pm

Log:
bypass additional opts to svk::mirror->get_commit_editor,
so we can send lock_token along commits with the API.


Modified: trunk/lib/SVK/Mirror/Backend/SVNRa.pm
==============================================================================
--- trunk/lib/SVK/Mirror/Backend/SVNRa.pm	(original)
+++ trunk/lib/SVK/Mirror/Backend/SVNRa.pm	Mon Jul 28 10:09:04 2008
@@ -820,7 +820,7 @@
 }
 
 sub get_commit_editor {
-    my ($self, $path, $msg, $committed) = @_;
+    my ($self, $path, $msg, $committed, $opts) = @_;
     die loc("relayed merge back not supported yet.\n") if $self->_relayed;
     $self->{commit_ra} = $self->_new_ra( url => $self->mirror->url.$path );
 
@@ -832,7 +832,7 @@
 		# only recycle the ra if we are committing from root
 		$self->_ra_finished($self->{commit_ra});
                 $committed->(@_);
-            }, undef, 0 ) );
+            }, $opts->{lock_tokens}, 0 ) );
 }
 
 sub change_rev_prop {

Modified: trunk/lib/SVK/Path.pm
==============================================================================
--- trunk/lib/SVK/Path.pm	(original)
+++ trunk/lib/SVK/Path.pm	Mon Jul 28 10:09:04 2008
@@ -235,9 +235,9 @@
 }
 
 sub _get_remote_editor {
-    my ($self, $m, $mpath, $message, $mcallback) = @_;
+    my ($self, $m, $mpath, $message, $mcallback, $opts) = @_;
     my ($base_rev, $editor) = $m->get_merge_back_editor
-	($mpath, $message, $mcallback);
+	($mpath, $message, $mcallback, $opts);
     $editor = SVK::Editor::MapRev->wrap_without_copy($editor, $m->fromrev);
     $editor = SVK::Editor::CopyHandler->new(
         _editor => $editor,
@@ -289,7 +289,8 @@
 	    $tee_callback->($rev) if $use_tee;
         };
 
-	$meditor = $self->_get_remote_editor($m, $mpath, $arg{message}, $mcallback);
+	$meditor = $self->_get_remote_editor($m, $mpath, $arg{message}, $mcallback,
+                                             { lock_tokens => $arg{lock_tokens} } );
 
 	# XXX: fix me, need local knowledge about txn as well
 	return ($meditor, $self->inspector,


More information about the svk-commit mailing list