紹介マニアMoinMoin

概要

公式サイト

Mercurial: shortlog

Mercurial Wiki

Mercurial binary packages for Windows and Mac OS X

http://www.selenic.com/mercurial/release/

http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages

関連サイト

TortoiseHg @ SourceForge

TracMercurial - The Trac Project - Trac

JapaneseTutorial - Mercurial

利用プロジェクト

OpenSolaris Source Code Management at OpenSolaris.orgOpenSolarisで利用

インストール

http://www.selenic.com/mercurial/release/

tar xvfz mercurial-1.0.2.tar.gz
cd mercurial-1.0.2
sudo python setup.py install

yumなら以下

yum install -y mercurial

参考:Pythonで分散バージョン管理

XREAとかSakraとかにインストール

www.horaguchi.net - tako3 のソースは今まで、Free Subversion Hosting の Unfuddle に上げてたんだけど、

python setup.py install --home=~

設定

最低限の設定はだいたい以下です

コミット者情報

$HOME/.hgrc にコミット時の名前とメルアドを設定します

[ui]
username = yourname <sample@sample.com>

無視ファイル設定

$HOME/.hgignoreに無視ファイルを設定します

syntax: glob
*~
*.elc
*.pyc
*.class
.svn
.semantic.cache
.DS_Store
TAGS

$Id$ とかを展開する

cvsとかsvn propset とか利用して $Id$ 等のプロパティを利用している場合hgでも利用したいかもしれない。

.hgrc に設定する。

全部有効にする場合は以下みたいな設定になる。

[extensions]
hgext.keyword =
[keyword]
* =

設定したら

hg kwexpand ファイル名

として展開を指定してあげないと有効にならない。

コマンド

hg help コマンドのようにすると英語だけど説明がでます。

レポジトリ

hg clone path

リモートよりコピー

hg init

初期化

hg paths

push、pull先確認

hg push

パスのレボジトリに反映

hg pull

パスのレボジトリより取得

情報

hg status

ステータス

hg diff file.txt

比較

hg log

履歴

hg annotate file.txt

どのリビジョンでどこが変更されたか

hg tip

tipリビジョン

hg parents

いまいじってる物の親の情報

hg heads

レポジトリ先端情報

コミット

hg add file.txt

追加

hg ci -m "コメント" file.txt

コミット

hg remove file.txt

削除

hg update

更新

hg mv form to

名前変更(copy+removeになる)

hg revert

先端に戻す(ローカルは削除される)

hg revert -rREV file.txt

特定リビジョンを取得

hg rollback

最後のci,pull等を取り消し

パッチ

hg import patch

パッチの適用

hg export

パッチ作成

hg incoming

pullされるファイル

hg outgoing

pushされるファイル

hg fetch

pull+update+merge

タグ・ブランチ

hg copy from to

コピーする

hg tag

タグ一覧

hg tag タグ名

タグ付与

branchの考え方とかは以下が詳しい Mercurial 勉強中 (6) - named branch と update -C - daily dayflower

Emacs

mvc.el

wac's webpage./mvc.el

DVC.el

DVC: Distributed Version Control for Emacs

XSteve's Emacs DVC.el page

DVC - Distributed Version Control for Emacs

Trac連携

CentOSにTrac+TracMercurialをインストールする - Knowledge Database IT

Eclipse

Mercurial Eclipse

Mac で SSH認証が上手く通らない場合は以下を利用する

Josh (Formerly) In Antarctica: Mercurial Push from IntelliJ

共有サイト

Mercurial hosting — bitbucket.org

参考サイト

steps to phantasien t(2007-05-19) Mercurial で手軽な共有レポジトリをつくろう

satolog: Mercurial と Trac のメモ

XREA FREE で Mercurial を - miau's blog?

XREAでMercurialをインストール | Sarabande

JapaneseCGI Install - Mercurial

Greenbear Laboratory - Mercurialを使ってみよう


CategoryProgramingTools

紹介マニアMoinMoin: Mercurial (last edited 2019-10-12 04:08:10 by sakito)