I would like to import the source code from a Subversion repository to Mercurial. Using Hg Subversion I imported it. The problem is, the layout of the SVN repo is the default one - with trunk
directory, branches at the branches
directory etc. - today, but it was not so before. Some time ago, all directories of the project were a the root repository, so Hg Subversion could not convert the branches
directory to Mercurial branches and the new Mercurial repository just contains the directories branches
and trunk
.
I converted the branches directories into Mercurial branches the "hard way":
- for each branch
b
hg mv branches/$b .
hg rm branches trunk
hg branch $b
hg commint -m "Creating branch $b"
However, I wonder: is there a better way to do it? How would you solve this problem?