aboutsummaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorSteven Walter <stevenrwalter@gmail.com>2012-08-19 21:39:40 -0400
committerEric Wong <normalperson@yhbt.net>2012-10-05 22:48:12 +0000
commitf271fad2661d2f26654e9b4b3ecb17ad0ea711e8 (patch)
tree456ee5748c2f344e12df5b90eb331b1b98649842 /perl
parentf84667def209e4a84e37e8488a08e9eca3f208c1 (diff)
downloadgit-f271fad2661d2f26654e9b4b3ecb17ad0ea711e8.tar.gz
git-f271fad2661d2f26654e9b4b3ecb17ad0ea711e8.tar.xz
git-svn.perl: consider all ranges for a given merge, instead of only tip-by-tip
Consider the case where you have trunk, branch1 of trunk, and branch2 of branch1. trunk is merged back into branch2, and then branch2 is reintegrated into trunk. The merge of branch2 into trunk will have svn:mergeinfo property references to both branch1 and branch2. When git-svn fetches the commit that merges branch2 (check_cherry_pick), it is necessary to eliminate the merged contents of branch1 as well as branch2, or else the merge will be incorrectly ignored as a cherry-pick. Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Reviewed-by: Sam Vilain <sam@vilain.net> Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git/SVN.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index acb25394f..ae3b6a417 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1713,14 +1713,14 @@ sub find_extra_svn_parents {
my @merge_tips;
my $url = $self->url;
my $uuid = $self->ra_uuid;
- my %ranges;
+ my @all_ranges;
for my $merge ( @merges ) {
my ($tip_commit, @ranges) =
lookup_svn_merge( $uuid, $url, $merge );
unless (!$tip_commit or
grep { $_ eq $tip_commit } @$parents ) {
push @merge_tips, $tip_commit;
- $ranges{$tip_commit} = \@ranges;
+ push @all_ranges, @ranges;
} else {
push @merge_tips, undef;
}
@@ -1735,8 +1735,6 @@ sub find_extra_svn_parents {
my $spec = shift @merges;
next unless $merge_tip and $excluded{$merge_tip};
- my $ranges = $ranges{$merge_tip};
-
# check out 'new' tips
my $merge_base;
eval {
@@ -1758,7 +1756,7 @@ sub find_extra_svn_parents {
my (@incomplete) = check_cherry_pick(
$merge_base, $merge_tip,
$parents,
- @$ranges,
+ @all_ranges,
);
if ( @incomplete ) {