views:

385

answers:

4

HI have 3 WinXP computers which access subversion based on a linux server. I would like to change the author name displayed in the logs on a couple of the computers cause they are 'development pc 3' and the name of an old employee. How do I do this?

+5  A: 

Ask TSVN to "show log", in the change log order all commits by author, then select all the commits by the author of interest and use "Edit author".

sharptooth
+1 for the grouping and select all :)
John Weldon
what im trying to do those is make it so the new author name is used on new commits, not just on previous stuff.
David
For the new name on the new commits, you have to change the username used to log in.If the username and password were saved, go to the Tortoise settings, under "Saved Data" and click "Clear" on "Authentication data".
Danny T.
+1 for @Danny T's comment. You may also need to rename the Windows account name too.
devstuff
A: 

You'd change the author name in the repository, not on the individual client computers...

Tortoise SVN has an edit author capability in the right click context menu on the log window.

John Weldon
+1  A: 

Hi David,

Most likely you've tried changing the author name like sharptooth suggested, but then you probably received and error message stating that you couldn't. This requires the implicit use of the pre-revprop-change hook. By default this hook will always return an error unless you actually override the template and make an actual script that is capable of returning a zero value. From svn-book:

The pre-revprop-change hook is run immediately prior to the modification of a revision property when performed outside the scope of a normal commit. Unlike the other hooks, the default state of this one is to deny the proposed action. The hook must actually exist and return a zero exit value before a revision property modification can happen.

Here's a copy of my pre-revprop-change hook which allows me to edit the log message, but not the author:

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"

if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
# if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:author" ]; then exit 0; fi

echo "Changing revision properties other than svn:log and is prohibited" >&2
exit 1

To be able to change the author on a given revision, you would need to uncomment the second if statement.

-Zachary

Zachary Young
A: 

Hi Everyone, Even though the script is same as above mentioned one we are not able to edit the log massage in SVN.

Thanks in advance.

amar
Hi, Thanks for your quick reply,I want to edit the log massage not the author.
amar
@amar: Please verify the name of the file you put the script in. Also, please verify the permissions on the file.
Zachary Young