[Python-Dev] crosses branches?

Sjoerd Mullender sjoerd at acm.org
Tue Mar 22 23:55:49 CET 2011


On 2011-03-22 22:53, skip at pobox.com wrote:
> 
>     Sjoerd> Perhaps looking at the glog output will shed some light.  If you
>     Sjoerd> don't have it yet, enable the graphlog extension, after which
>     Sjoerd> you can use hg glog to look at your clone.  Look in particular
>     Sjoerd> at the changeset which is marked with an @ sign instead of an o.
>     Sjoerd> That (or those if you're in the middle of a merge) is the
>     Sjoerd> "parent" of your working set.
> 
>     ...
>     | | | | | | @  changeset:   68309:c3caaf979b9e
>     | | | | | |/   branch:      2.5
>     | | | | | |    parent:      68263:7790ad8332ba
>     | | | | | |    user:        Skip Montanaro <skip at pobox.com>
>     | | | | | |    date:        Sun Mar 06 21:31:25 2011 -0600
>     | | | | | |    summary:     manually expand the defunct HeadURL subversion keyword
>     ...

Here you see one of your heads.  The lines show the dependencies among
the changesets, and your change has no children (line going up), i.e.
it's a head.

> I see no other "parent"s.  I have to admit I don't know how to read this
> output or what I should look for in the way of conflicts.  Also, it produced
> 20+MB of output, so I can't just paste it into this message and ask anyone
> to read the tea leaves.
> 
> Oh, wait a minute.  It looks like Martin relented on his desire not to
> modify the 2.5 Mercurial repo:
> 
>     | | | | o  changeset:   68802:f9763c363cc3
>     | | | | |  branch:      2.5
>     | | | | |  parent:      68696:cc959f114739
>     | | | | |  user:        Martin v. Lšwis <martin at v.loewis.de>
>     | | | | |  date:        Mon Mar 21 10:30:07 2011 +0100
>     | | | | |  summary:     Set subversion version identification to empty strings if this is not a subversion

Here I was mistaken, it's not a head since there is a line going up from
this changeset (you didn't show it, but it's there).  But the child of
this changeset is in a different branch (2.6).  So as far as the 2.5
branch is concerned, it's a head.

> 
> I think that would make my local change unnecessary.  So, my next project is
> to try and figure out how to undo my change.  This seemed to work:
> 
>     hg revert -r 68263 Python/sysmodule.c
> 
> Was that the right thing to do?

No.  Revert just reverts local (non-committed) changes.

Either you don't need your change anymore and you can strip it (if your
changeset never left this particular clone) (you need the rebase
extension for that), or you can tell Hg that you want to abandon your
head (I'm not actually sure this can be done, and if it can, how), or
you can merge the two changesets: hg update -C 68309; hg merge 68802; hg
commit.  And finally, you can rebase: hg rebase -s 68309 -d 68802.  The
rebase will graft your changeset on top of Martin's.

> 
> S


-- 
Sjoerd Mullender

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 371 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110322/74ca546e/attachment-0001.pgp>


More information about the Python-Dev mailing list