On Monday, April 30, 2012 at 10:35 EDT,
Roland Schulz <
rol...@utk.edu> wrote:
> On Mon, Apr 30, 2012 at 9:23 AM, Magnus Bäck <
ba...@google.com> wrote:
>
> > I don't think there's any better way than redoing the merge. If
> > Git's rerere feature was enabled when you did the original merge
> > most subsequent re-merges should be painless. Unless, of course,
> > there have been upstream changes that affect areas that the merge
> > commit also changes, but no tricks-up-the-sleave can save you from
> > that.
>
> The problem with rerere is that it doesn't reapply changes outside of
> the conflicting lines.Thus if a merge commit required changes in other
> lines/files then those have to be redone when redoing the merge.
Ah, yes. Only conflicting hunks will ever be taken care of by rerere.
> If one has Merge M1 which is ready for submission but has a merge
> conflict and M2 which is a merge of M1 and upstream. Then if Gerrit
> would allow to submit M2 without first trying to merge M1, one could
> use merge instead of rebase to resolve conflicts. M1 could also be a
> non-merge commit. But in that case rebase would be easy thus the
> procedure not useful.
>
> Do you think this would work and would be generally useful? Then I'll
> open a feature request.
Are you sure this doesn't work as it is? If you try to submit M2 first
it'll be in the "Submitted, merge pending" state, and submitting M1
afterwards will cause Gerrit to submit M1 and M2 at the same time by
merging from M2. I don't think the mergeability of M1 is even considered
in this case. That said, I've never looked at the code that queues up
changes and submits them in batch.
> > No, not possible. The rebase feature introduced in Gerrit 2.3
> > refuses to rebase merge commits (and making it support merge commits
> > would probably be difficult), but that feature would otherwise have
> > been a good choice as I believe it always uses content merging
> > regardless of the "Automatically resolve conflicts" configuration.
>
> Do you mean
https://gerrit-review.googlesource.com/#/c/32431 with the
> rebase feature?
Yes.
> This is going to be in 2.4 and not in 2.3, right? At least I cannot
> see a rebase button in my 2.3 installation. If it is already in 2.3
> I would be interested in how to activate it.
No, you're right. It indeed wasn't included in 2.3.
--
Magnus Bäck
ba...@google.com