Hacking:Tools

From Seamly
Revision as of 13:26, 26 May 2016 by Dismine (talk | contribs) (Added information about using hg-git extension.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

hg-git Extension

For export to github and launchpad we use hg-git extension. Please read these two articles for more details: the Hg-Git mercurial plugin and hg-git Extension.

Warning! Because service Launchpad doesn't use git repository directly and converts to Bazaar we can't use hg-git version higher than 0.6.1.

For our work we use code from repository http://bitbucket.org/durin42/hg-git/

Usage: For working extension need to create a bookmark. Command

hg bookmark -f master

will set a bookmark for current branch. Most actively we export 'develop' and 'default'.

Before pushing create path 'github' in .hgrc file.

[extensions]
hgext.bookmarks =
hggit = /home/dismine/hg-git/hggit

[paths]
github = git+ssh://git@github.com/<user_name>/<repository_name>.git

Run

hg push github

for pushing changes to github.

Note the command can hang. You can wait finish or close terminal without losing data.