【教程】如何利用sourceforge Google Code的SVN显示Html页面

无心中在网上看到了这个帖子试验了一下,果真好用,不仅适用与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/

相关文章
相关标签/搜索