Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Do I Migrate From One Mercurial Server To Another Without Losing My History?

I have a project where I'm using Bitbucket as my HG server, but I've recently discovered that as a lone developer I can use Fogbugz/Kiln for free. I want to move my files into Kiln but I don't want to lose my history. I'm sure there's a dead-stupid easy way to do it, but I just don't know. How do I do this?

Thanks!

like image 622
Jason Avatar asked Nov 19 '10 21:11

Jason


2 Answers

Create the new project repo and do the following with your current copy of the original repo: hg push new-repo-path.

Then you use the new path in the future. You can delete the bitbucket repo.

With Mercurial, all history is in every copy of the repository, including your local copies.

like image 101
robert Avatar answered Nov 15 '22 23:11

robert


Since you are already using Mercurial. I was just curious, shouldn't cloning your repository on Fogbugz/Kiln be sufficient.

hg clone "BitBucket Repo ..."

Of course, this won't copy your per-repository hgrc file. You will need to do that separately.

Another approach is to use bundle.

hg bundle --all bitbucket.bundle
hg clone bitbucket.bundle my_repo

Third approach is to push or pull from bitbucket repo to fogbugz repo.

Setting defaults

See: https://www.mercurial-scm.org/wiki/TipsAndTricks.

Reproducing it here:

It is possible to store a default push URL that will be used when you type just 'hg push'. Edit hgrc and add something like:

[paths]
default-push = ssh://[email protected]/path
like image 43
pyfunc Avatar answered Nov 15 '22 23:11

pyfunc