Mercurial > hg-git-sync
comparison README.md @ 0:6da45bb59fd0
Initial commit.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 18 Feb 2016 11:28:49 -0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6da45bb59fd0 |
---|---|
1 | |
2 # Hg-Git Sync | |
3 | |
4 This is a small Python script that tries to fix the most common problems with | |
5 [Hg-Git][1]. It's not meant to be awesome, it's just meant to get me out of | |
6 trouble. | |
7 | |
8 If your `.hg/git-mapfile` is out of sync (pointing to bad commit hashes): | |
9 | |
10 cd path/to/your/repo | |
11 python hggit_sync.py | |
12 | |
13 This will rebuild the map file by looking at the commit history of both the | |
14 Mercurial and Git repos, and figure out (quite stupidly so far) how the hashes | |
15 correspond to each other. | |
16 | |
17 If you're in deeper trouble, however, like you get error messages about your | |
18 local Git mirror having hashes that the server doesn't know about: | |
19 | |
20 cd path/to/your/repo | |
21 python hggit_sync.py --rebuild git@github.com/whatever/something.git | |
22 | |
23 This will wipe your local Git mirror, re-fetch it from the given remote URL, and | |
24 rebuild the map file. | |
25 | |
26 Of course, this script is offered without any guarantees, may format your | |
27 hard-drive, yada yada. You know the drill when it comes to running random code | |
28 you found on the web! (I hope) | |
29 | |
30 | |
31 [1]: https://bitbucket.org/durin42/hg-git/src | |
32 |