[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: Wed, 21 Oct 2009 21:31:07 +0200

On 21.10.2009 07:33, Jean-Marc van Leerdam wrote:
> Hi Todd,
>
> 2009/10/21 Todd C. Gleason<tgleason_at_impac.com>:
>> I just tried this using TSVN 1.6.5, and it was as I said: TortoiseSVN offered to commit all the files from both locations.
>>
>> In more detail:
>>
>> 1. I edited within folder 1 in my branch WC
>> 2. I edited within folder 2 in my trunk WC
>> 3. I copied folder 1 from my branch WC into my trunk WC, overwriting the contents of the trunk WC's folder 1 (including .svn dirs).
>> 4. I selected Svn Commit...
>> 5. Both the files in folder 1 (copied from the branch) and folder 2 (always the trunk) displayed in the commit dialog.
>> 6. I verified that the Svn path of the copied folder 1 is still the branch, while folder 2 is the trunk, as is the parent of folders 1 and 2.
>
> Sure, this is expected. A nested layout with parts coming from one and
> the same repository can be committed in one go. That's intended and
> frequently preferred behavior (even if it's not always expected by the
> user).

Ups, that's neither a nested layout nor a switched tree. That's
basically a broken working copy:
you're 'replacing' folder1 in trunk with folder1 of the branch. But
since folder1 is attached to its parent in trunk, its parent still
considers folder1 as its child - but folder1 is not really its child
anymore but points somewhere else. And the parent folder doesn't know
about it.
Problem here is that an 'svn status' doesn't check that (actually, it
can't since folder1 still is part of the same repository and url
comparisons don't work reliable enough to do a check which works in
*all* situations).
And a commit does just that: it commits each item to where it points to
and doesn't check for parent->child or child->parent relations either.

If you want a warning in such situations, you'd have to ask on the svn
mailing list for an enhancement to 'svn status'.

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=2409920
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-10-21 21:31:17 CEST

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

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