Skip to content

klo2k/mercurial-to-git-migrate-container

Repository files navigation

Migrate Mercurial (HG) to Git repository directly between remotes

Container to migrate from Mercurial repository into Git repository, directly between remotes via Docker container.

Mercurial --clone--> [This Container] --push--> Git

I developed this for my own use case but thought I'd share this.

Please test this yourself first - I hacked this up in a day so use at your own risk 😉 .

Dependencies

Basically a recent version of docker and docker-compose - developed with these:

  • Docker >= 20.10.12
  • docker-compose >= 1.29.2

Usage

  1. Create your needs-specific docker-compose.yml (See docker-compose.yml.template for help)

    # Make a copy from template
    cp docker-compose.yml.template docker-compose.yml
    
    # Edit it to your needs
    vim docker-compose.yml
  2. Run the migration container:

    ./run-hg-git-migration.sh
  3. Profit 😋

To Develop

  1. Create docker-compose.yml (see above)

  2. Run this in special debug mode

    ./run-hg-git-migration.sh development
  3. Get shell into container

    ./bash_shell-hg-git-migration.sh

Credits

My work wouldn't be possible without these awesome people!