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

Re: Change "Author" name in SVN log

From: mercuryman <mercuryman01_at_gmail.com>
Date: Mon, 27 Jul 2009 20:03:46 -0700 (PDT)

Thanks a lot David for your suggestion. I will give it a try & I am quiet
optimistic it would work if I could configure it properly.

All users access through via eclipse with subeclipse or subversive plugin &
they have to use their alphabetic user ID and I can't change the way they
login or the login ID. We are moving a project from on e SVN box
(SVN+Apache+LDAP combination) to a new server that supports multiple
projects & the admin team of the old server has created some scripts around
the "author" property of SVN log so this is required.

BTW, our SVN server is on Linux & the authentication is done through an LDAP
server. I was wondering if there a way to include the value of CN (common
name) field of LDAP record of the commiting user.

Thanks again, I appreciate your help.

David Weintraub wrote:
>
> How does the user log in? Does the user login with the e032408 ID?
>
> Subversion uses whatever the current login is in Windows or Unix, or
> what the user provides when you give it the --username string.
>
> You can modify svn:author revision property, but only once the
> transaction has been committed, and you must have a pre-revprop-change
> hook in place. The hook doesn't have to do anything, but if you don't
> have one, you cannot change revision properties. The actual command is
> like this:
>
> $ svn propset --revprop -r$REV svn:author $author
>
> Getting into very iffy territory: You could create a post-commit hook
> that looks up the old value of svn:author, and sets the new svn:author
> to the more user friendly value. You'll have to also create a
> pre-revprop-change hook that returns an exit value of zero in order
> for the command to work.
>
> I personally would be extremely hesitant to do such a setup. However,
> if I had to do this, what I'd do is have a pre-revprop-change hook
> that verifies that the svn:author is the weird login you currently
> have. Otherwise, I wouldn't allow the property to be changed. That
> way, a normal user cannot change this property after it has been set.
>
> The post-commit hook would have a lookup table going from the weird
> login to the more user friendly author. Once the substitute author
> name is found, I'd simply run the "svn propset --revprop" command.
>
> You can find out more information at
> <http://svnbook.red-bean.com/en/1.5/svn.ref.reposhooks.post-commit.html>
> and
> <http://svnbook.red-bean.com/en/1.5/svn.ref.reposhooks.pre-revprop-change.html>.
>
> Make sure this is something you really, really want to do, and there's
> no way to change your login setup to have user friendly logins. If you
> do decide to go through with this, good luck.
>
> On Mon, Jul 20, 2009 at 4:58 PM, mercuryman<mercuryman01_at_gmail.com> wrote:
>> I have setup SVN server with Apache 2 that serves multiple repositories
>> and
>> LDAP as authentication agent. Its up and running well. The user ID in
>> LDAP
>> database is an alpha-numeric ID like e032408. As this user ID is
>> associated
>> with svn commit & svn log output shows this ID as "Author". This maks it
>> difficult to know who did the commit. Is there a way to replace/change
>> this
>> ID & have SVN read user's "CN" from LDAP database & add it to svn log?
>> Any
>> help is greatly appriciated. Here is my conf file.
>>
>> # Load Subversion Apache Modules
>> LoadModule dav_svn_module modules/mod_dav_svn.so
>> LoadModule authz_svn_module modules/mod_authz_svn.so
>>
>> CustomLog logs/svn_logfile "%t %u %{SVN-ACTION}e" env=SVN-ACTION
>>
>> <Location />
>> AuthType Basic
>> AuthBasicProvider ldap
>> AuthzLDAPAuthoritative off
>> AuthName "Subversion repository"
>> AuthLDAPURL
>> "ldap://ldap.server.com/dc=server,dc=com?uid?sub?(objectClass=*)"
>> AuthLDAPBindDN
>> uid=svcSubversion,ou=ServiceAccounts,ou=Users,dc=server,dc=com
>> AuthLDAPBindPassword password
>>
>> Require valid-user
>> </Location>
>>
>> <Location /svn>
>> DAV svn
>> SVNParentPath /mnt/scm/subversion
>> SVNListParentPath On
>> SVNReposName "Subversion repository"
>>
>> AuthzSVNAccessFile /etc/httpd/conf.d/access_file
>>
>> Satisfy Any
>> Authname "Subversion repositry"
>> </Location>
>> --
>> View this message in context:
>> http://www.nabble.com/Change-%22Author%22-name-in-SVN-log-tp24542566p24542566.html
>> Sent from the Subversion Users mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2372726
>>
>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe_at_subversion.tigris.org].
>>
>
>
>
> --
> David Weintraub
> qazwart_at_gmail.com
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2372753
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe_at_subversion.tigris.org].
>
>

-- 
View this message in context: http://www.nabble.com/Change-%22Author%22-name-in-SVN-log-tp24542566p24691778.html
Sent from the Subversion Users mailing list archive at Nabble.com.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2376194
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-28 08:12:57 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.