[darcs-users] An example of a "complicated" change?

Stephen J. Turnbull stephen at xemacs.org
Tue Apr 14 08:51:55 UTC 2009


Trent W. Buck writes:

 > In both git and hg, the merge patch is automatically create *if and only
 > if* a simple three-way merge can unify the branches without conflicts.
 > If there are conflicts, you need to manually resolve them, and record
 > this resolution as a "merge patch" -- even if there isn't any actual
 > conflict, and the patch is actually the null patch.

This isn't quite true for git.  git never produces a conflicted
revision, so a merge with conflicts has the parents (existing commits)
and one new commit which records the merge-with-resolution.  Unless
the merge is a trivial "ours" merge, the merger will differ from all
parents.  I think the same logic applies to Mercurial, but I'm not
sure.

 > To further confuse matters, "hg log" and "hg diff" claim that the merge
 > patch contains not only the conflict resolution, but *EVERY* change that
 > has happened to EITHER branch since the point of divergence.

Heh.  Yeah, in my experience I basically need to keep an "hg log -r
-100" in one window and use two -r options for most "hg diff"s.

But git has a cool feature, the "git diff --cc" "combined diff".  This
shows which lines came from each parent, and if there was a merge
resolution for a line, it shows both parents and the resolution.

I guess in Darcs that shows up as a merge patch in the case where a
resolution is necessary.



More information about the darcs-users mailing list