p4 to hg
Frank Kingswood
frank at kingswood-consulting.co.uk
Thu Jul 17 07:42:47 CDT 2008
Hi Paul,
> It turns out I was mistaken. Parsing the "Branch" and "Ancestor
> branch" lines of the "cvsps" output myself (using a parser based on
> the "hg convert" parser) gives me a plausible-looking revision tree.
> For some reason this results in an hg repository whose revision tree
> is clearly wrong.
>
> I'm afraid I can't share the CVS repository that results in this
> error, though I'll continue to investigate from here. How heavily
> tested is "hg convert" against CVS trees that contain several branches?
My main repository has around 100 live branches in it, and convert also
has been tested with about half a dozen public repositories. The old CVS
conversion which uses the external cvsps-2.x tool gets hopelessly
confused on all but the simplest repositories.
It's still not clear to me whether you're using the builtin or the
external cvsps tools to scan the source repository. I may be able to
help if the builtin tool generates an incorrect history.
I understand that you're not able to make your repository public.
Perhaps it is possible that you could share the cache file that builtin
cvsps stores (in ~/.hg.cvsps/)? That will have all your log messages in,
of course.
If you want to avoid showing the log messages, then you could do a tiny
bit of hacking:
In hgext/convert/cvsps.py around line 300 there is this statement:
e.comment = scache('\n'.join(e.comment))
if you replace that with
e.comment = scache(md5.new('\n'.join(e.comment))).hexdigest()
and add import md5 somewhere, then all comments will be replaced by
their md5sum.
Or perhaps you can think of something that keeps the first few bytes of
the log plus the md5 - that might be more readable. This should not
affect the revision graph which is sorted by date in cvsps.
If you can then run
export PYTHONPATH=/path/to/mercurial:$PYTHONPATH
/path/to/mercurial/hgext/convert/cvsps --parents --ancestors -x
this will generate a reasonably compact dump of the revision history in
CVS in ~/.hg.cvsps/something-with-repo-name-in-it.cache.
If you can send me that (off-list) then I can have a look.
Regards,
Frank
More information about the Mercurial
mailing list