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

Re: feature request: commit warning for switched subtrees

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 19 Oct 2009 20:42:24 +0200

On 19.10.2009 19:54, Todd C. Gleason wrote:
>> -----Original Message----- From: Stefan Küng
>> [mailto:tortoisesvn_at_gmail.com] Sent: Saturday, October 17, 2009
>> 2:33 AM To: users_at_tortoisesvn.tigris.org Subject: Re: feature
>> request: commit warning for switched subtrees
>>
>> On 13.10.2009 18:06, Todd C. Gleason wrote:
>>> I've seen users occasionally commit changes from multiple trees
>>> due to the accidental presence of switched subtrees, and would
>>> like it if TortoiseSVN gave a warning when you did this.
>>>
>>> The way I think this most commonly happens is that the user has
>>> two working copies, for instance:
>>>
>>> C:\dev\A -> /branches/A
>>>
>>> C:\dev\trunk -> /trunk
>>>
>>> The user makes changes in A\1 and copies the whole "1" folder
>>> over under C:\dev\trunk, overwriting C:\dev\trunk\1 .
>>>
>>> Then maybe the user makes other changes in C:\dev\trunk\2, or
>>> copies individual files from C:\dev\A\2 into C:\dev\trunk\2 .
>>>
>>> Yes, the user doesn't necessarily understand that each individual
>>> .svn folder knows where it goes, and is not a slave to the parent
>>> directory except during switch operations. Or maybe the user
>>> knows it but isn't paying that close attention, or forgot that
>>> their various WC folders were not part of the same tree.
>>>
>>> In any case, at this point C:\dev\trunk\1 is mapped to
>>> /branches/A/1, while C:\dev\trunk\2 is mapped to /trunk/2 .
>>>
>>> User commits, and changes end up in /branches/A as well as /trunk
>>> .
>>
>> I'm not sure how you got here: if you copy a whole folder
>> (including the .svn folder) into a working copy, you'll end up with
>> a 'nested' layout (not a switched folder!). And the commit dialog
>> doesn't show items in nested folders, so committing them isn't
>> possible (unless you select them manually first and then show the
>> commit dialog).
>
> The user didn't copy a whole working copy under a working copy; he
> copied part of one working copy over another. So, C:\dev\A\1 was
> copied over top of C:\dev\trunk\1 so that now C:\dev\trunk\1 doesn't
> point at /trunk/1, but at /branches/A/1. I believe this does work
> out to a switched subtree--C:\dev\trunk\1 is a subtree of
> C:\dev\trunk and it doesn't point at the original URL, but to the
> equivalent from the A branch.
>
> Please let me know if that's still not clear.

Nope, that still would result in a nested layout. A switched folder has
to be switched with the switch command. Only then is the folder (or
file) considered 'switched' (and gets an (s) added to its status text in
the TSVN dialogs like commit, check-for-modifications, ...).

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2409086
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-10-19 20:42:38 CEST

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