• Linux下如何让subversion自动添加Id,Revision等keywords

    2009-03-19

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://phper.blogbus.com/logs/36735509.html

    vi ~/.subversio/config

    找到文件的最后一段
    [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.
    # *.c = svn:eol-style=native
    # *.cpp = svn:eol-style=native
    # *.h = svn:eol-style=native
    # *.dsp = svn:eol-style=CRLF
    # *.dsw = svn:eol-style=CRLF
    # *.sh = svn:eol-style=native;svn:executable
    # *.txt = svn:eol-style=native
    # *.png = svn:mime-type=image/png
    # *.jpg = svn:mime-type=image/jpeg
    # Makefile = svn:eol-style=native
    我们为需要自动设置属性的文件添加配置
    [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.
    # *.c = svn:eol-style=native
    # *.cpp = svn:eol-style=native
    # *.h = svn:eol-style=native
    # *.dsp = svn:eol-style=CRLF
    # *.dsw = svn:eol-style=CRLF
    # *.sh = svn:eol-style=native;svn:executable
    # *.txt = svn:eol-style=native
    # *.png = svn:mime-type=image/png
    # *.jpg = svn:mime-type=image/jpeg
    # Makefile = svn:eol-style=native
    *.php = svn:keywords=Id Reversion Date

    最后还有重要的一点是启用auto-props

    [miscellany]
    enable-auto-props = yes


    历史上的今天:


    收藏到:Del.icio.us