RE: how is svn:author set?
From: Roger Lipscombe <rogerl_at_1e.com>
Date: Thu, 3 Jul 2008 10:57:59 +0100
You can also use the --limit switch to "svn log". For example, we use the following to get information about the last revision in a particular branch (in our automated build process):
svn log --non-interactive --xml --limit 1 .
From: Shannon Kerr [mailto:shannonckerr_at_gmail.com]
OK, yea I think you are right. I don't want to just set svn:keywords, I want to be able to go to the server and do:
svn propget svn:author foo.txt
to find out the author of the last revision after a client committed their changes. Since this is not versioned, I take it that there is no way to know the author of each revision without scanning "svn log"?
On Thu, Jul 3, 2008 at 4:02 AM, Eric Lee wrote:
Shannon Kerr wrote:
You could use svn:keywords to recursive set author
aderic_at_PGERIC $ svn ls trunk -v
aderic_at_PGERIC $ svn propset svn:keywords author trunk -R
aderic_at_PGERIC $ svn proplist trunk -R
or by use config file in %AppData%\subversion\ folder on windows.
Please check out this subversion book also
So now we're talking about something different than Shannon's initial question which I answered a moment ago. Now we're talking about how to automatically set svn:keywords on files.
I think I see. So if I set in my local (client-side) config file
*.c = svn:keywords=Author Date Id Revision URL
Those values will be set for each C file at each commit if the config file had this line at the time the element was imported or added to the repository right?
Does that mean that if I change "*.c" to "*.*" those properties would be set for all elements at each commit?
All elements that have a period in their name, yes, but you probably do not want to set svn:keywords or svn:eol-style on binary files. So you probably should not have an auto-props definition matching * or *.*. Instead, define a rule for each file extension that is a text file (if you want the properties on all text files).
Is there anyway to do this server side so I don't have to have each user setup their local config file to support this? I suppose I can do this via a hook, but I would hope there is an easier way.
No, the only way is via auto-props in the client-side config file. There is no way to do it on the server side. What you can do server-side is to write a pre-commit hook which rejects the commit of any file whose properties don't match your requirements. The error message your hook script prints out can inform your users how to set up their config file properly, or guide them to a correctly-configured config file they can download and install.
DISCLAIMER: This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind 1E Ltd to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose
This is an archived mail posted to the Subversion Users mailing list.