Let Googlecode's svn HTML files appear normally under Firefox. _javascript Tips

Source: Internet
Author: User
Tags eol svn svn client
Today, I found out that the Googlecode provided in SVN HTML is displayed as an HTML source file in Firefox.
Google for a moment, found the answer:
If the normal display needs to be set Svn:mime-type to text/html when SVN submits the file. (http://blog.pluskid.org/?p=70)
The SVN client supports automatic configuration specific configuration methods as follows (Http://www.worldhello.net/wiki/SVN)
--------------------------------------
6.2 Property settings for new files?
Whodo SVN's Hooks script checks the properties of the new file, does not set the Svn:mime-type and/or Svn:eol-style properties, and prohibits submission.
But every time you add a file, it's too cumbersome to perform a command like "svn PS svn:eol-style ...". Fortunately, the SVN Client (command line or TORTOISESVN) supports the function of automatic properties. Attributes are automatically added to the new file.

6.2.1 Config profile
Enable and set automatic properties, which are done in the config configuration file. Config configuration file location:
Unix Platform
The Global profile location is:/etc/subversion/config; Each user home directory also has a configuration file that overrides the global configuration file setting: ~/.subversion/config;
Windows Platform
The registry may contain the appropriate settings: Hklm\software\tigris.org\subversion\config, and Hkcu\software\tigris.org\subversion\config. However, 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 config configuration to enable Auto-props:
[miscellany]global-ignores = *.o *.lo *.la #*#. *.rej *.rej. *~ *~. #*. Ds_store. Cvsignore thumbs.db cvsuse-commit-times = Yesenable-auto-props = yes
6.2.3 Auto-props settings based on the filename
The settings for automatic properties are matched by the file name. Modify the config file to add a new configuration as follows:
### section for configuring automatic properties. [auto-props]### The format of the entries is:### File-name-pattern = propname[=value][;p ropname[=value] ...] ### The File-name-pattern can contain wildcards (such as ' * ' and### '? '). All entries which match'll be applied to the file.### of note that Auto-props functionality must being enabled, which### is Ty Pically 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: After the eol-style=native file is added, you can view the properties of the new file by following these commands before submitting it:
$ SVN proplist-v *

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.