[Python-Dev] Hg: inter-branch workflow

Ned Deily nad at acm.org
Mon Mar 21 12:06:56 CET 2011

In article <4D871440.2000200 at timgolden.me.uk>,
 Tim Golden <mail at timgolden.me.uk> wrote:
> 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!]

Using a URL can be useful but be aware that for hg import, just as with 
the patch utility, you need to know what if any strip value to use, that 
is, the -p parameter.  So you generally need to examine the patch file 

hg qimport currently does not provide a way to specify the strip count; 
it requires the patch to have been generated with a strip count of 1.

hg import defaults to 1 but can be changed with -p.

Svn-generated diffs/patches generally need a strip count of 0.

 Ned Deily,
 nad at acm.org

More information about the Python-Dev mailing list