Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert local Subversion repo to hg hosted on bitbucket?

I currently have my ASP.NET and C# source code versioned using a local Debian Linux machine on my network using Subversion. My local path to the repo is: http://carbon.local/svn/main/WebSites/MooDB

I want to move my source code to Mercurial and have it hosted on bitbucket.org. I've set up an account on bitbucket and want to convert my local SVN to Hg and then upload the repo complete with history to bitbucket. The bitbucket repo is here:

https://bitbucket.org/keymoo/moodb

I've done some googling and tried this in a temp working directory (running this on Windows 7 and have installed TortoiseHg):

hg convert http://carbon.local/svn/main/WebSites/MooDB

This creates a .hg folder where I ran the command but my source code has not been copied. I'm also unsure how to get the repo and history into bitbucket. Please help, I just want to get up and running with my repo+history on bitbucket ASAP.

like image 561
Mark Allison Avatar asked Feb 10 '11 09:02

Mark Allison


1 Answers

That's easy.

  1. Install hgsubversion.
  2. Create a folder for Hg version of your repository:
    mkdir MooDB_hg
    cd MooDB_hg
  3. Clone your SVN repository to the local folder:
    hg clone svn+http://carbon.local/svn/main/WebSites/MooDB
  4. Push it to bitbucket:
    hg push https://bitbucket.org/keymoo/moodb
like image 154
yurymik Avatar answered Oct 05 '22 23:10

yurymik