[svk-commit] r2149 - trunk/lib/SVK/Mirror/Backend

clkao at bestpractical.com clkao at bestpractical.com
Thu Nov 16 10:26:35 EST 2006


Author: clkao
Date: Thu Nov 16 10:26:34 2006
New Revision: 2149

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

Log:
We can still reuse the commit ra if we can reparent it.


Modified: trunk/lib/SVK/Mirror/Backend/SVNRa.pm
==============================================================================
--- trunk/lib/SVK/Mirror/Backend/SVNRa.pm	(original)
+++ trunk/lib/SVK/Mirror/Backend/SVNRa.pm	Thu Nov 16 10:26:34 2006
@@ -256,6 +256,11 @@
     my ($self, $ra) = @_;
     return if $self->_cached_ra;
     return if ref($ra) eq 'SVK::Mirror::Backend::SVNRaPipe';
+    if ($ra->{url} ne $self->mirror->url) {
+	return unless _p_svn_ra_session_t->can('reparent');
+	$ra->reparent($self->mirror->url);
+    }
+
     $self->_cached_ra( $ra );
 }
 
@@ -485,8 +490,7 @@
             $msg,
             sub {
 		# only recycle the ra if we are committing from root
-		$self->_ra_finished($self->{commit_ra})
-		    unless length $path;
+		$self->_ra_finished($self->{commit_ra});
                 $committed->(@_);
             },
             @lock ) );


More information about the svk-commit mailing list