svnversion-controlmercurialhgsubversionrepository-design

Importing Subversion repository which is well formed now, but was not well formed before


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":

However, I wonder: is there a better way to do it? How would you solve this problem?


Solution

  • The answer is no, there was no better method. This situation was very specific, and there was an workaround, so I assume a "fix" wouldn't probably be worth it. I solved following the steps in the question, and would recommend it for most people in this situation.