自宅作業(という名の趣味)で2回も躓いたので書いておく。
「ドキュメントとログちゃんと見ろよ」という話なのだが。
aptのログを見よう
インストールし終わった最後の方に以下のメッセージが出る。
You can follow the instructions in /usr/share/doc/mercurial-git/README.Debian to enable it.
この通りなのである。
中身を見てみよう。
hg-git for Debian
To enable the extension, add the following lines to your hgrc::
[extensions]
hgext.bookmarks =
hgext.git =Hg-git uses bookmarks [1]_ (rather than branches) to track git branches.
つまりお手元のhgrcの[extensions]セクションにhgext.git =
と入れるだけである。
どうしてハマるの?
公式ページを見てみよう。
Hg-Git Mercurial Plugin
Lastly, make sure the following is in your ~/.hgrc:
[extensions] hgext.bookmarks = hggit =
easy_installで入れた場合にはhggit
なのかもしれないが、今回はdebパッケージで配布されている物を使ったので、そりゃあパッケージの付属ドキュメント通りにしないとね。
余談
他にもつまづきそうなポイントはこちらが思いつく。
hg-git で github に push するときに忘れるな hg bookmark -f master - Qiita
ただし、複数人で作業しているときはmasterにいきなり上げたくは無いと思うので、その際はhg-gitを入れた後にgitのブランチの感覚でmaster以外のbookmarkをつけて、そのbookmarkを指定してpushすればいいのかな。(要調査)
# 予めhgrcの[path]セクションに「github」というアドレスを指定したと想定。
hg bookmark -r default fix_XYZ
hg push -B fix_XYZ github