Created
January 26, 2014 21:23
-
-
Save haard/8639666 to your computer and use it in GitHub Desktop.
Use hggit and hgapi to push a hg repo to a git mirror
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branch_mapping = [('default', 'master')] | |
target = "git+ssh://git@github.com/haard/test" | |
repo = hgapi.Repo(path) | |
for hgb, gb in branch_mapping: | |
repo.hg_command('bookmark', '-r', hgb, gb) | |
repo.hg_command("--config", "paths.default=" + target, "--config", "extensions.hggit=", "push") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the 'same' code as BitSyncHub uses