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

Re: svn keyword

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-01-11 12:22:19 CET

On Jan 11, 2006, at 01:03, Lakshman Srilakshmanan wrote:

> I find that I have to explicitly set the property for every file for
> keyword substitution to work. I require Subversion to set it
> automatically.
>
> I also found that I could set [auto-props] in ~/.subversion/config
> *.java = svn:keywords=Author Revision HeadURL Date
>
> The above works only when files are created and will continue to
> update
> if set during file creation.
>
> Is there a way to set it on the server side. For example under
> /etc/subversion, so that all files except binary files will have
> keywords substituted automatically.

It is not possible to have Subversion set properties on the server
side. You should set them on the client side.

Auto-props is the way to have the client do this automatically. Yes,
it only works when initially adding files. If you already have a
working copy with many files that don't match the auto-props, and you
want to apply the auto-props after the fact, you can use the
svn_apply_autoprops.py script in the Subversion source distribution:

http://svn.collab.net/viewcvs/svn/tags/1.3.0/contrib/client-side/
svn_apply_autoprops.py?view=markup

Matthew Good has recently rewritten this script for better
performance and SVK compatibility; his version is here:

http://matt-good.net/2005/12/23/new-and-improved-svn-apply-autoprops-
py-now-with-more-svk/

You can also install a pre-commit hook which verifies that the files
in the incoming transaction have the properties you require. I
started writing such a script myself before discovering that someone
else had already done it. Unfortunately I don't remember now how I
found it so you may have to do a bit of Googling.

This question is FAQ:

http://subversion.tigris.org/faq.html#auto-props

But it appears to be incomplete (not mentioning the
svn_apply_autoprops.py script) and I'm not sure I agree with the rest
of it either. Maybe I'll rewrite that entry and submit a patch...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 11 12:25:34 2006

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

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