hg convert hangs in toposort()

Alexis S. L. Carvalho alexis at cecm.usp.br
Fri Feb 8 09:01:50 CST 2008


Thus spake Frank Kingswood:
> Hallo!
> 
> I'm experiencing hangs in converting a CVS tree, in calls to toposort(), 
> in particular the while loop which starts at line 129 in
> http://hg.intevation.org/mercurial/crew-stable/file/6605a03cbf87/hgext/convert/convcmd.py
> 
> The state alternates between
> visit=['3', '4']
> removed={'1': 1, '2': 1, '5': 1, '7': 1, '6': 1, '9': 1, '8': 1} 
> parents={'1': [], '3': ['3'], '2': ['1'], '5': ['1'], '4': ['3'], '7': 
> ['6'], '6': ['5'], '9': ['8'], '8': ['7']}
> self.map={}
> 
> and
> 
> visit=['4', '3']
> 
> (with the other variables unchanged).
> 
> It is not entirely clear to me what the expected behaviour of toposort 
> is, can anyone shed any light on this problem?
> 
> This is with version 0.9.5 (as packaged in Debian), but the toposort() 
> code is identical to the current crew-stable tree.

Can you try the code in crew-stable (or even crew)?  Even if the
toposort function didn't change, there were a few patches to the CVS
converter, and it looks like the input passed to toposort is bogus:

> parents={'1': [], '3': ['3'], '2': ['1'], '5': ['1'], '4': ['3'], '7': 
                    ^^^^^^^^^^

It doesn't make sense for a changeset to be its own parent.

Also, what version of cvsps are you using?

Alexis


More information about the Mercurial-devel mailing list