Display HTML files under Svn of googlecode in Firefox

Source: Internet
Author: User
Tags eol svn client

BenArticleRefer to the following three articles:
How to display HTML files under Svn of googlecode in Firefox
Place HTML documents in the svn repository of Google Code
SVN

Googlecode can be used as a free and stable static resource space, such as jquery documentation (http://jquery-api-zh-cn.googlecode.com/svn/trunk/index.html) on top.
Today, HTML in SVN provided by googlecode is displayed as an HTML source file in Firefox. IE.

Google found the answer:
If the file is displayed normally, you must set SVN: mime-type to text/html when submitting the file in SVN.
The SVN client supports automatic configuration as follows:

6.2 new file attribute settings?
The hooks script of Whodo SVN checks the attributes of the newly added file. The SVN: mime-type and/or SVN: EOL-style attributes are not set. submission is prohibited.
However, after each file is added, it is too cumbersome to execute commands similar to "svn ps svn: EOL-style! Fortunately, the svn client (command line or tortoisesvn) supports the automatic attribute function. Attributes are automatically added to the new file.
6.2.1 config configuration file
Enabling and setting automatic attributes is completed in the config configuration file. Location of the config file:
* UNIX platform
The location of the global configuration file is/etc/subversion/config. The configuration file in each user's home directory overwrites the settings in the global configuration file :~ /. Subversion/config;
* Windows Platforms
The Registry may contain relevant settings: HKLM \ SOFTWARE \ tigris.org \ subversion \ config, and hkcu \ Software \ tigris.org \ subversion \ config. But the file has a higher priority. Global configuration file: % allusersprofile % \ Application Data \ subversion \ config, user profile: % appdata % \ subversion \ config
6.2.2 enable auto-props
Modify the config configuration and enable auto-props:

[ Miscellany ]
Global-ignores = *. O *. Lo *. La # * #. *. rej *. rej .*~ *~ . # *. Ds_store. cvsignore thumbs. DB CVS
Use-commit-times = Yes
Enable-auto-props = Yes

6.2.3 file name-based auto-Props settings
The automatic attribute settings are matched based on the file name. Modify the config file and add new configurations as follows:

### Section for processing ing 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
*. ASD = 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

After the file is added, run the following command to view the attributes of the new file:

$ SVN proplist-V *

Note:
1. After modifying the config file, it is best to restart the machine for the setting to take effect.
2. The add operation must be performed on the added files before the commit operation can take effect. If you directly execute commit, it does not take effect.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.