1

I need to convert an existing Mercurial repository to Subversion, I tried with the following command:

hg convert --dest-type svn mercurialpath subversionpath

That I took from the following topics:

Converting mercurial repository to svn repository

Migrating from Mercurial to Subversion

The problem is that after launching this command the conversion starts and ends apparently successfully but I only get a "working copy" directory in the PWD and in the subversionpath a folder with semi-empty files and directory as "db", "lock", etc... I don't have an idea of how I can solve this problem. Thanks

Community
  • 1
  • 1
Raffo
  • 1,642
  • 6
  • 24
  • 41
  • In the title you say to convert from hg to svn but in contradiction to the message itself where you say to convert from svn to hg ? So now what do you really mean ? – khmarbaise Feb 24 '12 at 11:53
  • You're totally right, gwhitake already fixed it, thanks. – Raffo Feb 24 '12 at 11:58

1 Answers1

1

and in the subversionpath a folder with semi-empty files and directory as "db", "lock", etc.

That sounds like a description of the Subversion repository. You won't see your source files in there in any readable format. Each revision is kept in a file in the directory structure under the dev/revs folder but in a binary diff format.

JeremyP
  • 84,577
  • 15
  • 123
  • 161
  • But I do not understand why the source code that is contained in the repository is placed somewhere else. What's the meaning of the working copy folder? – Raffo Feb 24 '12 at 13:32
  • @Raffo: The way subversion works is that there is a central repository containing all of the revision information but you actually work in a "working copy". Doing a commit sends all your changes in the working copy to the central repository. If you are not familiar with how Subversion works, I suggest you read at least this chapter of the SVN book. http://svnbook.red-bean.com/en/1.7/svn.basic.html – JeremyP Feb 24 '12 at 13:37