LoginSignup
9
10

More than 5 years have passed since last update.

MercurialプロジェクトをGithubにフォークする

Last updated at Posted at 2014-02-27

プロジェクトをフォークしよう!→Mercurialだった

Google codeなんかの古いプロジェクトだとMercurialだったりして、Githubにフォークするのが面倒なんですよね。

MercurialはGitと並んで人気の高いバージョン管理システムで、Gitと同じく分散型リポジトリであることや、SVNからリポジトリをチェックアウト出来たりと、ライバル同士のような関係ですね。

そんなMercurialはGithubではサポートされていないのですが、hg-gitというMercurialのプラグインを使うと、MercurialプロジェクトをGithubにpush出来ました。

手順

  1. hg-gitの環境を用意する
  2. リポジトリからMercurialでプロジェクトをcloneする
  3. hg-gitを使ってGithubの空プロジェクトにpushする

MercurialプロジェクトをGitにpushしてしまうのがポイントですね。

環境構築

環境を用意するのが面倒なんですが、構築の手順は以下などで解説されています。

Ansibleに定義したものがこちらになります。

progre/template-vagrant at hg-git

後、push先のGithubのプロジェクトを用意しておきましょう。

Create a New Repository - Github

実行

環境が整えば、後は簡単です。

$ hg clone 【MercurialのリポジトリURL】
$ cd 【リポジトリのディレクトリ名】
$ hg push git+ssh://【空のGithubプロジェクト】

後はお好きな作業空間でGithubのプロジェクトをCloneするだけです。

実際にフォークしてみた例がこちらになります。

adblock-plus-japanese-filter - Google Project Hosting

progre/adblock-plus-japanese-filter - Github

9
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
10