annotate README.md @ 3:7d99080f276f default tip

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