2008.02.20 Wednesday
まずはインストールだ。MacPortsにあるのならそれを利用したい。ということで、とりあえず探してみることに。
で、インストールの前に使えるvariantsを確認する。
よくわかんないけど、ImageMagickが邪魔してるみたいだ。最近はあまり使っていないからいったんdeactivateしちゃおっか。
ちょっと気になるImageMagickをもう一度activateしてみよう。
じゃ、早速gitを使ってみよう。
作業フローはこちらが超参考になる。
unknownplace.org | # 2008-02-19 | git-svn 作業フロー
ここと同じようにplaggerレポジトリに対して行ったところうまくいった。ただ、僕はPlaggerのコミッタというわけではないので、自分のレポジトリに対して使ってみることにする。「自分の」と言ってもCodeReposだけど。
いろいろ調べてみるとレポジトリにbranchesというディレクトリが切られていないとだめらしい。
(本当か?どこで見たのか、出典を探したけど見つからなかった。ごめんなさい。)
そこで、自分が管理しているモジュールのディレクトリに対して行ってみた。ここはtrunk,branches,tagsという一般的なsvnのレポジトリディレクトリ構成になっているから。
なんか、途中でNoticeみたいなのが出力されていたけど、まあ、それは無視...
で、続いてcheckoutだ。
えっと、ひとつのgitレポジトリの中に複数のbranchesやrepositoriesがある場合は、もうちょいとマニュアルを読めとな。
うーん。とりあえずいまはここまで。
こちらのマニュアルを読もうと思う。
Git ユーザマニュアル (バージョン 1.5.3 以降用)
CodeReposでgit使いたい!
2008/02/21 追記
問題一部解決編を書いた。
続・はやりのgitをインストールした。そして使ってみた。
$ port search gitおお、いい感じの結果だ。サマリーから想像するに、git-coreとcogitoだろう。(cgitなんかもちょっと気になるけど。)
cogito devel/cogito 0.18.2 Git core and cogito tools to provide a fully-distributed SCM
git-core devel/git-core 1.5.3.7 The stupid content tracker.
stgit devel/stgit 0.14.1 Push/pop utility on top of GIT
cgit www/cgit 0.7.1 A fast web interface for the git source code management system
で、インストールの前に使えるvariantsを確認する。
$ port variants git-coreふむふむ。svnってのは要チェックだな。
git-core has the variants:
universal
doc: Install HTML and plaintext documentation
svn: Bi-directional subversion repository support
$ port variants cogitoこっちは何も無いか。じゃ、早速インストールだ。
cogito has the variants:
universal
$ sudo port install git-core +svnありゃ、エラーがでるよ。
$ sudo port install cogito
(中略)
Error: port activate failed: Image error: /opt/local/lib/perl5/5.8.8/darwin-
2level/perllocal.pod is being used by the active ImageMagic port. Please
deactivate this port first, or use the -f flag to force the activation.
よくわかんないけど、ImageMagickが邪魔してるみたいだ。最近はあまり使っていないからいったんdeactivateしちゃおっか。
$ sudo port deactivate ImageMagickで、もう一度。
$ sudo port install git-core +svnこれでインストール。完了。
$ sudo port install cogito
ちょっと気になるImageMagickをもう一度activateしてみよう。
$ sudo port activate ImageMagickああ、やっぱだめだ。仕方が無いので、無理矢理activateすることに(force)。
---> Activating ImageMagick
Error: port activate failed: Image error: /opt/local/lib/perl5/5.8.8/darwin-
2level/perllocal.pod is being used by the active git-core port. Please
deactivate this port first, or use the -f flag to force the activation.
$ sudo port activate -f ImageMagickOK.
---> Activating ImageMagick
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/perllocal.pod
already exists. Moving to: /opt/local/lib/perl5/5.8.8/darwin-
2level/perllocal.pod.mp_1203443185.
じゃ、早速gitを使ってみよう。
作業フローはこちらが超参考になる。
unknownplace.org | # 2008-02-19 | git-svn 作業フロー
ここと同じようにplaggerレポジトリに対して行ったところうまくいった。ただ、僕はPlaggerのコミッタというわけではないので、自分のレポジトリに対して使ってみることにする。「自分の」と言ってもCodeReposだけど。
$ cd ~/Work/これは最後のfetchがうまくいかない。
$ mkdir -p coderepos
$ cd coderepos/
$ git svn init -s http://svn.coderepos.org/share/ share
$ cd share
$ git svn fetch
いろいろ調べてみるとレポジトリにbranchesというディレクトリが切られていないとだめらしい。
(本当か?どこで見たのか、出典を探したけど見つからなかった。ごめんなさい。)
そこで、自分が管理しているモジュールのディレクトリに対して行ってみた。ここはtrunk,branches,tagsという一般的なsvnのレポジトリディレクトリ構成になっているから。
/share/lang/perl/Games-Go/trunkこんな感じで。
/share/lang/perl/Games-Go/branches
/share/lang/perl/Games-Go/tags
$ cd ~/Work/よし。うまくfetchできたよ。
$ rm -rf coderepos
$ mkdir -p coderepos/share/lang/perl/
$ cd coderepos/share/lang/perl
$ git svn init -s http://svn.coderepos.org/share/lang/perl/Games-Go/ Games-Go
$ git svn fetch
なんか、途中でNoticeみたいなのが出力されていたけど、まあ、それは無視...
で、続いてcheckoutだ。
$ git checkout trunkありゃりゃ。こんなエラーが。
(中略)
GIT_SVN_ID may be set in the environment or via the --id/-i switch to an
arbitrary identifier if you're tracking multiple SVN branches/repositories in
one git repository and want to keep them separate. See git-svn(1) for more
information.
えっと、ひとつのgitレポジトリの中に複数のbranchesやrepositoriesがある場合は、もうちょいとマニュアルを読めとな。
うーん。とりあえずいまはここまで。
こちらのマニュアルを読もうと思う。
Git ユーザマニュアル (バージョン 1.5.3 以降用)
CodeReposでgit使いたい!
2008/02/21 追記
問題一部解決編を書いた。
続・はやりのgitをインストールした。そして使ってみた。