[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn switch problem - cannot switch from ''unclean'' checkout

From: james coleman <jamesc_at_dspsrv.com>
Date: 2007-07-13 00:04:09 CEST

Karl Fogel wrote:
> james coleman <jamesc@dspsrv.com> writes:
>> We had a bit of a problem with using svn switch. If doing a switch
>> and there are unversioned (maybe ignored) items in the checkout then
>> you can get errors and end up with an unusable repository. We now
doh! I meant unusable working copy.


> Both the FAQ and the manual's sources are online, and you could help
> by writing the patches you suggest for them. See
> http://subversion.tigris.org/mailing-list-guidelines.html#patches
> Thank you,
> -Karl

Thanks Karl,

I'd like to do that.

FAQ entry could go in Howto or Troubleshooting section.
I think Troubleshooting would be good because people that hit a problem with using
svn switch would probably look there.
I've this just about ready to submit to the dev list.

I think a note or warning in manual would be good too.

Here is the text of the FAQ entry I think would work:

Why doesn't svn switch work in some cases?

In some cases where there are unversioned (and maybe ignored) items
in the working copy then you can get errors and end up with an
unusable working copy. The more complex the changes on branch and trunk
the more likely this is. See issue 2505.

A switch from a pristine clean checkout always works. There are two
ways of working if you are using svn switch as part of your development

    1. Fully clean your working copy of unversioned (including ignored)
       files before switch.
       WARNING! This deletes all unversioned dirs/files.
       Be VERY sure that you do not need anything that will be removed.

           alias svn-unversioned='svn status --no-ignore | grep "^[I?]" | sed 's/^[I?]//''
           alias svn-clean-wc='svn-unversioned |xargs rm -rf'

    2. Keep a pristine clean checkout. Update that then copy it and switch
       in the copy when a switch to another branch is desired.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 13 00:03:42 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.