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

Re: Switching

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 22 Aug 2013 14:23:59 +0200

On Thu, Aug 22, 2013 at 1:30 PM, John Maher <JohnM_at_rotair.com> wrote:
> Thanks for your replies Andrew and Thorsten.
>
>
> @Andrew there is no need for a svn copy. I do not want to copy a feature in one branch to another; I wish to keep the code isolated.
>
> And yes I know subversion won't delete unversioned files, I appreciate the info on how subversion works. Some of it was helpful. I was hoping to hear how others may have solved the same problem. But it seems the only answer is a tedious and manual process for the simplest of enhancements.
>
> I was hoping to find what others seem to praise, but have continually come up empty handed. I'll check stackoverflow before I give up.
>

The problems you are seeing here are the main reason why I (and some
other users on this list) try to avoid 'switch', and instead use
dedicated working copies for the different branches. Like you have
seen, it's just far too likely for the different 'variants' to step on
each other's toes (e.g. with generated files being in the way).

Another advantage of using different checkouts is that you can
immediately see (from the local directory name) in which branch you're
working. Leads to less incidents of the type 'oops, committed to the
wrong branch'.

Except for extremely large working copies, disk space is usually cheap
in comparison to the wasted time when you encounter such issues.
Perhaps the initial checkout of each of the working copies takes some
time, but that's mostly a one-time cost (one time per branch ... so it
depends a bit on how many branches or how often you branch).

I suggest you try to adapt your workflow to work with separate working copies.

(This does not mean that 'switch' is completely useless -- I still use
it for small ad-hoc things. It depends, YMMV. If you use it in a
structural way in your workflow, I think it's best to avoid too
complex working copies with perhaps local modifications, especially
when there's a risk of debris being left behind).

-- 
Johan
Received on 2013-08-22 14:24:54 CEST

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