Mercurial > hg > hg-git
annotate README.md @ 163:74f38b519887
got octomerges working
author | Scott Chacon <schacon@gmail.com> |
---|---|
date | Wed, 27 May 2009 17:28:01 -0700 |
parents | 763ae6988091 |
children | c3aeeff8fb29 |
rev | line source |
---|---|
46
0bfcd0c06b8e
clarified in the readme that this is still alpha
Scott Chacon <schacon@gmail.com>
parents:
45
diff
changeset
|
1 *Warning: This plugin is not yet stabilized. Use to help me identify bugs, but it will be a few weeks before its fully stable.* |
0bfcd0c06b8e
clarified in the readme that this is still alpha
Scott Chacon <schacon@gmail.com>
parents:
45
diff
changeset
|
2 |
163 | 3 *Project status as of 5/27:* Pretty solid, but a bit slow - can losslessly convert most major scenarios and can handle projects up to several thousand commits. Submodules in Git are not handled. See TODO.txt for full list of things I'm working on. |
111 | 4 |
5 | |
43 | 6 Hg-Git Mercurial Plugin |
7 ======================= | |
8 | |
9 This is the Hg-Git plugin for Mercurial, adding the ability to push and pull to/from a Git server repository from Hg. This means you can collaborate on Git based projects from Hg, or use a Git server as a collaboration point for a team with developers using both Git and Hg. | |
10 | |
115
e28e669e2010
readme update - added sverre and fixed some stuff
Scott Chacon <schacon@gmail.com>
parents:
114
diff
changeset
|
11 The Hg-Git plugin can convert commits/changesets losslessly from one system to another, so you can push via an Hg repository and another Hg client can pull it and their changeset node ids will be identical - Mercurial data does not get lost in translation. It is intended that Hg users may wish to use this to collaborate even if no Git users are involved in the project, and it may even provide some advantages if you're using Bookmarks (see below). |
43 | 12 |
45
a4e53be79ca6
bit of doc cleanup - added dependencies section
Scott Chacon <schacon@gmail.com>
parents:
44
diff
changeset
|
13 Dependencies |
a4e53be79ca6
bit of doc cleanup - added dependencies section
Scott Chacon <schacon@gmail.com>
parents:
44
diff
changeset
|
14 ============ |
a4e53be79ca6
bit of doc cleanup - added dependencies section
Scott Chacon <schacon@gmail.com>
parents:
44
diff
changeset
|
15 |
a4e53be79ca6
bit of doc cleanup - added dependencies section
Scott Chacon <schacon@gmail.com>
parents:
44
diff
changeset
|
16 This plugin is implemented entirely in Python - there are no Git binary dependencies, you do not need to have Git installed on your system. There are in fact no external dependencies currently other than Mercurial. The plugin is known to work on Hg versions 1.1 and 1.2. |
a4e53be79ca6
bit of doc cleanup - added dependencies section
Scott Chacon <schacon@gmail.com>
parents:
44
diff
changeset
|
17 |
43 | 18 Commands |
19 ========= | |
20 | |
21 You can clone a Git repository from Hg by running `hg gclone [url]`. It will create a directory appended with a '-hg', for example, if you were to run `hg gclone git://github.com/schacon/munger.git` it would clone the repository down into the directory 'munger-hg', then convert it to an Hg repository for you. | |
22 | |
23 hg gclone git://github.com/schacon/munger.git | |
24 | |
25 If you are starting from an existing Hg repository, you have to setup a Git repository somewhere that you have push access to, add it as a Git remote and then run `hg gpush` from within your project. For example: | |
26 | |
27 $ cd hg-git # (an Hg repository) | |
28 $ hg gremote add origin git@github.com/schacon/hg-git.git | |
29 $ hg push | |
30 | |
31 This will convert all our Hg data into Git objects and push them up to the Git server. | |
32 | |
33 Now that you have an Hg repository that can push/pull to/from a Git repository, you can fetch updates with `hg gfetch`. | |
34 | |
35 $ hg gfetch | |
36 | |
37 That will pull down any commits that have been pushed to the server in the meantime and give you a new head that you can merge in. | |
38 | |
39 Hg Bookmarks Integration | |
40 ======================== | |
41 | |
42 Hg-Git works will use your bookmarks if you have any or have the bookmarks extension enabled. It will allow you to push your bookmarks up to the Git server as branches and will pull Git branches down and set them up as bookmarks if you want. | |
43 | |
44 This is actually pretty cool, since you can use this extension to transfer your Hg bookmarks via the Git protocol, rather than having to scp them, as the Hg transfer protocol does not currently support transferring bookmarks. | |
45 | |
46 Installing | |
47 ========== | |
48 | |
49 Clone this repository somewhere and make the 'extensions' section in your `~/.hgrc` file look something like this: | |
50 | |
51 [extensions] | |
52 hgext.bookmarks = | |
53 hgext.hg-git = [path-to]/hg-git | |
54 | |
55 That will enable the Hg-Git extension for you. The bookmarks section is not compulsory, but it makes some things a bit nicer for you. | |
44
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
56 |
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
57 Authors |
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
58 ======== |
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
59 |
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
60 * Scott Chacon <schacon@gmail.com> - main development |
115
e28e669e2010
readme update - added sverre and fixed some stuff
Scott Chacon <schacon@gmail.com>
parents:
114
diff
changeset
|
61 * Augie Fackler <durin42@gmail.com> - testing and moral support |
e28e669e2010
readme update - added sverre and fixed some stuff
Scott Chacon <schacon@gmail.com>
parents:
114
diff
changeset
|
62 * Sverre Rabbelier <sverre@rabbelier.nl> - gexport, mode and i18n stuff and misc fixes |
45
a4e53be79ca6
bit of doc cleanup - added dependencies section
Scott Chacon <schacon@gmail.com>
parents:
44
diff
changeset
|
63 * Dulwich Developers - most of this code depends on the awesome work they did. |
44
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
64 |
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
65 Sponsorship |
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
66 =========== |
234bb5784c8b
cleaned up documentation, created initial branch policy
Scott Chacon <schacon@gmail.com>
parents:
43
diff
changeset
|
67 |
45
a4e53be79ca6
bit of doc cleanup - added dependencies section
Scott Chacon <schacon@gmail.com>
parents:
44
diff
changeset
|
68 GitHub let me (Scott) work on this full time for several days, which is why this got done at all. If you're looking for a free Git host to push your open source Hg projects to, do try us out (http://github.com). |