`
nathan.wu
  • 浏览: 48717 次
  • 性别: Icon_minigender_1
  • 来自: 南京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

Subversion Auto Properties

阅读更多
At cf.Objective() I attended "Subversion for Smarties - Do More With Subversion" given by Cameron Childress and it was a good presentation. I picked up a few things that I didn't know before like changelists which were added in Subversion 1.5. The presentation did cover other things like svn properties on files like svn:keywords and how to add them with svn propset. While svn propset works, it is possible to set svn properties on files globally on the create of the file without having to manually setting them. This is done my modifying the subversion client configuration.

On Mac or Linux the subversion client configuration file is:

~/.subversion/config

On Windows the subversion configuration file is:

C:\Documents and Settings\{username}\Application Data\Subversion\config

Or using TortoiseSVN on Windows:

Right click on any Windows folder
Select TortoiseSVN -> Setting
Click on "Edit" for Subversion configuration file
The config file is used by all subversion clients, so that once you make the change it will be used by Subclipse, TortiiseSVN, svnX, etc. The config file is nothing more than a text file with name value pairs. The file uses "#" to denote comments, remove the "#" to uncomment the line.

The first thing you need to do is find the [miscellany] section of the config file to uncomment and modify the line as shown below:

enable-auto-props = yes

Next in the [auto-props] section, remove everything below [auto-props] and replace it with below:

# Code formats
*.as         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.bat        = svn:eol-style=CRLF; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain; svn:executable
*.cmd        = svn:eol-style=CRLF; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain; svn:executable
*.c          = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.cfc        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.cfm        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.cgi        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn-mine-type=text/plain
*.cpp        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.groovy     = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.gsp        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.h          = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.java       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.js         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/javascript
*.jsp        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.m          = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.php        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-php
*.pl         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-perl; svn:executable
*.pm         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-perl
*.py         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-python; svn:executable
*.sh         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-sh; 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
*.avi        = svn:mime-type=video/avi
*.doc        = svn:mime-type=application/msword
*.eps        = svn:mime-type=application/postscript
*.gz         = svn:mime-type=application/gzip
*.jar        = svn:mime-type=application/java-archive
*.mov        = svn:mime-type=video/quicktime
*.mp3        = svn:mime-type=audio/mpeg
*.pdf        = svn:mime-type=application/pdf
*.ppt        = svn:mime-type=application/vnd.ms-powerpoint
*.ps         = svn:mime-type=application/postscript
*.psd        = svn:mime-type=application/photoshop
*.rtf        = svn:mime-type=text/rtf
*.swf        = svn:mime-type=application/x-shockwave-flash
*.tar        = svn:mime-type=application/x-tar
*.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
.htaccess    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.cfg        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.css        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/css
*.csv        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.dtd        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
*.htm        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/html
*.html       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/html
*.ini        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.properties = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.sql        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-sql
*.txt        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
*.xhtml      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xhtml+xml
*.xml        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
*.xsd        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
*.xsl        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
*.xslt       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
*.xul        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xul
*.yml        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
AUTHORS      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
BUGS         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
CHANGES      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
COPYING*     = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
DEPENDENCIES = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
DEPRECATED   = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
INSTALL*     = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
LICENSE      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
Makefile*    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
MANIFEST*    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
PLATFORMS    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
README       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
TODO         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
Make sure none of the lines start with spaces, or you will get an error message. The list above is not complete, but pretty much covers all the file types I have run into.  For more information on svn properties the best source is the online book, Version Control with Subversion, in particular chapter 3.
分享到:
评论

相关推荐

    Subversion

    Subversion Subversion Subversion Subversion Subversion

    subversion

    Subversion 是一个开源的版本控制系统,它用于管理文件和目录的变更历史,使得多人协作开发成为可能。在给定的压缩包文件中,包含了 `subversion-1.7.2.tar.gz` 和 `subversion-deps-1.6.1.tar.gz` 两个文件,它们是...

    Subversion安装成service

    sccreatesvnservice binpath="D:\Subversion\bin\svnserve.exe --service -r D:\svnroot" displayname="SVNService" depend=Tcpip start=auto ``` 这里的 `start=auto` 参数指定了服务的启动类型为自动。另外,也...

    Jenkins subversion 插件和所有依赖说明:依赖安装顺序

    Jenkins Subversion 插件使得Jenkins能够与Subversion仓库进行交互,进行代码的检出、更新和提交等操作。在设置Jenkins与Subversion的集成时,正确安装和配置相关插件至关重要。 首先,我们需要了解Jenkins ...

    Subversion Edge详细安装与使用手册

    ### Subversion Edge 详细安装与使用手册 #### 一、Subversion Edge 下载与安装 ##### 1.1 下载地址 Subversion Edge 的下载地址为:[http://www.collab.net/svnedge](http://www.collab.net/svnedge)。 ##### ...

    SubVersion的应用详解

    **SubVersion 应用详解** SubVersion(简称SVN)是一种广泛使用的版本控制系统,它能够跟踪文件和目录的变更,使多个用户协同工作在同一个项目上成为可能。本讲解将深入探讨SubVersion的基础概念、安装配置、基本...

    subversion1.2x 插件

    Subversion 1.2x 插件是针对Eclipse集成开发环境的一个版本控制系统插件,主要用于支持Subversion(SVN)版本控制系统的操作。Subversion是一个开源的版本控制系统,允许用户跟踪文件和目录的更改历史,便于团队协作...

    Subversion快速入门教程

    Subversion,快速入门教程,本文是使用Subversion最快速的教程,在最短的时间里帮助您建立起一套可用的服务器环境,只需略加调整就可以应用到实际项目当中。

    Subversion1.5.1发布- Subversion中文站SVN_TortoiseSVN_教程_文档_培训

    Subversion(简称SVN)是一款开源的版本控制系统,它用于管理对文件和目录的更改,以便在多人协作的环境中保持数据的一致性和完整性。Subversion 1.5.1是Subversion项目的一个重要版本更新,它带来了许多改进和新...

    subversion-1.7.9.zip

    Subversion(SVN)是一个流行的开源版本控制系统,用于管理和跟踪文件和目录的变更。这个"subversion-1.7.9.zip"文件是Subversion 1.7.9版本的压缩包,它包含了该版本的所有源代码、文档、构建脚本和其他必要的组件...

    Version Control with Subversion For Subversion 1.3

    ### 版本控制与Subversion 1.3 #### 一、版本控制概念与Subversion简介 **版本控制**是一种管理计算机程序、文档以及其他类型文件变更历史的技术。它允许开发人员跟踪不同版本之间的差异,回滚到早期版本,并且在...

    Apache-Subversion-1.8.13

    Subversion是一个自由开源的版本控制系统。在Subversion管理下,文件和目录可以超越时空。Subversion将文件存放在中心版本库里,这个版本库很像一个普通的文件服务器,不同的是,它可以记录每一次文件和目录的修改...

    Apache-Subversion-1.14.0.zip

    Apache Subversion(简称SVN)是一个开源的版本控制系统,用于管理软件项目的源代码和其他文件的变更。这个"Apache-Subversion-1.14.0.zip"压缩包包含的是Subversion 1.14.0版本的命令行工具,适用于Windows操作系统...

    svn subversion-1.7.2

    Subversion(SVN)是一个开源的版本控制系统,用于管理对软件项目源代码的更改。它在软件开发领域中广泛使用,特别是在多人协作的环境中,帮助团队成员协同工作,跟踪文件的修改历史,以及解决合并冲突等问题。...

    使用Subversion进行版本控制 PDF中文版

    《使用Subversion进行版本控制 PDF中文版》这一资源,深入介绍了Subversion(SVN)这一流行版本控制系统的基本概念、操作流程以及高级功能,对于想要深入了解或学习版本控制系统的开发者来说,无疑是一份宝贵的学习...

Global site tag (gtag.js) - Google Analytics