[Python-Dev] Backport troubles with mercurial

Amaury Forgeot d'Arc amauryfa at gmail.com
Wed Dec 29 10:53:56 CET 2010


2010/12/29 Georg Brandl <g.brandl at gmx.net>
>
> Am 29.12.2010 09:02, schrieb Amaury Forgeot d'Arc:
>
> > - even if there was one, there is the problem of changes specifically made for 2.7
> > that make no sense in py3k. You'd have to perform a "dummy merge" to py3k
> > which has the disadvantage of cluttering the py3k change log. And think of the
> > horror
> > if someone forgets this dummy merge.
>
> No horror at all: the next committer notices the extra changes in his merge and
> removes them.  *Never* commit merges without reviewing the diff.  (The
> situtation is similar, by the way, to someone typing the wrong revision number
> when using svnmerge, and not noticing it because he does not review the diff.)

Except that it's easy to overlook a diff and not notice another small change
mixed in your merge. Checking "hg merge -P" is probably better.
But is it possible to "remove" the extra change?

What worries me more is the requirement to find the correct branch before I can
even edit the file. How would you, Georg, deal with doc patches
(typos, bad markup)?
With subversion it's easy to work on trunk, and then have svnmerge tell you
which chunk is in conflict and does not apply to the maintenance branch.

>
> > - in any case, the actual repositories in http://code.python.org/hg/ are not clones
> > of each other, so "hg merge" won't work and "hg pull" will clone the whole
> > remote repository.
>
> Note that the repos on code.python.org are not the results of our conversion
> process.  Those will be on hg.python.org.  The former are repos contributed
> by Antoine (I think) that he uses with hgsubversion to work on Python using
> Mercurial right now; they will disappear after hg.python.org works.

ok. I used them because other the repos I found were really old.
And http://hg.python.org/cpython/ probably needs an initial "dummy merge"
on every branch.
>
> > (btw, now that I have "hg pull" another repo, how can I remove it? is my clone
> > broken forever?)
>
> No, you can "hg strip" away the root of the wrongly pulled revisions (which
> also strips all descendants), or use "hg clone -r XXX" to create a new clone
> with only a specified revision and all its ancestors.

"hg strip" worked for me. The root revision to strip was simply the
first one (=oldest) in "hg outgoing".

--
Amaury Forgeot d'Arc


More information about the Python-Dev mailing list