July 06, 2012

SVN Username Mysteriously Changes on Windows


While using SVN, I recently noticed my commits to the repository were no longer using my computer login username.  Somehow, something happened to tell SVN to use a different username.  If you are using Windows for you development environment and you have run into this issue, this article will give you hints on where to look to fix it.

Subversion's "Application Data"

I am running the Window's SVN client SlikSVN v1.6.1.  After running the Maven release plugin on my project, I noticed commits to the SVN repository were no longer using my computer login username, but were instead using the username associated with running the Maven release plugin.  Since not all users are given Nexus permissions to write releases, the Maven release plugin needs to be executed with a different username.  SlikSVN somehow "remembered" this username and all commits to the SVN repository after that were using it.  This is of course a major problem because looking back through the SVN history it is not possible to determine who really made the changes.

After searching online for this problem, I spent some time running through the "Application Data" directory.  I eventually found this directory:
XP: "C:\Documents and Settings\[username]\Application Data\Subversion\auth\svn.simple"
7: "C:\Users\[username]\AppData\Roaming\Subversion\auth\svn.simple"
Inside this directory is what looks like a randomly generated file:
With contents that looks like this:
K 8
V 8
K 8
V 280
K 15
V 28
<http://bjcesinf03:80> crowd
K 8
V 14

The [SOME_SVN_USERNAME] was my problem. 

The solution is to delete this file.


If you are running Windows and your SVN username mysteriously becomes something else when performing commits to the repository, try going to this directory:
 "C:\Documents and Settings\[username]\Application Data\Subversion\auth\svn.simple"
and delete the randomly generated file in this directory which contains the username.


No comments:

Post a Comment