
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
226
|
Chapter 9: Subversion Complete Reference
--password PASS
--no-auth-cache
--non-interactive
--config-dir DIR
Examples
If you’re currently inside the directory vendors which was branched to vendors-with-fix and
you’d like to switch your working copy to that branch:
$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .
U myproj/foo.txt
U myproj/bar.txt
U myproj/baz.c
U myproj/qux.c
Updated to revision 31.
And 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.txt
U myproj/baz.c
U myproj/qux.c
Updated to revision 31.
You can just switch part of your working copy to a branch if you don’t
want to switch your entire working copy.
If the location of your repository changes and you have an existing working copy that
you’d like to continue to use, you can use
svn switch --relocate to change your working
copy from one URL to another:
$ svn checkout file:///tmp/repos test
A test/a
A test/b
...
$ mv repos newlocation
$ cd test/
$ svn update
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///tmp/repos'
$ svn switch --relocate file:///tmp/repos file:///tmp/newlocation .
$ svn update
At revision 3.
svn update ...