[WHODO-forum] subversion 客户端配置

1 view
Skip to first unread message

jiangxin

unread,
May 9, 2006, 5:48:02 AM5/9/06
to whodo...@googlegroups.com
Whodo SVN 对新增文件的 svn:mime-type 和 svn:eol-style 属性进行检查,如果没有设置 svn:mime-type 或者 svn:eol-style 的话,拒绝执行。

其实 subversion 客户端有个自动属性设置的选项。Subversion 的配置文件为:

  • Windows: %APPDATA%\Subversion\config
  • Unix: ~/.subversion/config


修改配置文件如下

  1. 打开 自动属性 开关;
    代码:
    [miscellany]
    enable-auto-props = yes

  2. 根据文件扩展名,设置文件的 svn:mime-type 和 svn:eol-style 属性;
  3. 代码:
    [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.

    ##################################################
    ### Binary files
    ##################################################
    *.bmp   = svn:mime-type=image/bmp
    *.gif   = svn:mime-type=image/gif
    *.gz   = svn:mime-type=application/x-gzip
    *.ico   = svn:mime-type=image/x-icon
    *.jar   = svn:mime-type=application/zip
    *.jpg   = svn:mime-type=image/jpeg
    *.pdf   = svn:mime-type=application/pdf
    *.png   = svn:mime-type=image/png
    *.ps   = svn:mime-type=application/postscript
    *.tif   = svn:mime-type=image/tiff
    *.vsd   = svn:mime-type=application/octet-stream
    *.zip   = svn:mime-type=application/zip

    ##################################################
    ### Text files, OS dependent eol-style
    ##################################################
    *.dsp   = svn:eol-style=CRLF
    *.dsw   = svn:eol-style=CRLF

    *.mm   = svn:eol-style=LF;svn:mime-type=text/xml

    ##################################################
    ### Text files, eol-style is native
    ##################################################
    *.c      = svn:eol-style=native;svn:mime-type=text/plain
    *.cpp   = svn:eol-style=native;svn:mime-type=text/plain
    *.css   = svn:eol-style=native;svn:mime-type=text/css
    *.diff   = svn:eol-style=native;svn:mime-type=text/plain
    *.dsl   = svn:eol-style=native;svn:mime-type=text/sgml
    *.dtd   = svn:eol-style=native;svn:mime-type=text/plain
    *.ent   = svn:eol-style=native;svn:mime-type=text/plain
    *.gml   = svn:eol-style=native;svn:mime-type=text/sgml
    *.h      = svn:eol-style=native;svn:mime-type=text/plain
    *.htm   = svn:eol-style=native;svn:mime-type=text/html
    *.html   = svn:eol-style=native;svn:mime-type=text/html
    *.java   = svn:eol-style=native;svn:mime-type=text/plain
    *.js   = svn:eol-style=native;svn:mime-type=text/plain
    *.mod   = svn:eol-style=native;svn:mime-type=text/plain
    *.patch   = svn:eol-style=native;svn:mime-type=text/plain
    *.php   = svn:eol-style=native
    *.pl   = svn:eol-style=native
    *.py   = svn:eol-style=native
    *.sgm   = svn:eol-style=native;svn:mime-type=text/sgml
    *.sgml   = svn:eol-style=native;svn:mime-type=text/sgml
    *.sh   = svn:eol-style=native;svn:executable
    *.svg   = svn:eol-style=native;svn:mime-type=text/xml
    *.txt   = svn:eol-style=native;svn:mime-type=text/plain
    *.xml   = svn:eol-style=native;svn:mime-type=text/xml
    *.xsl   = svn:eol-style=native;svn:mime-type=text/xml
    *.xslt   = svn:eol-style=native;svn:mime-type=text/xml
    Makefile*   = svn:eol-style=native
    README*   = svn:eol-style=native
    *.dcl   = svn:eol-style=native





-------------------- m2f --------------------

此帖转发自 WHODO 论坛 (http://whodo.worldhello.net/forum)

在线阅读和回复此文章,点击下面链接:

http://whodo.worldhello.net/forum/viewtopic.php?p=22#22

-------------------- m2f --------------------
Reply all
Reply to author
Forward
0 new messages