On Apr 23, 2008, at 5:37 PM, Stefan Sperling wrote:
> On Wed, Apr 23, 2008 at 07:51:28PM -0400, Karl Fogel wrote:
>> Aaron Eppolito <aarone_at_apple.com> writes:
>>> In very short summary, if you inadvertently switch a subdirectory
>>> to a branch/
>>> tag/head of the root level, it will DELETE all files in the
>>> subdirectory,
>>> INCLUDING locally modified files.
>>>
>> Yes, "D file1.cpp" will fly by in the output, but 'file1.cpp' is
>> still
>> there on disk -- it is preserved (as a now-unversioned file)
>> precisely
>> because it was in a modified state when still versioned.
>
> That's the current behaviour, yes.
>
> Note that the scenario involves a tree conflict. See use case 2:
> http://svn.collab.net/repos/svn/trunk/notes/tree-conflicts/use-cases.txt
> Just replace "update" with "switch" and "move" with "deletion"
> in that description, and you get the situation we're talking about.
>
> Aaron, the corresponding issue in the tracker is:
> http://subversion.tigris.org/issues/show_bug.cgi?id=2282
Yep, given the substitution, that seems right. ;)
I suppose anything that warns you *before* mangling your WC would be
infinitely preferred. As I replied to David, a warning ahead of time
(that would require a --force) would be great. Donald's comments from
2505 echo my sentiment too:
------- Additional comments from Donald H Locker Fri Jul 13 04:53:56
-0700 2007 -------
This would seem to me to be a good candidate for a --dry-run type of
behaviour,
or a verification step before actually attempting to execute the
switch.
An error message of "can't switch - [files/directories list here]
would be lost
or damaged" would be very useful. As it is, I have to look at all the
bits I
know have changed and figure out how to set them aside/protect them,
do the
switch and restore them. Not so bad with ignored or unversioned
artifacts, but
added and renamed bits are a pain.
In general, warning on a conflict after the fact in my particular case
wouldn't be really helpful. I knew I had seriously messed up when I
saw a hundred 'D's go by followed by the project starting to check out!
Thanks all,
-Aaron
Received on 2008-04-24 03:43:56 CEST