- Subversion 1.4.2のインストール
- Subversion 1.4.2の初期設定
- RCSタグの自動設定
- 自動無視の設定
- MIME Typeの自動設定
1. Subversionの初期設定とは
1.1 Subversionの初期設定とはなにか
Subversionには、RCSタグの設定や行末コードの統一などの機能があります。また、いくつかの環境変数も使用します。
これらを適切に設定することで、プロジェクトのファイルをきちんと管理することができます。
1.2 環境変数の設定
Subversionで動作にいくつかの環境変数を利用します。これらの環境変数を設定することで、Subversionを問題なく扱うことができます。
環境変数の設定方法は、パスの設定を参照してください。
1.3 configの設定
Subversionの動作は、configファイルで設定できます。configファイルは、C:\Documents and Settings\古川敦史\Application Data\Subversion\下にあるので、これを編集します。
2. Subversionの初期設定
2.1 環境変数の設定
次のように環境変数を設定します。
| 環境変数 | 設定 | 備考 |
|---|---|---|
| APR_ICONV_PATH | C:\app\Develop\tools\Subversion\iconv | インストーラが自動的に設定 |
| Path | ...;C:\app\Develop\tools\Subversion\bin | インストーラが自動的に設定 |
| EDITOR | c:\bin\Wz\WZEDITOR.EXE | コミット時に起動されるエディタ。自分で設定 |
2.2 configの設定
Subversionのconfigファイルを次のように設定します。このファイルはArchivesのconfigでダウンロードできます。
- config
### This file configures various client-side behaviors. ### ### The commented-out examples below are intended to demonstrate ### how to use this file. ### Section for authentication and authorization customizations. [auth] ### Set store-passwords to 'no' to avoid storing passwords in the ### auth/ area of your config directory. It defaults to 'yes'. ### Note that this option only prevents saving of *new* passwords; ### it doesn't invalidate existing passwords. (To do that, remove ### the cache files by hand as described in the Subversion book.) # store-passwords = no ### Set store-auth-creds to 'no' to avoid storing any subversion ### credentials in the auth/ area of your config directory. ### It defaults to 'yes'. Note that this option only prevents ### saving of *new* credentials; it doesn't invalidate existing ### caches. (To do that, remove the cache files by hand.) # store-auth-creds = no ### Section for configuring external helper applications. [helpers] ### Set editor to the command used to invoke your text editor. ### This will override the environment variables that Subversion ### examines by default to find this information ($EDITOR, ### et al). # editor-cmd = editor (vi, emacs, notepad, etc.) ### Set diff-cmd to the absolute path of your 'diff' program. ### This will override the compile-time default, which is to use ### Subversion's internal diff implementation. # diff-cmd = diff_program (diff, gdiff, etc.) ### Set diff3-cmd to the absolute path of your 'diff3' program. ### This will override the compile-time default, which is to use ### Subversion's internal diff3 implementation. # diff3-cmd = diff3_program (diff3, gdiff3, etc.) ### Set diff3-has-program-arg to 'true' or 'yes' if your 'diff3' ### program accepts the '--diff-program' option. # diff3-has-program-arg = [true | false] ### Section for configuring tunnel agents. [tunnels] ### Configure svn protocol tunnel schemes here. By default, only ### the 'ssh' scheme is defined. You can define other schemes to ### be used with 'svn+scheme://hostname/path' URLs. A scheme ### definition is simply a command, optionally prefixed by an ### environment variable name which can override the command if it ### is defined. The command (or environment variable) may contain ### arguments, using standard shell quoting for arguments with ### spaces. The command will be invoked as: ### <command> <hostname> svnserve -t ### (If the URL includes a username, then the hostname will be ### passed to the tunnel agent as <user>@<hostname>.) If the ### built-in ssh scheme were not predefined, it could be defined ### as: # ssh = $SVN_SSH ssh ### If you wanted to define a new 'rsh' scheme, to be used with ### 'svn+rsh:' URLs, you could do so as follows: # rsh = rsh ### Or, if you wanted to specify a full path and arguments: # rsh = /path/to/rsh -l myusername ### On Windows, if you are specifying a full path to a command, ### use a forward slash (/) or a paired backslash (\\) as the ### path separator. A single backslash will be treated as an ### escape for the following character. ### Section for configuring miscelleneous Subversion options. [miscellany] ### Set global-ignores to a set of whitespace-delimited globs ### which Subversion will ignore in its 'status' output, and ### while importing or adding files and directories. global-ignores = *.o *.lo *.la *.obj #*# .*.rej .*~ *~ .#* .DS_Store Thumbs.db .git # global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store ### Set log-encoding to the default encoding for log messages # log-encoding = latin1 ### Set use-commit-times to make checkout/update/switch/revert ### put last-committed timestamps on every file touched. # use-commit-times = yes ### Set no-unlock to prevent 'svn commit' from automatically ### releasing locks on files. # no-unlock = yes ### Set enable-auto-props to 'yes' to enable automatic properties ### for 'svn add' and 'svn import', it defaults to 'no'. ### Automatic properties are defined in the section 'auto-props'. enable-auto-props = yes ### Section for configuring automatic properties. [auto-props] ### The format of the entries is: ### file-name-pattern = propname[=value][;propname[=value]...] ### The file-name-pattern can contain wildcards (such as '*' and ### '?'). All entries which match will be applied to the file. ### Note that auto-props functionality must be enabled, which ### is typically done by setting the 'enable-auto-props' option. # Scriptish formats *.sh = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/x-sh; svn:executable *.php = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/x-php *.pl = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/x-perl; svn:executable *.pm = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/x-perl *.py = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/x-python; svn:executable # Image formats *.bmp = svn:mime-type=image/bmp *.gif = svn:mime-type=image/gif *.ico = svn:mime-type=image/ico *.jpeg = svn:mime-type=image/jpeg *.jpg = svn:mime-type=image/jpeg *.png = svn:mime-type=image/png *.tif = svn:mime-type=image/tiff *.tiff = svn:mime-type=image/tiff # Data formats *.pdf = svn:mime-type=application/pdf *.avi = svn:mime-type=video/avi *.doc = svn:mime-type=application/msword *.eps = svn:mime-type=application/postscript *.gz = svn:mime-type=application/gzip *.mov = svn:mime-type=video/quicktime *.mp3 = svn:mime-type=audio/mpeg *.ppt = svn:mime-type=application/vnd.ms-powerpoint *.ps = svn:mime-type=application/postscript *.psd = svn:mime-type=application/photoshop *.rdf = svn:eol-style=native; svn:keywords=Id *.rss = svn:eol-style=native; svn:keywords=Id *.rtf = svn:mime-type=text/rtf *.swf = svn:mime-type=application/x-shockwave-flash *.tgz = svn:mime-type=application/gzip *.wav = svn:mime-type=audio/wav *.xls = svn:mime-type=application/vnd.ms-excel *.zip = svn:mime-type=application/zip # Text formats .ht* = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain *.htm* = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/html *.css = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/css *.js = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/javascript *.dtd = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/xml *.xhtml = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/html *.ini = svn:eol-style=native; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain *.sql = svn:eol-style=native; svn:keywords=Id Date Revision Author; svn:mime-type=text/x-sql *.txt = svn:eol-style=native; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain *.xml = svn:eol-style=native; svn:keywords=Id Date Revision Author; svn:mime-type=text/xml CHANGES = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain COPYING = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain INSTALL = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain Makefile* = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain README = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain TODO = svn:eol-style=LF; svn:keywords=Id Date Revision Author; svn:mime-type=text/plain
以上で、configの設定は終了です。