Re: Automatic properties for new added files
From: Ryan Schmidt <subversion-2009d_at_ryandesign.com>
Date: Wed, 2 Dec 2009 11:51:35 -0600
On Dec 2, 2009, at 09:55, Claudio Ferreira wrote:
> I have noticed that the Subversion Client only performs the Automatic properties creation when a new file is added thru a working copy, and not when it is commited in that working copy.
That's right. Autoprops are applied at add time, not at commit time. The purpose of using a working copy at all is to examine your changes before committing. It would be counter to the purpose of using a working copy if "commit" were to make changes other than those you've already requested in your working copy.
> We have a large number of Subversion users than need to commit files with a pre-defined header. This header contains the $Rev:$, $Author:$ and $Date:$ for automatic keyword substitution.
Sounds good, that's how I'd do it as well.
> The problem is, if a given user adds a new file, and it didn't replace yet the required Subversion Client configuration file, that activates the Automatic properties, then the subversion hook script will not allow the commit to proceed, giving the error message to the user instructing him to replace the required configuration file or setting the Subversion property 'svn:keywords' to 'Rev Author Date' manually, before proceeding with the commit.
I don't believe the behavior should be changed as explained above.
Your users can either "svn propset" the required properties on the files they've already scheduled for addition, or they can "svn revert" the files to unschedule the additions, then "svn add" them again, which will this time get the automatic properties.
Please start new threads on the <users_at_subversion.apache.org> mailing list.
This is an archived mail posted to the Subversion Users mailing list.