「Mercurial」の版間の差分
(ページの作成:「Category:バージョン管理システム en:Mercurial [http://mercurial.selenic.com/ Mercurial] (しばしば '''hg''' と呼称されます) は Python で書...」) |
(相違点なし)
|
2015年2月18日 (水) 16:42時点における版
Mercurial (しばしば hg と呼称されます) は Python で書かれた分散型バージョン管理システムであり Git, Bazaar, Darcs と多くの点で似ているところがあります。
インストール
公式リポジトリの mercurial をインストールしてください。
設定
At the minimum you should configure your username or mercurial will most likely give you an error when trying to commit. Do this by editing ~/.hgrc
and adding the following:
~/.hgrc
[ui]
username = John Smith
To use the graphical browser hgk aka. hg view, add the following to ~/.hgrc
(see forum thread):
~/.hgrc
[extensions]
hgk=
You will need to install tk before running hg view to avoid the rather cryptic error message:
/usr/bin/env: wish: No such file or directory
To remove Mercurial warnings of unverified certificate fingerprints, add the following to ~/.hgrc
(see Mercurial wiki):
~/.hgrc
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt
If you are going to be working with large repositories (e.g. ttf-google-fonts-hgAUR), you may want to enable the progress extension by adding it to your ~/.hgrc
file:
~/.hgrc
[extensions]
progress =
This will show progress bars on longer operations after 3 seconds. If you would like the progress bar to show sooner, you can append the following to your configuration file:
~/.hgrc
[progress]
delay = 1.5
使用方法
All mercurial commands are initiated with the hg prefix. To see a list of some of the common commands, run
$ hg help
You can either work with a pre-existing repository (collection of code or files), or create your own to share.
To work with a pre-existing repository, you must clone it to a directory of your choice:
$ mkdir mercurial
$ cd mercurial
$ hg clone http://hg.serpentine.com/tutorial/
To create you own, change to the directory you wish to share and initiate a mercurial project
$ cd myfiles
$ hg init myfiles
ドットファイルリポジトリ
If you intend on creating a repo of all your ~/.
files, you simply initiate the project in your home folder:
$ hg init
It is then just a case of adding the specific files you wish to track:
$ hg add
You can then create a ~/.hgignore
to ensure that only the files you wish to include in the repository are tracked by mercurial.
参照
- Mercurial: The Definitive Guide
- hginit.com - a tutorial by Joel Spolsky
- Mercurial Kick-Start one more tutorial by Aragost.
- Bitbucket - free and commercial hosting of mercurial repositories
- Intuxication - free mercurial hosting