DevOps Zone is brought to you in partnership with:

Jessica Thornsby is the Technical and Creative Copywriter at WANdisco, where she writers regular tutorials on Apache Subversion, TortoiseSVN, uberSVN, and all things version control. She spends her spare time editing the CD reviews section at www.leedsmusicscene.net, contributing to A Short Fanzine About Rocking, and researching her family tree. You can find her on Twitter @jthornsby Jessica is a DZone MVB and is not an employee of DZone and has posted 29 posts at DZone. You can read more from them at their website. View Full User Profile

Automatic Properties in Subversion

01.29.2013
| 1110 views |
  • submit to reddit

Properties are a powerful and useful feature of Apache Subversion, but they can be easily overlooked. If you’re regularly using properties in your project, it’s a good idea to configure Subversion to add properties to new files automatically.

Subversion already sets some properties automatically: whenever you add a new file, it sets a value for the MIME type and decides whether the file is executable. You can extend this by leveraging Subversion’s automatic property setting feature “svn:auto-props.” With auto-props enabled, you can perform tasks such as automatically inserting keywords into text files and ensuring every file has EOLs that are consistent with the OS.

To enable auto-props:

1) Locate and open the config file on your local machine.

2) Scroll down to the [miscellany] section and uncomment the following line:

# enable-auto-props = yes

auto props

3) Just below this line, edit the ‘Section for configuring automatic properties’ text according to the properties you want to apply to your files.

Published at DZone with permission of Jessica Thornsby, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)