{"thread":{"id":"36583","subject":"[PATCH] remote-helpers: add documentation for git-remote-hg/bzr","startedAt":"2014-05-05T20:23:49Z","lastAt":"2014-05-05T20:23:49Z","messageCount":1,"participants":["Felipe Contreras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"240732","messageId":"1399321429-4426-1-git-send-email-felipe.contreras@gmail.com","threadId":"36583","inReplyTo":null,"subject":"[PATCH] remote-helpers: add documentation for git-remote-hg/bzr","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-05-05T20:23:49Z","receivedAt":"2014-05-05T20:23:49Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Mostly copied from my personal github wiki.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Documentation/git-remote-bzr.txt |  74 ++++++++++++++++++++++++\n Documentation/git-remote-hg.txt  | 121 +++++++++++++++++++++++++++++++++++++++\n 2 files changed, 195 insertions(+)\n create mode 100644 Documentation/git-remote-bzr.txt\n create mode 100644 Documentation/git-remote-hg.txt\n\ndiff --git a/Documentation/git-remote-bzr.txt b/Documentation/git-remote-bzr.txt\nnew file mode 100644\nindex 0000000..b211e7f\n--- /dev/null\n+++ b/Documentation/git-remote-bzr.txt\n@@ -0,0 +1,74 @@\n+git-remote-bzr(1)\n+================\n+\n+NAME\n+----\n+git-remote-bzr - bidirectional bridge between Git and Bazaar\n+\n+\n+SYNOPSIS\n+--------\n+[verse]\n+'git clone' bzr::<bzr repository>\n+\n+\n+DESCRIPTION\n+-----------\n+\n+This tool allows you to transparently clone, fetch and push to and from Bazaar\n+repositories as if they were Git ones.\n+\n+To use it you simply need to use the \"'bzr::'\" prefix when specifying a remote URL\n+(e.g. when cloning).\n+\n+\n+EXAMPLE\n+-------\n+--------------------------------------\n+git clone bzr::lp:ubuntu/hello\n+--------------------------------------\n+\n+\n+NOTES\n+-----\n+\n+Remember to run `git gc --aggressive` after cloning a repository, specially if\n+it's a big one. Otherwise lots of space will be wasted.\n+\n+The oldest version of Bazaar supported is 2.0. Older versions are not tested.\n+\n+Branches vs. repositories\n+~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Bazaar's UI can clone only branches, but a repository can contain multiple\n+branches, and 'git-remote-bzr' can clone both.\n+\n+For example, to clone a branch:\n+\n+-------------------------------------\n+git clone bzr::bzr://bzr.savannah.gnu.org/emacs/trunk emacs-trunk\n+-------------------------------------\n+\n+And to clone the whole repository:\n+\n+-------------------------------------\n+git clone bzr::bzr://bzr.savannah.gnu.org/emacs emacs\n+-------------------------------------\n+\n+The second command would clone all the branches contained in the emacs\n+repository, however, it's possible to specify only certain branches:\n+\n+-------------------------------------\n+git config remote-bzr.branches 'trunk, xwindow'\n+-------------------------------------\n+\n+Some remotes don't support listing the branches contained in the repository, in\n+which cases you need to manually specify the branches, and while you can\n+specify the configuration in the clone command, you might find this easier:\n+\n+-------------------------------------\n+git init emacs\n+git remote add origin bzr::bzr://bzr.savannah.gnu.org/emacs\n+git config remote-bzr.branches 'trunk, xwindow'\n+git fetch\n+-------------------------------------\ndiff --git a/Documentation/git-remote-hg.txt b/Documentation/git-remote-hg.txt\nnew file mode 100644\nindex 0000000..0cceb76\n--- /dev/null\n+++ b/Documentation/git-remote-hg.txt\n@@ -0,0 +1,121 @@\n+git-remote-hg(1)\n+================\n+\n+NAME\n+----\n+git-remote-hg - bidirectional bridge between Git and Mercurial\n+\n+\n+SYNOPSIS\n+--------\n+[verse]\n+'git clone' hg::<hg repository>\n+\n+\n+DESCRIPTION\n+-----------\n+\n+This tool allows you to transparently clone, fetch and push to and from Mercurial\n+repositories as if they were Git ones.\n+\n+To use it you simply need to use the \"'hg::'\" prefix when specifying a remote URL\n+(e.g. when cloning).\n+\n+\n+EXAMPLE\n+-------\n+------------\n+$ git clone hg::http://selenic.com/repo/hello\n+------------\n+\n+\n+CONFIGURATION\n+-------------\n+\n+If you want to see Mercurial revisions as Git commit notes:\n+\n+--------------------------------------\n+% git config core.notesRef refs/notes/hg\n+--------------------------------------\n+\n+If you are not interested in Mercurial permanent and global branches (aka. commit labels):\n+\n+--------------------------------------\n+% git config --global remote-hg.track-branches false\n+--------------------------------------\n+\n+With this configuration, the 'branches/foo' refs won't appear.\n+\n+If you want the equivalent of `hg clone --insecure`:\n+\n+--------------------------------------\n+% git config --global remote-hg.insecure true\n+--------------------------------------\n+\n+If you want 'git-remote-hg' to be compatible with 'hg-git', and generate exactly the same commits:\n+\n+--------------------------------------\n+% git config --global remote-hg.hg-git-compat true\n+--------------------------------------\n+\n+NOTES\n+-----\n+\n+Remember to run `git gc --aggressive` after cloning a repository, specially if\n+it's a big one. Otherwise lots of space will be wasted.\n+\n+The oldest version of Mercurial supported is 1.9. For the most part 1.8 works,\n+but you might experience some issues.\n+\n+Pushing branches\n+~~~~~~~~~~~~~~~~\n+\n+To push a Mercurial named branch, you need to use the \"branches/\" prefix:\n+\n+--------------------------------------\n+% git checkout branches/next\n+# do stuff\n+% git push origin branches/next\n+--------------------------------------\n+\n+All the pushed commits will receive the \"next\" Mercurial named branch.\n+\n+*Note*: Make sure you don't have +remote-hg.track-branches+ disabled.\n+\n+Cloning HTTPS\n+~~~~~~~~~~~~~\n+\n+The simplest way is to specify the user and password in the URL:\n+\n+--------------------------------------\n+git clone hg::https://user:password@bitbucket.org/user/repo\n+--------------------------------------\n+\n+You can also use the http://mercurial.selenic.com/wiki/SchemesExtension[schemes extension]:\n+\n+--------------------------------------\n+[auth]\n+bb.prefix = https://bitbucket.org/user/\n+bb.username = user\n+bb.password = password\n+--------------------------------------\n+\n+Finally, you can also use the\n+https://pypi.python.org/pypi/mercurial_keyring[keyring extension].\n+\n+CAVEATS\n+-------\n+\n+The only major incompatibility is that Git octopus merges (a merge with more\n+than two parents) are not supported.\n+\n+Mercurial branches and bookmarks have some limitations of Git branches: you\n+can't have both 'dev/feature' and 'dev' (as Git uses files and directories to\n+store them).\n+\n+Multiple anonymous heads (which are useless anyway) are not supported; you\n+would only see the latest head.\n+\n+Closed branches are not supported; they are not shown and you can't close or\n+reopen. Additionally in certain rare situations a synchronization issue can\n+occur (https://github.com/felipec/git/issues/65[Bug #65]).\n-- \n1.9.2+fc1.25.g15bd061\n"}]}