Suppose that my working copy ~/WC/ is up to date with http://acme.com/svn-rep/A/.
Now i would like that same working copy be up to date with http://acme.com/svn-rep/B/.
I have two options:
- svn switch http://acme.com/svn-rep/B/ ~/WC/
- rm -rf ~/WC/ && svn co http://acme.com/svn-rep/B/ ~/WC/
Obviously, the best case of option 1 is faster than then best case of option 2. But can there be a case where for the worst case, option 1 is slower than the worst case than option 2?
The reason i am asking is that i am writing a bunch of scripts to automate some testing, and i will need to work on several branches within the same repository. There is a limited amount of disk space on the test machines, so i will have to reuse the same working copy.
EDIT:
After reading the link in aix’s answer below, there appears to be a third option:
- svn cleanup ~/WC/ && svn switch http://acme.com/svn-rep/B/ ~/WC/
I haven’t personally experienced this, but it would appear that there could be performance issues with
svn switch: Slow switch in subversionIt’s hard to say whether
rm && svn cowould be faster or slower in those circumstances. I’d imagine this would depend on the relative performance of your local disk, network connection to thesvnserver etc.That said, I personally would probably use
svn switchin the first instance, and would look into alternatives only if I run into problems.