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

Re: Remap authors (was: Re: AuthzSVNAccessFile )

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-12-11 22:25:06 CET

On Dec 11, 2006, at 06:42, Philip M. Gollucci wrote:

> 2) I've heard wind of a tool to remap authors after/during the
> cvs2svn conversion. Any hints on where this tool is or might how
> to make one myself ?

I can give you one solution to this: you can set the svn:author
property yourself. You'd need to (temporarily, if you wish) install a
pre-revprop-change hook to allow revision property changes to take
place. See pre-revprop-change.tmpl in your hooks directory for an

To start, you could use "svn log --quiet $REPO_URL" to get a list of
all revisions and their authors. Send this to a text editor where you
can rearrange the output into a series of "svn propset --revprop -r X
svn:author" lines. Then execute these lines.

For example, say my log output reads:

r234 | ryan | 2006-11-24 00:05:26 -0600 (Fri, 24 Nov 2006)
r208 | philip | 2006-10-03 16:18:47 -0500 (Tue, 03 Oct 2006)

And I would like to change "ryan" to "rschmidt" and "philip" to
"pgollucci". I would send that log output to a text editor and munge
it (using a set of search/replace operations, possibly with regular
expressions) so that it looks like this:

svn propset --revprop -r 234 svn:author rschmidt $REPO_URL
svn propset --revprop -r 208 svn:author pgollucci $REPO_URL

where $REPO_URL is the actual URL to the repository. Then I would
execute this script.

Then you can remove the pre-revprop-change hook to prevent others
from being able to make such changes in the future.

Someone else's suggestion of dumping the repository, munging the
dumpfile and reloading it could work too, but I don't feel
comfortable munging dumpfiles, and besides, my solution works even if
others are actively using the repository; dealing with a dumpfile
means all write access to the repository needs to be disabled while
the transformation takes place.

To reply to the mailing list, please use your mailer's Reply To All  
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Dec 11 22:25:54 2006

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.