[svk-commit] r2428 - trunk/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Wed Jul 11 14:07:39 EDT 2007
Author: clkao
Date: Wed Jul 11 14:07:39 2007
New Revision: 2428
Modified:
trunk/lib/SVK/Merge.pm
Log:
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: trunk/lib/SVK/Merge.pm
==============================================================================
--- trunk/lib/SVK/Merge.pm (original)
+++ trunk/lib/SVK/Merge.pm Wed Jul 11 14:07:39 2007
@@ -678,9 +678,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) : ();
}
@@ -688,9 +688,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