MacでSubversionを使う

MacSubversionを使う方法を整理してみた。

サーバ

まずはサーバ側。既にsvnApacheがインストール済みなので、簡単な設定をするだけで使えるようになる。

  • Apache用のsvnモジュールは既に下記に入っている。
    • /usr/libexec/apache2/mod_dav_svn.so
    • /usr/libexec/apache2/mod_authz_svn.so
  • Apacheの設定ファイルに下記を追記する。
    • /private/etc/apache2/httpd.conf
LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so
  • svn用の設定ファイルを作り、リポジトリのパスや認証等の必要な設定を行う。
    • /private/etc/apache2/other/svn.conf
<Location /svn>
    DAV svn
    SVNListParentPath on
    SVNParentPath /Users/rabbit2go/svn
    SVNIndexXSLT /svnindex.xsl

    Order deny,allow
    Deny from all
    allow from localhost

    AuthType Digest
    AuthName "Subversion repository"
    AuthUserFile /Users/rabbit2go/svn/users_digest
    Require valid-user
</Location>
$ svnadmin create firstdb

クライアント

次にクライアント側。

  • svnコマンドが導入済みなので直ぐに使える。但し、バージョンは少々古い。
$ /usr/bin/svn --version
svn, version 1.6.5 (r38866)
   compiled Jun 24 2010, 17:16:45

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
  • 気になる場合はMacPortssvnを導入すると良い。こちらは最新版だ。
$ /opt/local/bin/svn --version
svn, バージョン 1.6.15 (r1038135)
   コンパイル日時: Nov 27 2010, 07:42:29

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
  • GUIフロントエンドとしてはVersionsが有名。有料のソフトだけど、動作が軽快でGUIデザインが洗練されており使いやすい。これはオススメ。

Versions offers the best way to work with Subversion on the Mac. Thanks to its clear-cut approach, you'll hit the ground running.

Versions - Mac Subversion Client (SVN)
  • 他にSmartSVNというアプリケーションも有る。(手元の環境では上手く動作しなかったので今ひとつ)

SmartSVN is a graphical client for the Open Source version control system Subversion (SVN).

SmartSVN – SVN Client
  • SvnXというソフトも有ったけれど、こちらは最近更新されていない。

SvnX is an open source GUI for most features of the svn client binary.

La Chose : web agency and software maker – agence web et développement de logiciels
  • WindowsTortoiseSVNのようにシェル統合型のソフトとしてSCPluginがある。

The goal of the SCPlugin project is to integrate Subversion into the Mac OS X Finder. The inspiration for this project came from the TortoiseSVN project.

scplugin.tigris.org

以上、ご参考までに。



関連