#pragma section-numbers off [[TableOfContents]] = 概要 = = 公式サイト = [http://www.selenic.com/hg/ Mercurial: shortlog] [http://www.selenic.com/mercurial/wiki/ Mercurial Wiki] [http://mercurial.berkwood.com/ Mercurial binary packages for Windows and Mac OS X] http://www.selenic.com/mercurial/release/ http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages = 関連サイト = [http://tortoisehg.sourceforge.net/ TortoiseHg @ SourceForge] [http://trac.edgewall.org/wiki/TracMercurial TracMercurial - The Trac Project - Trac] [http://www.selenic.com/mercurial/wiki/index.cgi/JapaneseTutorial JapaneseTutorial - Mercurial] = 利用プロジェクト = [http://opensolaris.org/os/community/tools/scm/ OpenSolaris Source Code Management at OpenSolaris.org]:{{{OpenSolaris}}}で利用 = インストール = http://www.selenic.com/mercurial/release/ {{{ tar xvfz mercurial-1.2.1.tar.gz cd mercurial-1.2.1 sudo python setup.py install }}} yumなら以下 {{{ yum install -y mercurial }}} 参考:[http://python.matrix.jp/modules/mercurial.html Pythonで分散バージョン管理] == XREAとかSakraとかにインストール == [http://www.horaguchi.net/article.php/2520/ www.horaguchi.net - tako3 のソースは今まで、Free Subversion Hosting の Unfuddle に上げてたんだけど、] {{{ python setup.py install --home=~ }}} = 設定 = 最低限の設定はだいたい以下です == コミット者情報 == $HOME/.hgrc にコミット時の名前とメルアドを設定します {{{ [ui] username = yourname }}} == 無視ファイル設定 == $HOME/.hgignoreに無視ファイルを設定します {{{ syntax: glob *~ *.elc *.pyc *.class .svn .semantic.cache .DS_Store TAGS }}} == $Id$ とかを展開する == cvsとかsvn propset とか利用して $Id$ 等のプロパティを利用している場合hgでも利用したいかもしれない。 hgextフォルダ以下にkeyword.pyが必要。 .hgrc に設定する。 全部有効にする場合は以下みたいな設定になる。 {{{ [extensions] hgext.keyword = [keyword] * = }}} 設定したら {{{ hg kwexpand ファイル名 }}} として展開を指定してあげないと有効にならない。 詳細は http://www.selenic.com/mercurial/wiki/index.cgi/KeywordPlan http://www.selenic.com/mercurial/wiki/index.cgi/KeywordExtension に記述がある。 = コマンド = {{{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の考え方とかは以下が詳しい [http://d.hatena.ne.jp/dayflower/20080314/1205395287 Mercurial 勉強中 (6) - named branch と update -C - daily dayflower] = Emacs = == aHg == [https://disi.unitn.it/~griggio/ahg.html#quick-guide aHg: An Emacs front-end for the Mercurial SCM] == mvc.el == [http://umiushi.org/~wac/mvc/ wac's webpage./mvc.el] == DVC.el == [http://download.gna.org/dvc/ DVC: Distributed Version Control for Emacs] [http://www.xsteve.at/prg/emacs_dvc/ XSteve's Emacs DVC.el page] [http://www-aos.eps.s.u-tokyo.ac.jp/~takagi/dvc.html DVC - Distributed Version Control for Emacs] = Trac連携 = [http://it.kndb.jp/entry/show/id/2363 CentOSにTrac+TracMercurialをインストールする - Knowledge Database IT] = Eclipse = [http://www.vectrace.com/mercurialeclipse/ Mercurial Eclipse] Mac で SSH認証が上手く通らない場合は以下を利用する [http://josh-in-antarctica.blogspot.com/2008/06/mercurial-push-from-intellij.html Josh (Formerly) In Antarctica: Mercurial Push from IntelliJ] = 共有サイト = [http://www.bitbucket.org/ Mercurial hosting — bitbucket.org] = 参考サイト = [http://dodgson.org/omo/t/?date=20070519#p02 steps to phantasien t(2007-05-19) Mercurial で手軽な共有レポジトリをつくろう] [http://po3a.blogspot.com/2006/10/mercurial-trac.html satolog: Mercurial と Trac のメモ] [http://miau.s9.xrea.com/blog/rsd.php?itemid=818 XREA FREE で Mercurial を - miau's blog?] [http://sarabande.info/2008/01/04/xrea%E3%81%A7mercurial%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/ XREAでMercurialをインストール | Sarabande] [http://www.selenic.com/mercurial/wiki/index.cgi/JapaneseCGI_Install JapaneseCGI Install - Mercurial] [http://mono.kmc.gr.jp/~yhara/w/?MercurialTutorial Greenbear Laboratory - Mercurialを使ってみよう] ---- CategoryProgramingTools