tags:

views:

105

answers:

2

I can see where svn:keywords like Id, LastChangedDate and Author are used and replaced in your repository. But I also saw an example of setting a custom property, like license. But I don't understand how you USE a property like license, since the replace feature (as I understand it) doesn't work for custom properties.

I guess my question is how do I have one file for a license, and have the text from that file added to all of my code files? It seems like this should be possible with SVN properties, and set up to update the code if the property changes (changing the year of the copyright), but I can't find how to do it.

Thanks

+2  A: 

No, what you are trying to do is not possible with subversion properties. The properties are simply tags that get attached to your files and you can have scripts (or the command line) query those properties/tags. E.g. you could write a little script that publishes your files to the web, but only if they have a certain license.

If you want to include some licenses into your files, you will have to do that manually or resort to your favorite scripting language.

innaM
A: 

I am not sure you're correct, on http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html expressly talks about keyword substitution.

Alessandro Ilardo
Yes, it does. But it only talks about substitution of specific variables: Data, Revision, Author, HeadURL and Id. License isn't on the list.
Brett Stottlemyer