Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Getting Mozilla Source Code Using Mercurial

Mercurial は、ユーザがソースコードの変更をローカルで追跡し、それらの変更を他のユーザと共有するためのソースコード管理ツールです。これは Firefox 3.5/Mozilla 1.9.1 およびそれ以降のリリースで使用されています。

註: Thunderbird 3.x や SeaMonkey 2.x の開発のためにパッチを提供したいときは、Comm-central のソースコード を使用してください。 Firefox 3.0.x, Thunderbird 2.0.x または SeaMonkey 1.1.x の開発のためにパッチを提供したいときは CVS のソースコード を使用してください。

クライアント設定

Mercurial のインストールと設定

Mercurial のインストール をご覧ください。

ソースツリーのチェックアウト

mozilla.org では複数の hg リポジトリがホストされています。全リポジトリのリストは https://hg.mozilla.org/ をご覧ください。

mozilla-central (メイン開発ツリー)

将来のリリースのためのソースコードは mozilla-central にあります。

最新のコミットされた変更を mozilla-central から入手するには、リポジトリを "clone" (Mercurial 用語) します:

# Mozilla ソースコードを src/ フォルダに pull します。
# 数百メガバイトの履歴が .hg フォルダにダウンロードされるため、しばらく時間がかかります。
hg clone https://hg.mozilla.org/mozilla-central/ src

cd src

mozilla-central (ビルド可能な最新のソースコード)

最新のコミットされた変更によってビルドが成功することはないでしょう。自動テストを通ったソースコードを入手してください。

mozilla-1.9.2 (Firefox 3.6)

Firefox 3.6 (Gecko 1.9.2) リリースのためのソースコードは releases/mozilla-1.9.2 にあります。このソースコードを入手するには:

# Mozilla ソースコードを 192src/ フォルダに pull します。
# 数百メガバイトの履歴が .hg フォルダにダウンロードされるため、しばらく時間がかかります。
hg clone https://hg.mozilla.org/releases/mozilla-1.9.2/ 192src

cd 192src

mozilla-1.9.1 (Firefox 3.5)

Firefox 3.5 (Gecko 1.9.1) リリースのためのソースコードは releases/mozilla-1.9.1 にあります。このソースコードを入手するには:

# Mozilla ソースコードを 191src/ フォルダに pull します。
# 数百メガバイトの履歴が .hg フォルダにダウンロードされるため、しばらく時間がかかります。
hg clone https://hg.mozilla.org/releases/mozilla-1.9.1/ 191src

cd 191src

comm-central (Thunderbird/SeaMonkey/Calendar)

comm-central のソースコードを pull してビルドするための情報については、Comm-central source code (Mercurial) を参照してください。

バンドル

If you have a poor network connection that is preventing 'hg clone' from completing, you may want to try downloading a bundle of the repository you're interested in (which, unlike 'hg clone', can be resumed when network problems interrupt the download).

Up to date bundles of some of the repositories listed at https://hg.mozilla.org/ are available on ftp.mozilla.org:

Bundles for some of the repositories can also be found by googling. For example, here is a comm-central bundle.  The 'hg pull' you will run later will verify the integrity of the bundle you download.

Once you have downloaded the repository bundle, follow these steps:

1. Initialize a new repository (in a directory called 'src' here):

hg init src

2. Un-bundle the bundle file to that repository:

cd src
hg unbundle /path/to/your/repository.bundle

3. Add the following lines to the file src/.hg/hgrc (you may have to create it) so that hg will automatically know where to pull changes from in future (replacing 'mozilla-central' as appropriate):

[paths]
default = https://hg.mozilla.org/mozilla-central/

4. Update the repository to get all the changes since the bundle was created (this step also doubles as a check of the bundle integrity since if its contents are not exactly the same as what's in the official repository then the 'hg pull' will fail):

hg pull

5. Check out a working copy from your new up to date repository:

hg up

ビルド

Configure を実行し、通常どおり .mozconfig ファイルと make -f client.mk でビルドします。

Linux_Build_Prerequisites

# mozconfig ファイルは自分で作成するか、この最小のデフォルトファイルを使用してください。
echo '. $topsrcdir/browser/config/mozconfig' > .mozconfig

# configure ファイルは 'autoconf-2.13' コマンドを使用して自動的に生成されます。
# ただし、OS X では autoconf213 が使用されます。
# あなたのシステムで autoconf-2.13 が正しいコマンド名でない場合、
# 例えば Ubuntu Linux では、下記のように実際のコマンド名を使用してください。
echo 'mk_add_options AUTOCONF=autoconf2.13' >> .mozconfig

# ビルドします。configure が自動的に実行されます。
make -f client.mk build

参照

  • Mercurial ページには、差分の作成、変更のコミット、共有リポジトリのパブリッシュについての情報があります。

ドキュメントのタグと貢献者

 このページの貢献者: teoli, taguchi-ch, Marsf
 最終更新者: teoli,