在使用SVN作为版本控制器的时候,在VS里安装VISUALSVN插件,当修改文件公共文件的时候需要先Get Lock,如果对于多次操作这个鼠标操作显得是一些复杂,自动给文件加锁的操作实际是给文件加一个属性:needs-lock
如果配置自动加锁:
修改配置文件:
- C:\Documents and Settings\[USER_NAME]\Application Data\Subversion\config
- 或者
- C:\Users\[USER_NAME]\Application Data\Subversion\config
复制代码 修改两部分:[miscellany] 和[auto-props] - miscellany]
- enable-auto-props = yes
复制代码- [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.
- *.bmp = svn:mime-type=image/bmp;svn:needs-lock=*
- *.gif = svn:mime-type=image/gif;svn:needs-lock=*
- *.ico = svn:mime-type=image/x-icon;svn:needs-lock=*
- *.jpeg = svn:mime-type=image/jpeg;svn:needs-lock=*
- *.jpg = svn:mime-type=image/jpeg;svn:needs-lock=*
- *.png = svn:mime-type=image/png;svn:needs-lock=*
- *.tif = svn:mime-type=image/tiff;svn:needs-lock=*
- *.tiff = svn:mime-type=image/tiff;svn:needs-lock=*
- *.doc = svn:mime-type=application/msword;svn:needs-lock=*
- *.jar = svn:mime-type=application/octet-stream;svn:needs-lock=*
- *.odc = svn:mime-type=application/vnd.oasis.opendocument.chart;svn:needs-lock=*
- *.odf = svn:mime-type=application/vnd.oasis.opendocument.formula;svn:needs-lock=*
- *.odg = svn:mime-type=application/vnd.oasis.opendocument.graphics;svn:needs-lock=*
- *.odi = svn:mime-type=application/vnd.oasis.opendocument.image;svn:needs-lock=*
- *.odp = svn:mime-type=application/vnd.oasis.opendocument.presentation;svn:needs-lock=*
- *.ods = svn:mime-type=application/vnd.oasis.opendocument.spreadsheet;svn:needs-lock=*
- *.odt = svn:mime-type=application/vnd.oasis.opendocument.text;svn:needs-lock=*
- *.pdf = svn:mime-type=application/pdf;svn:needs-lock=*
- *.ppt = svn:mime-type=application/vnd.ms-powerpoint;svn:needs-lock=*
- *.ser = svn:mime-type=application/octet-stream;svn:needs-lock=*
- *.swf = svn:mime-type=application/x-shockwave-flash;svn:needs-lock=*
- *.vsd = svn:mime-type=application/x-visio;svn:needs-lock=*
- *.xls = svn:mime-type=application/vnd.ms-excel;svn:needs-lock=*
- *.zip = svn:mime-type=application/zip;svn:needs-lock=*
复制代码