On Oct 2, 2006, at 05:28, Ken A. Redergård wrote:
> Is it possible to perform substitution in text-files with property  
> values ?
>
> For example I would like to have a copyright and license text at  
> the top in the file.
>
> $copyright$
> $license$
>
> Now I set the properties copyright and license at some directory  
> higher in the directory structure.
>
> When I have set the properties I would like to have the $copyright$  
> and $license$ replaced with the text in the properties.
No, there is no such feature in Subversion.
A workaround could be to write a wrapper script around the "svn  
commit" command which substitutes these variables before performing  
the commit. This would only work if everybody uses the command-line  
client, and you would need to write different versions if you use  
multiple operating systems on the client (for example Windows and  
Linux).
Another option could be to write a post-commit hook which examines  
the commit which just occurred, and if these placeholders are still  
present in the file, to immediately perform another commit in which  
these placeholders are replaced with the content you want. This would  
work regardless of the client settings and there would be nothing to  
set up on the client, which could be an advantage, but such a hook  
script can be complicated to write because the it must maintain its  
own working copy in which to perform these modifications.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Oct  2 17:22:52 2006