test: remove httpd tests that ask for user
[git] / Documentation / git-remote-hg.txt
1 git-remote-hg(1)
2 ================
3
4 NAME
5 ----
6 git-remote-hg - bidirectional bridge between Git and Mercurial
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git clone' hg::<hg repository>
13
14
15 DESCRIPTION
16 -----------
17
18 This tool allows you to transparently clone, fetch and push to and from Mercurial
19 repositories as if they were Git ones.
20
21 To use it you simply need to use the "'hg::'" prefix when specifying a remote URL
22 (e.g. when cloning).
23
24
25 EXAMPLE
26 -------
27 ------------
28 $ git clone hg::http://selenic.com/repo/hello
29 ------------
30
31
32 CONFIGURATION
33 -------------
34
35 If you want to see Mercurial revisions as Git commit notes:
36
37 --------------------------------------
38 % git config core.notesRef refs/notes/hg
39 --------------------------------------
40
41 If you are not interested in Mercurial permanent and global branches (aka. commit labels):
42
43 --------------------------------------
44 % git config --global remote-hg.track-branches false
45 --------------------------------------
46
47 With this configuration, the 'branches/foo' refs won't appear.
48
49 If you want the equivalent of `hg clone --insecure`:
50
51 --------------------------------------
52 % git config --global remote-hg.insecure true
53 --------------------------------------
54
55 If you want 'git-remote-hg' to be compatible with 'hg-git', and generate exactly the same commits:
56
57 --------------------------------------
58 % git config --global remote-hg.hg-git-compat true
59 --------------------------------------
60
61 NOTES
62 -----
63
64 Remember to run `git gc --aggressive` after cloning a repository, specially if
65 it's a big one. Otherwise lots of space will be wasted.
66
67 The oldest version of Mercurial supported is 1.9. For the most part 1.8 works,
68 but you might experience some issues.
69
70 Pushing branches
71 ~~~~~~~~~~~~~~~~
72
73 To push a Mercurial named branch, you need to use the "branches/" prefix:
74
75 --------------------------------------
76 % git checkout branches/next
77 # do stuff
78 % git push origin branches/next
79 --------------------------------------
80
81 All the pushed commits will receive the "next" Mercurial named branch.
82
83 *Note*: Make sure you don't have +remote-hg.track-branches+ disabled.
84
85 Cloning HTTPS
86 ~~~~~~~~~~~~~
87
88 The simplest way is to specify the user and password in the URL:
89
90 --------------------------------------
91 git clone hg::https://user:password@bitbucket.org/user/repo
92 --------------------------------------
93
94 You can also use the http://mercurial.selenic.com/wiki/SchemesExtension[schemes extension]:
95
96 --------------------------------------
97 [auth]
98 bb.prefix = https://bitbucket.org/user/
99 bb.username = user
100 bb.password = password
101 --------------------------------------
102
103 Finally, you can also use the
104 https://pypi.python.org/pypi/mercurial_keyring[keyring extension].
105
106 CAVEATS
107 -------
108
109 The only major incompatibility is that Git octopus merges (a merge with more
110 than two parents) are not supported.
111
112 Mercurial branches and bookmarks have some limitations of Git branches: you
113 can't have both 'dev/feature' and 'dev' (as Git uses files and directories to
114 store them).
115
116 Multiple anonymous heads (which are useless anyway) are not supported; you
117 would only see the latest head.
118
119 Closed branches are not supported; they are not shown and you can't close or
120 reopen. Additionally in certain rare situations a synchronization issue can
121 occur (https://github.com/felipec/git/issues/65[Bug #65]).