[svk-commit] r2486 - branches/2.0-releng/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Tue Jul 17 11:34:16 EDT 2007


Author: clkao
Date: Tue Jul 17 11:34:16 2007
New Revision: 2486

Modified:
   branches/2.0-releng/lib/SVK/Merge.pm

Log:
merge from trunk:
 r2428 at trunk:  clkao | 2007-07-11 19:07:43 +0100
 In smcp resolve_copy, fix a bug that we are returning src revision
 rather than dst revision, which caused the "revision 0 not found"
 bug during push.
 


Modified: branches/2.0-releng/lib/SVK/Merge.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/Merge.pm	(original)
+++ branches/2.0-releng/lib/SVK/Merge.pm	Tue Jul 17 11:34:16 2007
@@ -677,9 +677,9 @@
     # now the hard part, reoslve the revision
     my $usrc = $src->universal;
     my $srckey = join(':', $usrc->{uuid}, $usrc->{path});
+    my $udst = $self->{dst}->universal;
+    my $dstkey = join(':', $udst->{uuid}, $udst->{path});
     unless ($dstinfo->{$srckey}) {
-	my $udst = $self->{dst}->universal;
-	my $dstkey = join(':', $udst->{uuid}, $udst->{path});
 	return $srcinfo->{$dstkey}{rev} ?
 	    ($path, $srcinfo->{$dstkey}->local($self->{dst}->depot)->revision) : ();
     }
@@ -687,9 +687,15 @@
 	# same as re-base in editor::copy
 	my $rev = $self->{src}->merged_from
 	    ($self->{base}, $self, $self->{base}->path_anchor);
-	# XXX: compare rev and cp_rev
-	return ($path, $rev) if defined $rev;
-	return;
+
+	return unless defined $rev;
+	$rev = $self->merge_info_with_copy(
+	  $self->{src}->mclone(revision => $rev)
+        )->{$dstkey}
+         ->local($self->{dst}->depot)
+         ->revision;
+
+	return ($path, $rev);
     }
     # XXX: get rid of the merge context needed for
     # merged_from(); actually what the function needs is


More information about the svk-commit mailing list