Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN: switching active user on checked out repository

I have a project checked out on my local machine from a remote repository, and I would like to switch the 'active' user, so that for subsequent commits the new user will come up in the logs. Is there a way to do this other than checking out the whole repository again under the new username?

Many thanks,

Joseph.

like image 496
Joseph Paterson Avatar asked Oct 11 '11 23:10

Joseph Paterson


People also ask

How does svn switch work?

A switch moves your working copy through time and space. Because svn switch is essentially a variant of svn update, it shares the same behaviors; any local modifications in your working copy are preserved when new data arrives from the repository.

What is svn check in check out?

The Checkout command is used to copy the files from the SVN repository to the working copy. If we want to access files from the SVN server, then we have to check out it first. The checkout operation creates a working copy of the repository where we can edit, delete, or add contents.

How do I switch between branches in svn?

To switch back, just provide the URL to the location in the repository from which you originally checked out your working copy: $ svn switch http://svn.red-bean.com/repos/trunk/vendors . U myproj/foo. txt U myproj/bar.

What is relocate in svn?

The first svn relocate syntax allows you to update one or more working copies by what essentially amounts to a find-and-replace within the repository root URLs recorded in those working copies. Subversion will replace the initial substring FROM-PREFIX with the string TO-PREFIX in those URLs.


1 Answers

In your home directory there is a directory called .subversion. Inside there is several auth cache files. Find the one with your username in it and delete the file. On the next svn commit or any svn operation, you will be prompted for your username/pw. Enter the username that you want use.

On linux:

/home/me/.subversion/AUTH_CACHE_FILE_HERE

Or on mac:

/Users/me/.subversion/auth/some_cache_file

The filename may vary, but you can actually just delete the entire .subversion directory and it will be recreated with the next svn command.

like image 105
chown Avatar answered Nov 20 '22 09:11

chown