[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: Todd C. Gleason <tgleason_at_impac.com>
Date: Tue, 20 Oct 2009 16:47:13 -0700

> -----Original Message-----
> From: Stefan Küng [mailto:tortoisesvn_at_gmail.com]
> Sent: Monday, October 19, 2009 12:42 PM
> To: users_at_tortoisesvn.tigris.org
> Subject: Re: feature request: commit warning for switched subtrees
>
> 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, ...).

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.

--Todd

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2409578

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-10-21 01:57:34 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.