[Bps-public-commit] r15848 - in SVN-Mirror/trunk: lib/SVN/Mirror

clkao at bestpractical.com clkao at bestpractical.com
Mon Sep 8 07:36:55 EDT 2008


Author: clkao
Date: Mon Sep  8 07:36:54 2008
New Revision: 15848

Modified:
   SVN-Mirror/trunk/   (props changed)
   SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm

Log:
 r370 at mtl:  clkao | 2006-10-03 06:36:34 +0800
 Fix a bug in replace with history, where the copy source is related
 to the current node, but outside the mirror.
 


Modified: SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm
==============================================================================
--- SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm	(original)
+++ SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm	Mon Sep  8 07:36:54 2008
@@ -876,7 +876,13 @@
         return undef;
     }
     if ( ($action || '') eq 'R' ) {
-	return $self->add_file($path, $pb, undef, -1, $pool);
+        my $item = $self->{mod_lists}{$path};
+	return $self->add_file($path, $pb, undef, -1, $pool)
+	    unless defined $item->{remote_rev} xor defined $item->{local_rev};
+	# If we are replacing with history and the source is out side
+	# of the mirror, assume assume a simple replace.  Note that
+	# the server would send a delete+add if the source is actually
+	# unrelated.
     }
 
     ++$self->{changes};



More information about the Bps-public-commit mailing list