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

Re: Switching

From: Ryan Schmidt <subversion-2012c_at_ryandesign.com>
Date: Sat, 24 Aug 2013 06:51:25 -0500

On Aug 24, 2013, at 02:48, Branko Čibej wrote:
> On 24.08.2013 03:44, Ryan Schmidt wrote:
>> On Aug 23, 2013, at 13:31, Les Mikesell wrote:
>>> I think it is the problem we've been discussing. Leaving them means
>>> you have to keep the containing directory, which becomes unversioned
>>> as you switch away from the branch having it,
>> Correct.
>>
>>> and then a conflict when
>>> you switch back.
>> *This* is the problem we're discussing. *This* is what Subversion should be smart enough to avoid. None of the discussion I've read thus far gives me a convincing explanation for why this should not be possible.
>
> You're assuming it is correct, in all cases, to silently make a
> directory versioned because the incoming directory happens to have the
> same name. It is not. It may be marginally correct in your case,
> however, Subversion has no way of knowing that the unversioned directory
> it sees is in any way related to whatever is on the switched branch. It
> needs user input; it cannot magically become "smart enough".

If, as you said below, this shouldn't happen generally, then one way to make Subversion smart enough would be to have it remember when it converted a directory from versioned to unversioned due to a switch, so that it can then seamlessly transform it back if the user switches back.

> For example, consider a typical Java module which has "build.xml" file
> and two directories, "src" and "test". You add such a module called "A"
> on the branch. Someone else creates a completely different and unrelated
> module in their working copy, incidentally also calling it "A". Then
> they switch to the branch. What happens?
>
> You're proposing that Subversion would say, "Oh, this unversioned thing
> I have here is also called "A", I'm going to assume its the same as the
> incoming directory, let's make it so." And in the next step: "Oh, I have
> an unversioned file called build.xml, I'll just assume it's the same as
> the incoming and merge changes in...." boom, instant merge conflict.

Certainly if there are *file* conflicts then Subversion should complain loudly and not do anything automatically, however that was not the scenario the person who opened this thread posed.
Received on 2013-08-24 13:52:27 CEST

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