無心中在網上看到了這個帖子試驗了一下,果真好用,不僅適用與googlecode還適用於sourceforge.net,兲語真的感受網絡這東西真的太好了,可是但願大家能夠善用他不要濫用他。javascript
演示地址googlecode:http://cmp4.googlecode.com/svn/trunk/doc/index.htmphp
演示地址sourceforge:https://xoxx.svn.sourceforge.net/svnroot/xoxx/doc/index.htmcss
下面開始說一下方法(適用TortoiseSVN):html
1、簡單的設置方法,單必定義文件java
右鍵你想修改屬性的html文件,而後選【TortoiseSVN】→【Properties (中文通常爲【屬性】)】而後就會看到Properties 界面,而後點擊【新建(快捷鍵N)】選擇【高級(快捷鍵A)】而後彈出高級選項卡,選擇屬性【svn:mime-type】,而後添加值爲text/html,而後肯定從新同步下就能夠了,網絡
同理app
*.htm* = svn:mime-type=text/html *.png = svn:mime-type=image/png *.jpg = svn:mime-type=image/jpeg *.gif = svn:mime-type=image/gif *.css = svn:mime-type=text/css *.js = svn:mime-type=text/javascript *.xml = svn:mime-type=text/xml
2、設置TortoiseSVN通用配置文件,而後再次上傳後就自動標記文件屬性了。svg
點右鍵進入【TortoiseSVN】的【設置】會彈出設置選線卡【常規設置】裏的右邊右下角位置有個【編輯】按鍵,點擊編輯對全局配置文件進行編輯。svn
查找配置文件中[miscellany]在下面加入post
[miscellany] global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .cvsignore Thumbs.db CVS use-commit-times = yes enable-auto-props = yes
查找配置文件中[auto-props]在下面加入
### Section for configuring automatic properties. [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 *.sh = svn:eol-style=LF;svn:executable Makefile = svn:eol-style=LF ################################################## ### 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 *.svg = svn:eol-style=native;svn:mime-type=text/xml *.txt = 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 README = svn:eol-style=native
文件添加後,在提交以前,能夠經過以下命令查看新增文件的屬性:
$ svn proplist -v *
注意:
一、修改config文件後,最好重啓一下機器,以使設置生效。
二、須要將加入的文件先執行add操做,而後再commit,才能生效。若直接執行commit,不會生效。
除非註明,兲語天空文章均爲原創,轉載請以連接形式標明本文標題和地址
本文標題:【教程】如何利用sourceforge Google Code的SVN顯示Html頁面
本文地址:http://cycy.sourceforge.net/2012/01/sourceforge-google-code-svn-html/