This repository contains some scripts to help you converting existing Mercurial repositories to Git repositories.
Note: Some scripts may contain some details or functions specific for the repositories they were originally created for.
The script assumes that you have both Mercurial and Git already installed on your system
- pip install mercurial
- pip install colorlog
- Read arguments
- Verify arguments for valid input
- Find all Mercurial repositories in the source directory
- Check if authorsmap file is present
- If not found the script wil create a new authorsmap based on the found repositories
- Validate all Mercurial repositories (optional)
- Script will exit if errors are found
- Init a new Git repository for each Mercurial repository in the target directory
- Convert all Mercurial repositories to Git using the authorsmap file
- -a (--authors): Author.map file to use during conversion
- Default: authors.map
- -b (--bash): Location of bash when running on Windows
- Default: C:\Program Files\Git\bin\bash.exe
- -c (--checks): Enable HG repository checks before migration
- Default: True
- -d (--debug): Enable debug logging
- Default: False
- -f (--force): Do not halt conversion on validation warnings or errors
- Default: False
- -s (--source): Source repository containing the Hg repositories
- Default: ./source
- -t (--target): Target directory for Git repositories
- Default: ./source
- -u (--user): User who runs this script
- Default: Currently logged in user in OS
- -v (--verbose): Enable verbose logging
- Default: False