让GoogleCode的SVN下的HTML文件在FireFox下正常显示.

时间:2021-05-18

今天试了下发现GoogleCode提供的SVN中的HTML在Firefox中显示为HTML源文件
Google了一下,找到了答案:
如果正常显示需要在SVN提交文件时设置svn:mime-type 为 text/html.(http://blog.pluskid.org/?p=70)
SVN客户端都支持自动配置具体配置方法如下(http://mit-times = yesenable-auto-props = yes
6.2.3 基于文件名的 auto-props 设置
自动属性的设置,是根据文件名来匹配的。修改 config 文件,增添新的配置,如下:
### 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:executableMakefile= 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/xmlREADME= svn:eol-style=native文件添加后,在提交之前,可以通过如下命令查看新增文件的属性:
$ svn proplist -v *

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章