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

Re: Switching

From: Edwin Castro <0ptikGhost_at_gmx.us>
Date: Fri, 23 Aug 2013 09:17:28 -0700

On 8/23/13 8:16 AM, Anders J. Munch wrote:
> Edwin Castro wrote:
>> I think the --force option is dangerous. Try it out but, in my opinion,
>> you should not use it.
> Why? Doesn't it perfectly solve the described problem?

The problem with --force, as the documentation points out, is that it
can make things versioned that were previously unversioned. Using a
concrete example, a *.sou file that was previously unversioned might
become versioned after a switch and then gets committed, accidentally,
into your respository.

> I had like so many others given up on switch, because cleaning up
> working copies prior to the switch was annoying busywork, an
> unnecessary risk (you might delete files that you wished you hadn't)
> and very easily forgotten, leading to a messed up working copy. But
> now I'm beginning to rethink that; I just have to remember to use
> --force with every svn switch.
> I don't buy the argument about different histories: the pre-existing
> directory doesn't have a subversion history, so from svn's point of
> view there is no conflict. What are the real, practical problems that
> you know of or foresee with svn swich --force?

When objects do not have history, then subversion is in the position to
try to decide what to do with content that already exists on the
filesystem. It can't make reasonable decisions because there is no base
revision to use in the 3-way diff. Ultimately, the proper response is
for subversion to say "I can't add the file/directory/what-have-you
because there is something blocking my way". It then becomes the user's
responsibility to determine what to do. Thinking in the most general
sense, one solution for this scenario might work well for one individual
but not another. The prescribed solution might not even work reliably
every time that one individual sees this scenario. In order for
subversion to do the right thing it would need to be psychic. I'm afraid
subversion already takes the best possible action which is to require
user intervention.

Edwin G. Castro
Received on 2013-08-23 18:18:26 CEST

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.