[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: set keyword expansion as default property for all files?

From: Stefan Kueng <tortoisesvn_at_gmail.com>
Date: Fri, 12 Dec 2008 16:22:30 +0100

NovasTaylor wrote:
> Hi folks,
>
> I am transitioning over from CVS and have a question about resolution
> of keywords. From my reading, keyword resolution is a property set on
> an individual file on the client side. Is there a way to configure SVN
> so all programmers will have keyword resolution turned on for all
> projects by default? Or all files of a certain type (e.g. *.txt) ?
>
> I found this advice on the internet for applying keyword resolution to
> existing files:
>
> http://wolfram.kriesing.de/blog/index.php/2005/svnignore-and-svnkeywords
>
> Adpated for my use the steps for setting up a new project would
> include:
>
> 1. Create a new project from a project template and commit all
> template files and folders to the SVN repository.
> 2. Checkout the project folders into a sandbox.
> 3. cd into the root directory of the project sandbox.
> 4. Create a file .keywords in the root of the sandbox.
> 5. Edit the file and add the keywords that should be resolved. In this
> example, three keywords should be resolved:
> Author
> Revision
> Date
> 6. Run the following command in the same folder:
> svn propset –R svn:keywords -F .keywords *

Bad idea. If you set the properties on *all* files, then even binary
files will get your keywords property, and that will destroy the binary
files.
Only set the property on files which you actually want to have keywords!

You can use the TSVN properties dialog to do that too:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-propertypage.html#tsvn-dug-propertypage-props

> 7. Commit all the files.
> svn commit * -m"Added keywords to existing files".
>
> Steps 1-7 could easily be scripted in PERL. But I want all files
> created during the project lifecycle to have keyword resolution turned
> on for all programmers who checkout the project, without any action
> required on their part. Is there some way to do this on the
> repository side?

See the 'autoprops' configuration option:
http://svnbook.red-bean.com/en/1.5/svn.advanced.confarea.html#svn.advanced.confarea.opts.config

You can also use the tsvn:autoprops property:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-propertypage.html#tsvn-dug-propertypage-props
(section "Automatic property setting")

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=983453
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2008-12-12 16:24:19 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.