hg convert - can't read from repo type

Patrick Mézard pmezard at gmail.com
Thu Nov 1 13:18:52 CDT 2007


Ken Blake a écrit :
> 
> I successfully did a conversion (I think) but have some questions.  The
> conversion took nearly 14 hours.  Is that typical?  I ran with --profile,
> here are the top two functions:
> 
>   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>   1425916 27147.181    0.019 27147.181    0.019 socket.py:321(readline)
>    203702 21658.809    0.106 21658.809    0.106 socket.py:278(read)
> 
> Here is some info about the size of the repo:
> $ du -sk .hg
> 178344  .hg
> $ du -sk .
> 300480  .
> 
> $ hg verify
> checking changesets
> checking manifests
> crosschecking files in changesets and manifests
> checking files
> 20339 files, 33153 changesets, 202652 total revisions
> 
> The average conversion time per changeset was ~1.5 seconds.  Is there
> really that much to do per changeset or is the communication time with
> the cvs server the problem?   It's good this only needs to be done once,
> not counting updates which I expect will be much faster.

Just to compare apples to oranges (git repository, MacBook Pro):

$ time hg convert rails_git

real    17m53.557s
user    4m20.548s
sys     11m43.950s

$ hg verify
[...]
1865 files, 5545 changesets, 17076 total revisions

$ du -sk .hg/
16040   .hg/

I don't expect CVS conversion process itself to take so much time, not talking about building a repository of this size. While you can enable compression for cvsps through cvspsrc, the converter itself does not handle it (or it can be done transparently by cvs server but I am not aware of that). Supporting compression may be a huge win here.

> $ hg manifest | wc -l
> 11617
> 
> I would have thought this number would be the same as the number of
> files listed in the verify output.
> 
> $ hg status | wc -l
> 11707
> 
> Why are there all these uncommitted files?  Every one is preceded by a
> question mark indicating it is a new file.  Is the proper procedure to follow
> this with an hg checkout?  This was unexpected.  Is there anything else
> I need to do?

Drop the remaining working directory and recreate it. You can just clone the repository elsewhere (copying .hg/shamap along if you intend to convert incrementally later), or just drop everything but .hg and update -C to tip again.

--
Patrick Mézard


More information about the Mercurial mailing list