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

Re: how is svn:author set?

From: Shannon Kerr <shannonckerr_at_gmail.com>
Date: Thu, 3 Jul 2008 04:54:48 -0500

This is great stuff. I very much appreciate it. I'm used to working in
ClearCase and Subversion is very new to me. This information will be very
helpful.

Thanks again,

Shannon

On Thu, Jul 3, 2008 at 4:46 AM, Ryan Schmidt <
subversion-2008c_at_ryandesign.com> wrote:

>
> On Jul 3, 2008, at 04:33, Shannon Kerr wrote:
>
> 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"?
>>
>
> If you are in the post-commit hook script, then you are given the revision
> number of the commit that just took place, which you can use to discover the
> author as per my earlier mail.
>
> If you're running a script at some other arbitrary time, then you will need
> to discover the last changed revision of foo.txt so that you can then use
> that number to get the author. "svn log -q --limit 1 $LOC" (where $LOC is a
> location in a working copy or a repository URL) can help. For example:
>
>
> $ svn log -q --limit 1 http://svn.collab.net/repos/svn/trunk/README
> ------------------------------------------------------------------------
> r28161 | stylesen | 2007-11-30 01:48:39 -0600 (Fri, 30 Nov 2007)
> ------------------------------------------------------------------------
>
>
> In fact this gives you not only the revision number but also the author. To
> get just the author you can use a little shell magic:
>
>
> $ svn log -q --limit 1 http://svn.collab.net/repos/svn/trunk/README | awk
> '/^r/ {print $3}'
> stylesen
>
>
>
Received on 2008-07-03 11:55:14 CEST

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.