In the 7 years I've been using our SVN repository, looking at the history, it's now all over the place.
So I wanted to make my username consistent...
Preliminary steps: allow changing property in the svn repository by adding a hooks/pre-revprop-change file.
it woud contain only one thing:
Because in our setup we use ViewVC, we also needed a hooks/post-revprop-change with:
/var/www/viewvc/bin/svndbadmin update "$REPOS" "$REV"
I didn't feel like writing much code do to what seemed to be a trivial task.
Looking at various solutions I found this interesting project: XMLSH. Alas, it's quite poorly documented.
After going through the examples, I came up with:
svn log --xml | xread logs
entries=<[ $logs/log/logentry ]>
for entry in $entries; do
echo "entry: " $rev
author2=$(echo $author | sed -e 's/(avenardj|jeanyves_avenard|jyavenard)$/jean-yves.avenard/g')
if [ "$author" != "$author2" ]; then
echo " -> $author2"
svn propset --revprop -r $rev svn:author $author2
Obviously, replace the regex with the one suitable for you.