このブログの更新は Twitterアカウント @m_hiyama で通知されます。
Follow @m_hiyama

メールでのご連絡は hiyama{at}chimaira{dot}org まで。

はじめてのメールはスパムと判定されることがあります。最初は、信頼されているドメインから差し障りのない文面を送っていただけると、スパムと判定されにくいと思います。

参照用 記事

最新のMercurialにした(マヌケな話)

MinGWbashを使ってますがWindowsです。


$ hg --version
Mercurial Distributed SCM (version 1.4.3+20100201)

Copyright (C) 2005-2010 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

いくら何でも古過ぎるだろう、コレ。で、Mercurialを最新にしようと思い立って、http://mercurial.selenic.com/downloads/ を眺めました。mercurial-2.1.win32-py2.6.exe をダウンロードして実行したらナニカがインストールされました。が、hgコマンドのバージョンは古いまま。いったい何がインストールされたの?


$ python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mercurial.hg
>>> mercurial.hg

あー、そういうことだったの。まー、これはこれでいいけど、hgコマンドは更新されてないので、Mercurial 2.1 MSI installer - x86 Windows - requires admin rights をダウンロード。実行したらナニカがインストールされました。が、hgコマンドのバージョンはまだ古いまま。ハレー?

インストーラは何も聞かず/何も言わず勝手にナニカをインストールしたので、c:/Program Files/Mercurial/ を眺めてみたら、タイムスタンプが今日なので、ここに新しいMercurialをインスールしたのでしょう、たぶん。


$ which hg
/c/Installed/Python26/Scripts/hg

$ echo $PATH | tr : $'\n' | grep -i mercurial
/c/Installed/Mercurial

パスは古いほうしか通ってない。


$ /c/Program\ Files/Mercurial/hg.exe --version
Mercurial Distributed SCM (version 2.1)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

おおー、確かに新しいバージョンがインストールされている。とりあえず alias で対処:


$ alias hg='/c/Program\ Files/Mercurial/hg.exe'

$ hg --version
Mercurial Distributed SCM (version 2.1)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

この状態で使ってみると:


$ hg parent
changeset: 540:792e2f98e04c
tag: tip
user: ckuwata
date: Mon Feb 20 10:21:14 2012 +0900
summary: Issue #420に対応


$ hg st -mard
M develop\SysSpecs\schemata\astu.casm.lit
M global\schemata\set.casm
M main\root\scripts\app-graph.caty

$ hg pull
pulling from https://m_hiyama@bitbucket.org/project_caty/dev
searching for changes
no changes found

普通に使えるね。たぶん、大丈夫でしょ。