User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:svn_config

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mantisbt:svn_config [2007/11/10 13:31] Martin Fuchsmantisbt:svn_config [2014/02/27 03:06] (current) Bascy
Line 1: Line 1:
 +
 ====== Subversion configuration for Mantis Developers ====== ====== Subversion configuration for Mantis Developers ======
  
 **Author:** Martin Fuchs **Author:** Martin Fuchs
  
-Subversion uses the concept of file "properties" (see also [[http://svnbook.red-bean.com/en/1.4/svn.advanced.props.html|SVNBook - Properties]]) to record additional information for the files in the repository. A property in this context is just a key name with an associated value. Subversion can store any number of properties per file. In principle you can store any textual key/value information you want to add some meta information to your files. There are a number of reserved property names, Subversion uses internally to manage for example file types, file content encoding, executable flags, and keyword substitution. All this information is stored in the central Subversion repository on a file by file basis. You can configure them manually using the SVN command line or some graphical tool like TortoiseSVN or Subclipse. But this a quite error prone task, you can easily forget to set some property when checking in a new file. So you should setup your SVN client to do this automatically for you. When adding new files to the repository SVN sets the file properties automatically setting on file extensions. I will describe the preferred configuration of the local environment for Mantis Developers in the following. It sets the svn:eol-style for text files (non-binary files) and the svn:keywords property for all files eventually containing the $Id keyword.+Subversion uses the concept of file "properties" (see also [[http://svnbook.red-bean.com/en/1.4/svn.advanced.props.html|SVNBook - Properties]]) to record additional information for the files in the repository. A property in this context is just a key name with an associated value. Subversion can store any number of properties per file. In principle you can store any textual key/value information you want to add some meta information to your files. There are a number of reserved property names, Subversion uses internally to manage for example file types, file content encoding, executable flags, and keyword substitution. All this information is stored in the central Subversion repository on a file by file basis. You can configure them manually using the SVN command line or some graphical tool like TortoiseSVN or Subclipse. But this a quite error prone task, you can easily forget to set some property when checking in a new file. So you should setup your SVN client to do this automatically for you. When adding new files to the repository SVN sets the file properties setting automatically on file extensions. I will describe the preferred configuration of the local environment for Mantis Developers in the following. It sets the svn:eol-style for text files (non-binary files) and the svn:keywords property for all files eventually containing the $Id keyword.
  
 On Windows the configuration is stored in the registry under the key KEY_CURRENT_USER\Software\Tigris.org\Subversion\Config. You should download the following file and launch it by double clicking to import the settings in the registry: On Windows the configuration is stored in the registry under the key KEY_CURRENT_USER\Software\Tigris.org\Subversion\Config. You should download the following file and launch it by double clicking to import the settings in the registry:
- 
- 
  
 ==== Windows Registry Script ==== ==== Windows Registry Script ====
  
-[[http://www.sky.franken.de/download/subversion_mantis_config.reg|subversion_mantis_config.reg]]+[[http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk/dev/subversion_mantis_config.reg|subversion_mantis_config.reg]]
  
 <code> <code>
Line 17: Line 16:
  
 [HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\auto-props] [HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\auto-props]
-"*.php"="svn:eol-style=native;svn:keywords=Author Date Id Revision" +"*.php"="svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Author Date Id Revision" 
-"*.txt"="svn:eol-style=native;svn:keywords=Author Date Id Revision" +"*.txt"="svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Author Date Id Revision
-"*.css"="svn:eol-style=native" +"*.sgml"="svn:mime-type=text/sgml;svn:eol-style=native;svn:keywords=Author Date Id Revision" 
-"*.js"="svn:eol-style=native" +"*.dsl"="svn:mime-type=text/xml;svn:eol-style=native" 
-"*.sample"="svn:eol-style" +"*.ent"="svn:mime-type=text/xml;svn:eol-style=native
-"*.html"="svn:eol-style=native" +"*.css"="svn:mime-type=text/plain;svn:eol-style=native" 
-"*.htm"="svn:eol-style=native" +"*.js"="svn:mime-type=text/plain;svn:eol-style=native" 
-"*.htaccess"="svn:eol-style=native"+"*.sample"="svn:mime-type=text/plain;svn:eol-style" 
 +"*.html"="svn:mime-type=text/plain;svn:eol-style=native" 
 +"*.htm"="svn:mime-type=text/plain;svn:eol-style=native" 
 +"*.htaccess"="svn:mime-type=text/plain;svn:eol-style=native"
 "*.png"="svn:mime-type=image/png" "*.png"="svn:mime-type=image/png"
 "*.jpg"="svn:mime-type=image/jpeg" "*.jpg"="svn:mime-type=image/jpeg"
Line 33: Line 35:
 </code> </code>
  
 +Note: Windows also support the same config file as Unix.
 +You may found in the %AppData%\Subversion\config in the user's application data folder.
  
-Under Unix the configuration is located in the file "$HOME/.subversion/config" in your home directory:+On Unix the configuration is located in the file "$HOME/.subversion/config" in your home directory:
  
-==== [[http://www.sky.franken.de/download/mantisbt-subversion-config|$HOME/.subversion/config]] ====+==== Unix configuration file ==== 
 + 
 +[[http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk/dev/mantisbt-subversion-config|$HOME/.subversion/config]]
  
 <code> <code>
-### Set enable-auto-props to 'yes' to enable automatic properties +[miscellany]
-### for 'svn add' and 'svn import', it defaults to 'no'+
-### Automatic properties are defined in the section 'auto-props'+
 enable-auto-props = yes enable-auto-props = yes
- 
-### Section for configuring automatic properties. 
-### 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. 
  
 [auto-props] [auto-props]
-*.php = svn:eol-style=native;svn:keywords=Author Date Id Revision +*.php = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Author Date Id Revision 
-*.txt = svn:eol-style=native;svn:keywords=Author Date Id Revision +*.txt = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Author Date Id Revision 
-*.css = svn:eol-style=native +*.css = svn:mime-type=text/plain;svn:eol-style=native 
-*.js = svn:eol-style=native +*.sgml=svn:mine-type=text/sgml;svn:eol-style=native;svn:keywords=Author Date Id Revision 
-*.sample = svn:eol-style=native +*.dsl=svn:mime-type=text/xml;svn:eol-style=native 
-*.html = svn:eol-style=native +*.ent=svn:mime-type=text/xml;svn:eol-style=native 
-*.htm = svn:eol-style=native +*.js = svn:mime-type=text/plain;svn:eol-style=native 
-*.htaccess = svn:eol-style=native+*.sample = svn:mime-type=text/plain;svn:eol-style=native 
 +*.html = svn:mime-type=text/plain;svn:eol-style=native 
 +*.htm = svn:mime-type=text/plain;svn:eol-style=native 
 +*.htaccess = svn:mime-type=text/plain;:eol-style=native
 *.png = svn:mime-type=image/png *.png = svn:mime-type=image/png
 *.jpg = svn:mime-type=image/jpeg *.jpg = svn:mime-type=image/jpeg
Line 76: Line 74:
 ==== automatic property setting ==== ==== automatic property setting ====
  
-For convenience I did set up a cronjob, which checks the properties of all files in the repository trunk with the following commands:+For convenience I did set up a cronjob, which checks the properties of all files in the repository trunk with a [[http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk/dev/check-svn-properties.sh|script]] running the following commands:
  
 <code> <code>
 find . -name \*.php -exec svn propset svn:eol-style native {} \; find . -name \*.php -exec svn propset svn:eol-style native {} \;
-find . -name \*.php -exec svn propset svn:keywords 'Id' {} \;+find . -name \*.php -exec svn propset svn:keywords 'Author Date Id Revision' {} \;
 find . -name \*.txt -exec svn propset svn:eol-style native {} \; find . -name \*.txt -exec svn propset svn:eol-style native {} \;
-find . -name \*.txt -exec svn propset svn:keywords 'Id' {} \;+find . -name \*.txt -exec svn propset svn:keywords 'Author Date Id Revision{} \; 
 +find . -name \*.sgml -exec svn propset svn:mime-type text/sgml {} \; 
 +find . -name \*.sgml -exec svn propset svn:eol-style native {} \; 
 +find . -name \*.sgml -exec svn propset svn:keywords 'Author Date Id Revision' {} \; 
 +find . -name \*.dsl -exec svn propset svn:mime-type text/xml {} \; 
 +find . -name \*.dsl -exec svn propset svn:eol-style native {} \; 
 +find . -name \*.ent -exec svn propset svn:mime-type text/xml {} \; 
 +find . -name \*.ent -exec svn propset svn:eol-style native {} \;
 find . -name \*.css -exec svn propset svn:eol-style native {} \; find . -name \*.css -exec svn propset svn:eol-style native {} \;
 find . -name \*.js -exec svn propset svn:eol-style native {} \; find . -name \*.js -exec svn propset svn:eol-style native {} \;
-find . -name \*.sample -exec svn propset svn:eol-style native {} \;+find . -name \*.sample -exec svn propset svn:eol-style native {} \;l
 find . -name \*.htm -exec svn propset svn:eol-style native {} \; find . -name \*.htm -exec svn propset svn:eol-style native {} \;
 find . -name \*.html -exec svn propset svn:eol-style native {} \; find . -name \*.html -exec svn propset svn:eol-style native {} \;
Line 95: Line 100:
  
 Any change that should be applied is reported by an email, so it can be fixed by committing the property change. This doesn't mean developers should not them self set correct properties when checking in files by configuring their environment - it's just a means of additional safety. Any change that should be applied is reported by an email, so it can be fixed by committing the property change. This doesn't mean developers should not them self set correct properties when checking in files by configuring their environment - it's just a means of additional safety.
 +
mantisbt/svn_config.1194719511.txt.gz · Last modified: 2008/10/29 04:31 (external edit)

Driven by DokuWiki