Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the default author for accessing a local SVN repository?

I use TortoiseSVN to access file based local repo. In all my commits an author is my Windows login name. Is it possible to use different name?

I know how to change author after commit but how to change before? Installing apache/svnserver is not an option.

like image 538
Michal Sznajder Avatar asked Sep 05 '08 12:09

Michal Sznajder


2 Answers

Yes, it's possible.

TortoiseSVN and the svn command line client share the same settings location in your profile folder. So you may simply checkout one version using svn.exe:

$ svn co --username different_user_name file:///C:/path/to/your/repo

... and Subversion will happily replace the associated username for that repository. New commits from TortoiseSVN will then always use that username, no matter with what program you make the new checkouts.

The procedure should work with TortoiseSVN 1.5.5. If it doesn't, try emptying svn's authentication cache (%APPDATA%\Subversion\auth\svn.username) first.

like image 190
Rômulo Ceccon Avatar answered Oct 07 '22 18:10

Rômulo Ceccon


Another possible workaround (but I am NOT advocating it) is to use a client-side hook script before commit, in order to change the username.

Hook scripts are discussed in the Subversion book, and local hooks are discussed in "Client Side Hook Scripts" in TortoiseSVN help.

like image 43
JXG Avatar answered Oct 07 '22 18:10

JXG