"Patch Management" descriptions in conflict

Giovanni Gherdovich g.gherdovich at gmail.com
Wed Jan 29 12:07:56 UTC 2014


Pietro Moras wrote:
::::
:::: On "Mercurial - The definitive Guide" (by B. O'Sullivan) the "Patch
Management"
:::: is described in terms of MQ - Mercurial Queues.
:::: Elsewhere in completely different terms, of:
:::: "export" and "import" of *.patch or *.diff files. I'm confused.
:::: Your thoughts? Thanks.

you can think of `hg import` and `hg export` as "low level" commands;
they only implement the translation (changeset <---> diff file).

MQ on the other hand provides you a structured way to manage
a stack of patches: to begin with, MQ gives an order to them.
With `hg qpop` and `hg qpush` you don't have to think "what's the next
patch",
you just handle them as a stack.

Also you can jump from a stack to another, handling parallel flows of
development.
Everything is orthogonal to changesets, changeset are written in stone
while patches are floating around... You know it all, it's in the book
by B. O'Sullyvan.

Think of MQ as import+export on steroids.

By Bryan's own admission, the relevance of MQ in the book is overrated
with respect to the current state of things.
I remember him saying on IRC "If I had to write the book today,
MQ would have had an appendix, not two chapters".
If the topic interests you, make sure you check
http://mercurial.selenic.com/wiki/ChangesetEvolution
which implements history rewriting as a tracked (versioned) and shareable
operation.

GGhh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140129/ca60a4ca/attachment-0002.html>


More information about the Mercurial mailing list