Error converting P4 repo to Mercurial

Frank Kingswood frank at kingswood-consulting.co.uk
Tue Jul 14 10:05:28 CDT 2009


Ron Gery wrote:
> I am new to Mercurial and know nothing about Python. I am running on 
> Windows XP with the P4 depot hosted on the local machine. I'm trying to 
> convert my P4 repo to Mercurial, and regardless of what variations I've 
> tried for specifying the source (local path, depot address, changelist 
> limitations), I soon get the following error message (about 20 
> changelists, ending with the most recent one, are shown preceding the 
> error):
> 
> ** unknown exception encountered, details follow
> ** report bug details to http://mercurial.selenic.com/bts/
> ** or mercurial at selenic.com
> ** Mercurial Distributed SCM (version 1.3)
> ** Extensions loaded: extdiff, convert
> Traceback (most recent call last):
>   File "hg", line 38, in <module>
>   File "mercurial\dispatch.pyc", line 16, in run
>   File "mercurial\dispatch.pyc", line 27, in dispatch
>   File "mercurial\dispatch.pyc", line 43, in _runcatch
>   File "mercurial\dispatch.pyc", line 449, in _dispatch
>   File "mercurial\dispatch.pyc", line 317, in runcommand
>   File "mercurial\dispatch.pyc", line 501, in _runcommand
>   File "mercurial\dispatch.pyc", line 454, in checkargs
>   File "mercurial\dispatch.pyc", line 448, in <lambda>
>   File "mercurial\util.pyc", line 370, in check
>   File "hgext\convert\__init__.pyc", line 232, in convert
>   File "hgext\convert\convcmd.pyc", line 369, in convert
>   File "hgext\convert\convcmd.pyc", line 54, in convertsource
>   File "hgext\convert\p4.pyc", line 51, in __init__
>   File "hgext\convert\p4.pyc", line 109, in _parse
> EOFError: EOF read where object expected
> 
> My invocation looked like:
> hg convert //depot/gmg/... e:\test
> 
> I would simply love to be able to bring my history with me as I move to 
> Mercurial, but I'm out of my scope (and available time) in trying to 
> track this problem down. Is the above something other people have run 
> into, or is this cause by some sort of corruption in my P4 repo?

Thanks for your report. Can you re-run with -v to get more detail on the 
conversion. In your conversion there was an error while executing a p4 
describe command on the changelist *following* the last one you'll see from 
the conversion with -v.
It would be very helpful if you could post or mail the output from
	p4 describe <nextchangelist>
where you should insert the number of the changelist following the last one 
that was successfully read.

Alternatively, and if you are happy to try, you could put a line (properly 
indented)
	print cmd
immediately before line 109 in hgext\convert\p4.py in your Mercurial 
installation. This will show the changelist that causes the issue.

Frank



More information about the Mercurial mailing list