When my team first started out with SVN we all just used our first names when committing to the repository, however, now that our team has grown, we are running into issues because we just hired a second Mike
.
What we would like to do is change everybody's usernames to be the same as the username on their computer (first name initial + last name). The issue that I'm seeing is that the SVN history will still show the old usernames on commits.
Is there a tool out there for changing usernames throughout the entire history of a repository?
For example, I would like every commit that is currently attributed to Mike to change to msmith, all the way back to revision 1.
My first thought is that I'll have to do some parsing and processing on a dump file, but a tool would be nice.
You can use svndumptool:
svnadmin dump path/to/my/repo > repo.dump
svndumptool transform-revprop svn:author originalregexp newvalue repo.dump newrepo.dump
TortoiseSVN has excellent support for this functionality: within its Revision Log Dialog one can filter by author (even via regular expressions), select revisions from the filtered list as desired (usually all like in this question) and select 'Edit author' from the context menu.
The pre condition of having a pre-revprop-change hook in place as mentioned in jeroenhs answer does still apply, of course.
The processing is rather slow, but depending on ones needs this might still be much faster and/or more convenient then having to dump an entire repository and process these potentially huge dump file(s) with scripts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With