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

Re: Changing a commit username

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Mon, 26 Oct 2009 05:51:57 -0500

On Oct 26, 2009, at 04:26, Jake Stone wrote:

> Our svn server is running on Apache with LDAP authentication, and
> until
> recently any username was "DOMAIN/user" - we decided this was
> unnecessary since there was only one domain. A quick change to the
> server and usernames became just "user" The problem is, there are
> several commit made to the repository before this happened. Is it
> possible to replace these name in the repository? I would like to
> replace any instances of "DOMAIN/user" with "user" so searches by
> commit
> name, etc work as expected.
>
> One user also had an incorrectly spelled username, and we have the
> same
> problem.

If there are just a few occurrences, set up a pre-revprop-change hook
to allow you to change revision properties. Then use "svn propset --
revprop -rREV svn:author AUTHOR" to set the author of revision "REV"
to "AUTHOR". If there are many, you could write a script to automate
this. You can remove the pre-revprop-change hook after you're done,
unless you want to continue to allow people to edit revision properties.

Another option is to dump the repository with "svnadmin dump", then
use svndumptool to transform the svn:author revprop as needed, then
"svnadmin load" that into a new repository. This would involve the
inconvenience of having your repository offline, and could take a long
time, depending on how much data is in the repository. So probably
you'll just want to use "svn propset" (or "svn propedit") as above.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-26 11:53:02 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.