unless $differs & (D_PAT_ADD|D_PAT_OTH);
}
- printdebug sprintf "get_differs %s, %s = %#x\n", $x, $y, $differs;
+ printdebug sprintf "get_differs %s %s = %#x\n", $x, $y, $differs;
return $differs;
}
}
-# xxx allow merge separately from laundering
+# xxx allow merge resolution separately from laundering, before git merge
#
-# xxx docs highlight forbidden things
-# xxx docs list allowable things ?
-# xxx docs explicitly forbid some rebase
+# xxx general gdr docs highlight forbidden things
+# xxx general gdr docs list allowable things ?
+# xxx general gdr docs explicitly forbid some rebase
#
# xxx provide a way for the user to help
# xxx (eg, provide wreckage provide way to continue)
my @earlier;
while (my $patch = <S>) {
chomp $patch or die $!;
+ $prereq{$patch} //= {};
foreach my $earlier (@earlier) {
$prereq{$patch}{$earlier}{$s}++ and die;
}
}
die "$ty ?";
} elsif ($ty eq 'VanillaMerge' or $ty eq 'MergedBreakwaters') {
- # xxx need to handle ffq if one side was unstitched
- # wait both of them may be!
+ # User may have merged unstitched branch(es). We will
+ # have now lost what ffq-prev was then (since the later
+ # pseudomerge may introduce further changes). The effect
+ # of resolving such a merge is that we may have to go back
+ # further in history to find a merge base, since the one
+ # which was reachable via ffq-prev is no longer findable.
+ # This is suboptimal, but if it all works we'll have done
+ # the right thing.
+ # xxx we should warn the user in the docs about this
+
my $ok=1;
my $best_anchor;
# We expect to find a dominating anchor amongst the
$cl->{MergeInterchangeBaseInfo},
@{ $cl->{Parents} };
$last_anchor = $cl->{MergeBestAnchor};
- # xxx need to check the tree somehow
+ my $check_differs = get_differs $build, $cl->{CommitId};
+ # Breakwater changes which were in each side of the
+ # merge should be in MergeCreateMergedBreakwaters
+ # output. Upstream changes are exactly the result
+ # of merge_series. So the only difference should
+ # be potential laundry results.
+ $nomerge->(sprintf
+ "merge misresolved: tree is not the same (%s %s d.%#x)",
+ $cl->{CommitId}, $build, $check_differs)
+ if $check_differs & ~D_PAT_ADD;
print "Merge resolution successful.\n";
next;
} else {