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

Automatic properties for new added files

From: Claudio Ferreira <cldferreirac_at_gmail.com>
Date: Wed, 2 Dec 2009 15:55:26 +0000

Hello,

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.

The following scenario applies:

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.

Since the installed base of Subversions Clients is large, we opted to
implement a server-side hook script that does not allow commits to files in
specified folders with a certain file extension, if the associated files do
not contain the Subversion Property 'svn:keywords' set as 'Rev Author Date'.
The return error message from the hook script indicates to the users where
they can get the required Subversion configuration file and replace it in
their Subversion Client (or they can set the required property manually
before commit).

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.
After the user replaces the Subversion configuration file, it tries to
execute the commit again (because he already added the file to the working
copy), and the hook script denies the commit again...
He can only work around this problem by 'un-Adding' the already added files
to his working copy and re-adding them again, or by setting the required
Subversion property manually.

So, the problem is that for newly added files, the Subversion client only
executes the Automatic property setting when the files are 'Added', and not
when the files are 'Commited'.

I don't know if this behavior should be changed, but it seemed a coherency
problem related to the Automatic Property setting by the Subversion Client.

Thanks in advance,
Claudio Ferreira

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2426382

Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-12-02 17:02:27 CET

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.