A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© haxyek 金牌黑马   /  2014-4-12 16:13  /  2614 人查看  /  1 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

本帖最后由 haxyek 于 2014-4-12 16:18 编辑

在使用SVN作为版本控制器的时候,在VS里安装VISUALSVN插件,当修改文件公共文件的时候需要先Get Lock,如果对于多次操作这个鼠标操作显得是一些复杂,自动给文件加锁的操作实际是给文件加一个属性:needs-lock
如果配置自动加锁:
修改配置文件:
  1. C:\Documents and Settings\[USER_NAME]\Application Data\Subversion\config
  2. 或者
  3. C:\Users\[USER_NAME]\Application Data\Subversion\config
复制代码
修改两部分:[miscellany] 和[auto-props]
  1. miscellany]
  2. enable-auto-props = yes
复制代码
  1. [auto-props]
  2. ### The format of the entries is:
  3. ###   file-name-pattern = propname[=value][;propname[=value]...]
  4. ### The file-name-pattern can contain wildcards (such as '*' and
  5. ### '?').  All entries which match will be applied to the file.
  6. ### Note that auto-props functionality must be enabled, which
  7. ### is typically done by setting the 'enable-auto-props' option.
  8. *.bmp = svn:mime-type=image/bmp;svn:needs-lock=*
  9. *.gif = svn:mime-type=image/gif;svn:needs-lock=*
  10. *.ico = svn:mime-type=image/x-icon;svn:needs-lock=*
  11. *.jpeg = svn:mime-type=image/jpeg;svn:needs-lock=*
  12. *.jpg = svn:mime-type=image/jpeg;svn:needs-lock=*
  13. *.png = svn:mime-type=image/png;svn:needs-lock=*
  14. *.tif = svn:mime-type=image/tiff;svn:needs-lock=*
  15. *.tiff = svn:mime-type=image/tiff;svn:needs-lock=*

  16. *.doc = svn:mime-type=application/msword;svn:needs-lock=*
  17. *.jar = svn:mime-type=application/octet-stream;svn:needs-lock=*
  18. *.odc = svn:mime-type=application/vnd.oasis.opendocument.chart;svn:needs-lock=*
  19. *.odf = svn:mime-type=application/vnd.oasis.opendocument.formula;svn:needs-lock=*
  20. *.odg = svn:mime-type=application/vnd.oasis.opendocument.graphics;svn:needs-lock=*
  21. *.odi = svn:mime-type=application/vnd.oasis.opendocument.image;svn:needs-lock=*
  22. *.odp = svn:mime-type=application/vnd.oasis.opendocument.presentation;svn:needs-lock=*
  23. *.ods = svn:mime-type=application/vnd.oasis.opendocument.spreadsheet;svn:needs-lock=*
  24. *.odt = svn:mime-type=application/vnd.oasis.opendocument.text;svn:needs-lock=*
  25. *.pdf = svn:mime-type=application/pdf;svn:needs-lock=*
  26. *.ppt = svn:mime-type=application/vnd.ms-powerpoint;svn:needs-lock=*
  27. *.ser = svn:mime-type=application/octet-stream;svn:needs-lock=*
  28. *.swf = svn:mime-type=application/x-shockwave-flash;svn:needs-lock=*
  29. *.vsd = svn:mime-type=application/x-visio;svn:needs-lock=*
  30. *.xls = svn:mime-type=application/vnd.ms-excel;svn:needs-lock=*
  31. *.zip = svn:mime-type=application/zip;svn:needs-lock=*
复制代码

1 个回复

倒序浏览
本帖最后由 haxyek 于 2014-4-12 16:19 编辑

在[auto-props]部分是文件类型,一些其他的文件类型:
  1. # Code formats
  2. *.as         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  3. *.bat        = svn:eol-style=CRLF; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain; svn:executable
  4. *.cmd        = svn:eol-style=CRLF; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain; svn:executable
  5. *.c          = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  6. *.cfc        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  7. *.cfm        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  8. *.cgi        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn-mine-type=text/plain
  9. *.cpp        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  10. *.groovy     = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  11. *.gsp        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  12. *.h          = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  13. *.java       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  14. *.js         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/javascript
  15. *.jsp        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  16. *.m          = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  17. *.php        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-php
  18. *.pl         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-perl; svn:executable
  19. *.pm         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-perl
  20. *.py         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-python; svn:executable
  21. *.sh         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-sh; svn:executable
  22. # Image formats
  23. *.bmp        = svn:mime-type=image/bmp
  24. *.gif        = svn:mime-type=image/gif
  25. *.ico        = svn:mime-type=image/ico
  26. *.jpeg       = svn:mime-type=image/jpeg
  27. *.jpg        = svn:mime-type=image/jpeg
  28. *.png        = svn:mime-type=image/png
  29. *.tif        = svn:mime-type=image/tiff
  30. *.tiff       = svn:mime-type=image/tiff
  31. # Data formats
  32. *.avi        = svn:mime-type=video/avi
  33. *.doc        = svn:mime-type=application/msword
  34. *.eps        = svn:mime-type=application/postscript
  35. *.gz         = svn:mime-type=application/gzip
  36. *.jar        = svn:mime-type=application/java-archive
  37. *.mov        = svn:mime-type=video/quicktime
  38. *.mp3        = svn:mime-type=audio/mpeg
  39. *.pdf        = svn:mime-type=application/pdf
  40. *.ppt        = svn:mime-type=application/vnd.ms-powerpoint
  41. *.ps         = svn:mime-type=application/postscript
  42. *.psd        = svn:mime-type=application/photoshop
  43. *.rtf        = svn:mime-type=text/rtf
  44. *.swf        = svn:mime-type=application/x-shockwave-flash
  45. *.tar        = svn:mime-type=application/x-tar
  46. *.tgz        = svn:mime-type=application/gzip
  47. *.wav        = svn:mime-type=audio/wav
  48. *.xls        = svn:mime-type=application/vnd.ms-excel
  49. *.zip        = svn:mime-type=application/zip
  50. # Text formats
  51. .htaccess    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  52. *.cfg        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  53. *.css        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/css
  54. *.csv        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  55. *.dtd        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
  56. *.htm        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/html
  57. *.html       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/html
  58. *.ini        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  59. *.properties = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  60. *.sql        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/x-sql
  61. *.txt        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  62. *.xhtml      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xhtml+xml
  63. *.xml        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
  64. *.xsd        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
  65. *.xsl        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
  66. *.xslt       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xml
  67. *.xul        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/xul
  68. *.yml        = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  69. AUTHORS      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  70. BUGS         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  71. CHANGES      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  72. COPYING*     = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  73. DEPENDENCIES = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  74. DEPRECATED   = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  75. INSTALL*     = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  76. LICENSE      = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  77. Makefile*    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  78. MANIFEST*    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  79. PLATFORMS    = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  80. README       = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
  81. TODO         = svn:eol-style=native; svn:keywords="Author Date Id Rev URL"; svn:mime-type=text/plain
复制代码
参考文献:
另参阅:
Wish it helps~
http://www.cnblogs.com/9527y/p/3660553.html


回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马