two heads have no common ancestor

D Wang dwang at janestreet.com
Thu Jan 30 20:38:45 UTC 2014


Hello hg devs,

I have a repo where the two heads have no common ancestor, which I
thought was impossible.  How could I have gotten myself into this
state, and is there any clever way to merge these two heads short of
manually examining each file?

(Please cc dwang at janestreet.com on replies because I am not subscribed
to the mailing list.)

$ hg heads --template '{node|short} {date|isodate} ({parents}) {tags} \n'
520c0024b6e1 2014-01-30 14:30 -0500 () tip
76d5d232371f 2014-01-24 13:11 -0500 ()
$ hg log -r 'ancestor(520c0024b6e1,76d5d232371f)'
$ hg log -G -r 'ancestors(520c0024b6e1)' --template '{node|short}
{date|isodate} ({parents}) {tags}\n'
@  520c0024b6e1 2014-01-30 14:30 -0500 () tip
|
o  1628b6cba1b6 2014-01-29 19:57 -0500 ()
|
o  061c697ef8e7 2014-01-28 20:29 -0500 ()
|
o  2c06ad30d497 2014-01-27 19:40 -0500 ()
|
o  02ab4c712c43 2014-01-26 20:00 -0500 ()
|
o  557d342a24c6 2014-01-25 20:09 -0500 ()
|
o  2b94d7ce938f 2014-01-24 20:07 -0500 ()
|
o  7c6911410f0b 2014-01-24 14:05 -0500 ()
|
o  0f7b23a5ddaa 2014-01-24 13:11 -0500 (-1:000000000000 )

0f7b23a5ddaa has exactly one parent, the all-zeroes revision:

$ hg log -r 0f7b23a5ddaa --debug
changeset:   671130:0f7b23a5ddaa899812f9163828a287ae8122630d
parent:      -1:0000000000000000000000000000000000000000
parent:      -1:0000000000000000000000000000000000000000
manifest:    671129:d33e6dea36c0a404f162ed8f802f8d933f4d656c
...

Unfortunately, the contents of this repo are machine-generated, so
it's not easy to figure out the relationship between these revisions
by reading the files.

The helpful information from your bug tracker instructions:
- hg version: 2.3
- OS: CentOS, specifically
Linux tot-qpr-cr1 2.6.32-279.19.1.el6.centos.plus.x86_64
#1 SMP Wed Dec 19 06:20:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
- third-party tools: None, I think.  hg help --verbose has no "enabled
extensions" field.
- command I was running:
Unfortunately, this is a repo where almost all the commits are made by
an automated system, so I don't what commands were run and it's
entirely possible we did something absurd.
- precise traceback or error: I just noticed this weird state.  hg
thinks the repo is fine.  It even passes hg debugcheckstate.

Wang



More information about the Mercurial mailing list