annotate README.md @ 115:e28e669e2010

readme update - added sverre and fixed some stuff
author Scott Chacon <schacon@gmail.com>
date Mon, 11 May 2009 10:36:23 -0700
parents 73795bbb68ca
children 366052cae03c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
115
e28e669e2010 readme update - added sverre and fixed some stuff
Scott Chacon <schacon@gmail.com>
parents: 114
diff changeset
3 *Project status as of 5/11:* Pretty solid, but a bit slow - can losslessly convert most major scenarios and can handle projects up to several thousand commits. Encodings, submodules and octopus merges in Git are not handled well, nor are tags in either system. See TODO.txt for full list of things I'm working on.
111
c00bee6c5de7 status update
Scott Chacon <schacon@gmail.com>
parents: 46
diff changeset
4
c00bee6c5de7 status update
Scott Chacon <schacon@gmail.com>
parents: 46
diff changeset
5
43
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
6 Hg-Git Mercurial Plugin
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
7 =======================
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
8
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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.
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
18 Commands
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
19 =========
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
20
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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.
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
22
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
23 hg gclone git://github.com/schacon/munger.git
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
24
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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:
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
26
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
27 $ cd hg-git # (an Hg repository)
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
28 $ hg gremote add origin git@github.com/schacon/hg-git.git
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
29 $ hg push
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
30
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
31 This will convert all our Hg data into Git objects and push them up to the Git server.
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
32
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
33 Now that you have an Hg repository that can push/pull to/from a Git repository, you can fetch updates with `hg gfetch`.
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
34
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
35 $ hg gfetch
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
36
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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.
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
38
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
39 Hg Bookmarks Integration
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
40 ========================
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
41
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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.
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
43
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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.
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
45
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
46 Installing
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
47 ==========
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
48
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
49 Clone this repository somewhere and make the 'extensions' section in your `~/.hgrc` file look something like this:
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
50
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
51 [extensions]
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
52 hgext.bookmarks =
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
53 hgext.hg-git = [path-to]/hg-git
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
54
e965895856e9 initial readme file
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
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).