[Python-Dev] Hg: inter-branch workflow

Tim Golden mail at timgolden.me.uk
Mon Mar 21 10:02:56 CET 2011


On 21/03/2011 02:49, Éric Araujo wrote:
>> I have been avoiding hg import because my understanding is that it
>> defaults to commit, and I don't see that it has any advantage over patch
>> itself.
> “hg import” understands the extended diff format, which patch does not.
>   (That format has been described a number of times already, see
> http://mercurial.selenic.com/wiki/GitExtendedDiffFormat.)
>
> “hg import --no-commit” is basically a patch command that understands
> the extended format.  (Pro tip: it can be abbreviated to “hg import
> --no-c”, as Mercurial accepts unambiguous abbreviations of commands and
> options.)

A further tip in case it helps anyone: hg import (and its mq
counterpart hg qimport) can patch directly from a URL. This
is handy when I want to try out someone's patch directly from
the issue page on bugs.python.org. [Maybe everyone else knew
this, but I found it out by accident!]

TJG


More information about the Python-Dev mailing list