[svk-commit] r2599 - branches/bm-smerge-fixes/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Mon Nov 12 14:27:31 EST 2007


Author: clkao
Date: Mon Nov 12 14:27:30 2007
New Revision: 2599

Modified:
   branches/bm-smerge-fixes/lib/SVK/Merge.pm

Log:
fix smerge/copy-reuse by checking if the copyboundry we found
is earlier than the actual present branching point.


Modified: branches/bm-smerge-fixes/lib/SVK/Merge.pm
==============================================================================
--- branches/bm-smerge-fixes/lib/SVK/Merge.pm	(original)
+++ branches/bm-smerge-fixes/lib/SVK/Merge.pm	Mon Nov 12 14:27:30 2007
@@ -600,8 +600,18 @@
 	    my $usrc = $src->universal;
 	    my $srckey = join(':', $usrc->{uuid}, $usrc->{path});
 	    if ($dstinfo->{$srckey}) {
+                # find which rev on src is merged from the base.
 		$boundry_rev = $src->merged_from
 		    ($self->{base}, $self, $self->{base}{path});
+                # however if src is removed and later copied again
+                # from base, we need the later one as boundry
+                my $t = $src;
+                while (my ($toroot, $fromroot, $path) = $t->nearest_copy) {
+                    if ($path eq $self->{base}->path_anchor) {
+                        $boundry_rev = List::Util::max( $boundry_rev, $toroot->revision_root_revision );
+                    }
+                    $t = $t->mclone( path => $path, revision => $fromroot->revision_root_revision );
+                }
 	    }
 	    else {
 		# when did the branch first got created?


More information about the svk-commit mailing list