Short answer: No
This is why God created the svn switch in the first place. This allows you to change the main branch of the working directory without losing your work.
Think of it this way: how many times did a developer break something because they said to themselves, βHey, I donβt need to check this. Is this a minor change?β
Even if Subversion allowed you to do what you want, it would still be a bad idea. You basically make changes to the codebase without a real way to make sure that they work in the first place. This is why Subversion requires that you have a working directory before you can make changes * . How do you check your changes?
If you do not want to use svn switch because you do not want to lose your work, you can do the following:
- Copy the entire working directory to another location, then use
svn switch on one to make that tool. - Finish your work in your branch. Commit the changes and pay attention to the version number. Now either make
svn co or svn switch to get a working copy of the trunk. Then use svn merge -r to merge your changes into the trunk. And, of course, check your changes before committing them.
* Subversion allows mkdir , cp , mv and rm to work directly with the URL, but basically it allows you to manipulate branches without having to create a working directory.
David W.
source share