/
index.html
131 lines (102 loc) · 6.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Hg-Git Mercurial Plugin</title>
<script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="js/thickbox-compressed.js"></script>
<script type="text/javascript" src="http://github.com/javascripts/jquery.corner.js"></script>
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/print.css" type="text/css" media="print">
<!--[if IE]>
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen, projection">
<![endif]-->
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8"/>
<link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen"/>
</head>
<body>
<div class="container">
<div class="span-21" id="header">
<div class="span-10">
<a href="http://github.com"><img height="50" src="images/logov3.png"></a>
</div>
<div class="span-11 last">
<div id="links">
get the source in
<a href="http://github.com/schacon/hg-git">git</a> or
<a href="http://bitbucket.org/Scotty/hg-git">hg</a>, then
<a href="http://github.com/schacon/hg-git/issues">send feedback</a>
</div>
</div>
</div>
<div class="span-21" id="welcome">
<h1 class="tbar"><small>the</small> Hg-Git <small>mercurial plugin</small></h1>
<p>This is the Hg-Git plugin for Mercurial, adding the ability to <strong>push to and pull from a Git server</strong> 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.</p>
<p><strong>Achtung! This software is still in beta.</strong> The mapping scheme is still subject to change, so use it if you want to submit bug reports, but you may not want to use it for production work quite yet. I figure it will be release quality in a few weeks (in May sometime).</p>
</div>
<div class="span-21">
<div class='section'>
<div class="title">The Big Idea</div>
<img style="float:right; padding:10px;" height="120" src="images/server.png">
<p>The Hg-Git plugin can <strong>convert commits/changesets losslessly</strong> from one system to another, so you can push via an Hg repository and another Hg client can pull it and thier changeset node ids will be identical - Mercurial data does not get lost in translation. </p>
<p>It is intended that Hg users may wish to use this to collaborate even if no Git users are involved in the project, as it may provide some advantages if you're using Bookmarks (see below).</p>
</div>
<div class='section'>
<div class="title">Commands</div>
<p>You can clone a Git repository from Hg by running <code>hg clone [url]</code>. It will create a directory appended with a '-hg', for example, if you were to run <code>hg clone git://github.com/schacon/munger.git</code> it would clone the repository down into the directory 'munger-hg', then convert it to an Hg repository for you.</p>
<pre>hg clone git://github.com/schacon/munger.git</pre>
<p>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 <code>hg gpush</code> from within your project. For example:</p>
<pre>$ cd hg-git # (an Hg repository)
$ hg gremote add origin git@github.com:schacon/hg-git.git
$ hg gpush</pre>
<p>This will convert all our Hg data into Git objects and push them up to the Git server.</p>
<p>Now that you have an Hg repository that can push/pull to/from a Git repository, you can fetch updates with <code>hg gfetch</code>.</p>
<pre>$ hg gfetch</pre>
<p>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.</p>
</div>
<div class='section'>
<div class="title">Installing</div>
<p>Clone this repository somewhere, or <a href="http://github.com/schacon/hg-git/zipball/master">download a snapshot</a>, then make the 'extensions' section in your '<code>~/.hgrc</code>' file look something like this:</p>
<pre>[extensions]
hgext.bookmarks =
hgext.hg-git = [path-to]/hg-git</pre>
<p>That will enable the Hg-Git extension for you. The bookmarks section is not compulsory, but it makes some things a bit nicer.</p>
</div>
<div class='section'>
<div class="title">Dependencies</div>
<p>This plugin is implemented entirely in Python - there are <strong>no Git binary dependencies</strong>, 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.</p>
</div>
</div>
<div class="span-21">
<div id="bottom">
This plugin was developed by the folks at <a href="http://github.com">GitHub</a>
</div>
</div>
<div id="footer" class="span-21">
<div class="info span-12">
<div class="links">
<a href="http://github.com/blog">Blog</a> |
<a href="http://support.github.com/">Support</a> |
<a href="http://github.com/training">Git Training</a> |
<a href="http://github.com/contact">Contact</a> |
<a href="http://groups.google.com/group/github/">Google Group</a>
</div>
<div class="company">
GitHub is <a href="http://logicalawesome.com/">Logical Awesome</a> ©2009 | <a href="http://github.com/site/terms">Terms of Service</a> | <a href="http://github.com/site/privacy">Privacy Policy</a>
</div>
</div>
<div class="fork span-7">
This website is <a href="http://github.com/hg-git/hg-git.github.com">open source</a>.
Please help us by forking the project and adding to it.
</div>
</div>
</div>
<script type="text/javascript">
$(function() {
$('.title').corner();
$('.tbar').corner();
});
</script>
</body>
</html>