hg convert doesn't recognise trunk/tags/branches from svn repository
-
18-06-2021 - |
Question
I have tried to convert an SVN project to Mercurial using svnsync
and then:
mercurial-2.2.2/hg convert --authors ../authors.txt project
as described here (the version of Mercurial supplied by Ubuntu crashed when trying to convert the repository, so I deleted the output and downloaded the latest version of Mercurial instead).
However, the resulting repository has
project/trunk/blah
and
project/tags/1.1/blah
as files in the revisions, instead of recognising the trunk as the default
branch, and the tags as tags.
What is the right way to convert it?
Please note: The project was originally stored something like this in SVN (due to developer error):
project/project/trunk
but in recent SVN revisions it is like this:
project/trunk
I assumed that hg convert
would look at the file structure in HEAD and deduce the correct structure, but obviously I was wrong.
Solution
Add to the command line:
--config convert.svn.trunk=project/trunk --config convert.svn.branches=project/branches --config convert.svn.tags=project/tags