MQ merging

Benjamin Smedberg benjamin at smedbergs.us
Fri Feb 29 10:09:13 CST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesse Glick wrote:
| Bryan O'Sullivan wrote:
|> the workflow around trying a merge of a patch queue is complicated
|> and fragile, to the extent that I simply don't use it, and update
|> patches by hand.
|
| So are there any plans to fix MQ to do true merges? For example, MQ
| could record the parent node ID and patch SHA-1 hash whenever a patch is
| pushed successfully (no rejects, or even no fuzz). If subsequently
| application of the same patch would fail with rejects (or fuzz), and the
| current parent is a descendant of the recorded good parent, then instead
| of trying to apply the patch to the new parent, internally apply the
| patch to the former good parent and invoke a three-way merge using Hg's
| normal machinery. I think this would make MQ much more useful and more

This is the purpose of "hg qsave" and "hg qpush -m"... but you have to
explicitly save the old set of correctly-applied changesets, or else the
chances that the old parent will still be around is pretty slim.

The other option, one that I'd like to explore but haven't had time, is to
save patches with infinite context; this means the patch file itself
contains enough information to perform a full three-way merge when applying
them.

- --BDS

- --

Benjamin Smedberg
Platform Guru
Mozilla Corporation
benjamin at smedbergs.us
http://benjamin.smedbergs.us/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHyC4pSSwGp5sTYNkRAmSzAJ47r8rLm82Q8uS3KkD9P5eFs9ZJ9wCfb92D
AouVEcXHHQFt7HiijU3MX4k=
=20WL
-----END PGP SIGNATURE-----


More information about the Mercurial mailing list