Category: subversion

Jan 11 2008

Using keyword substitution in Subversion

When I previously used CVS, I was able to put in my code some keywords that I wanted to substitue, such as the checkin date, who had checked it in, which version it was etc. I have had a hell of a time finding out how to do this in Subversion (SVN). Thanks to a link sent to me by Tom Chiverton, I managed to figure out how to do it via Eclipse. First of, read the manual, especially the svn:keywords section. So, lets say I want to put the following in my headers: Author: $Author$
Date: $Date$
Revision: $Revision$
So in CFEclipse/Eclipse enter that in a file and check it in to your repository, nothing happens right? No changes to the file happen, we must first set the properties for that file (or group of files): 1. Right click on your file and do Team -> Set Property 2. Select the "svn:keywords" property from the drop down 3. In the text area add (without the quotes) "Date Author Revision" 4. Check in the file and reload when it asks if you want to reload the file (since SVN has changed it) TADDA!!! Your file should look like this now: Author: $Author: mark.drew $
Date: $Date: 2008-01-11 15:03:22 +0000 (Fri, 11 Jan 2008) $
Revision: $Revision: 2076 $
I hope that helps!

6 comments - Posted by Mark Drew at 9:54 AM - Categories: eclipse | subversion

Search Archives

Contribute


Twitter Updates

Categories

coldfusion cfeclipse personal apple cfconferences webdev model-glue ukcfug blogging cfunited coldspring presentations adobe scotch on the rocks cfobjective lost reactor jobs flex eclipse ajax model-glue frameworks max reference google podcasting fusebox ask md spam railo eventvalidation donations tattoo snipex podcast music microsoft fusiondebug flying blue dragon air wishlist tips rant open bluedragon java graphic novels funny eventguard derby blog aptana apple xml webservices transfer tashr subversion spry regex quack pownce ooops mvc metrics jquery itunes hosting groovy gadgets flash firefox doh! directing development coldfusioncamp codeshare cfug cfonwheels cfdevcon bolt apollo

Monthly Archives