Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: Reverting may delete files

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

Re: Reverting may delete files

Author steveking
Full name Stefan Küng
Date 2009-01-05 09:43:21 PST
Message Jan Normann Nielsen wrote:
> Hi
>
> In some cases, reverting an added file may cause the file to be deleted.
> My scenario is as following: In a certain folder, I have an added file
> and a changed file in a sub folder.
>
> C:\data\my-wc\common>svn status
> ? test.txt
> M taglibs\my-taglib.tld
>
> When choosing "check for modifications" in TSVN on the "common" folder,
> both files show up. Selecting them both and choosing "revert" reverts
> the changed file and deletes the added file and puts in the trashcan. In
> my opinion, TSVN should have left the added file as unversioned.
>
> The bug is definitely there, but due to disclosure at my company, I
> cannot send a copy of my wc. I've tried to reproduce the bug using a
> very simple local test repository setup, but TSVN doesn't delete the
> file in that case. I hope you are able to fix the bug using my
> description above anyway.

Fixed in r15022.

Stefan

--
       ___
  oo // \\ "De Chelonian Mobile"
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/> The coolest Interface to (Sub)Version Control
   /_/ \_\ http://tortoisesvn.net
Attachments

Re: Reverting may delete files

Author Dave Lawrence <dlawrence at ad-holdings dot co dot uk>
Full name Dave Lawrence <dlawrence at ad-holdings dot co dot uk>
Date 2009-01-05 06:14:21 PST
Message Simon Large wrote:
> 2009/1/5 Jan Normann Nielsen <spam at dubbekarl dot dk>:
>> On Mon, Jan 5, 2009 at 06:33, Jan Normann Nielsen <spam at dubbekarl dot dk> wrote:
>>>> If you can't give an exact reproduction recipe, the developers can't
>>>> research the "bug". "Full reproduction recipe" includes telling us
>>>> what version of TSVN you're using, and your OS.
>>>>
>>> 1) Ensure "use recycle bin when reverting" is selected
>>> 2) Select an unversioned file and a modified file from the check for
>>> modifications dialogue, select "revert".
>>> Both files are sent to the recycle bin. The modified file is "restored"
>>> by the revert, the other is "lost".
>>>
>>> WinXP SP3. I'm running a nightly build from trunk. (updated this morning)
>>>
>>>
>>>> Revert should be done by the Subversion libraries, meaning that if
>>>> this were a true bug, it would have been seen/found by someone by now
>>>> and fixed.
>>>>
>>> I think use of the recycle bin when reverting and resolving is unique to
>>> TSVN.
>>>
>> I'm sorry for the misunderstanding. Dave has already cleared it up.
>>
>> To sum everything up, TSVN's handling of unversioned files is confusing.
>> If you right-click an unversioned file in Explorer, you cannot revert
>> it. If you choose "check for modifications" on a folder with an
>> unversioned file in it, you cannot choose "revert" if you right-click
>> the file. If you select multiple files including unversioned items and
>> right-click, you can choose "revert", but the unversioned items are
>> deleted. I think TSVN should just ignore the unversioned files (i.e. not
>> delete them). This would make TSVN consistent with the command-line
>> client which will skip unversioned items if they are the target of a
>> revert operation.
>
> 1.4.x does indeed ignore unversioned items during revert, so this
> would be a regression in 1.5.x
>
> Simon
>
That's because 1.4.x doesn't use the recycle bin. I think TSVN 1.5.x
sends the file to the recycle bin, (a non subversion operation), then
does an svn revert.

I think there's actually a bug in the context menu logic here. In the
example (a modified and an unversioned file selected), "add" does not
show up, because "add" is not appropriate for all the selected files (it
is only appropriate for the unversioned file, not the modified one). By
the same token, "revert" is not appropriate for all of the files, so
that shouldn't be in the menu either.

The same is true for the shell context menu (I guess they all use the
same logic). However, since there is a registry setting makes *all*
context menu items appear under all circumstances, fixing the context
menu logic would not be sufficient by itself.

Re: Reverting may delete files

Author "Simon Large" <simon dot tortoisesvn at googlemail dot com>
Full name "Simon Large" <simon dot tortoisesvn at googlemail dot com>
Date 2009-01-05 05:08:23 PST
Message 2009/1/5 Jan Normann Nielsen <spam at dubbekarl dot dk>:
> On Mon, Jan 5, 2009 at 06:33, Jan Normann Nielsen <spam at dubbekarl dot dk> wrote:
>>> If you can't give an exact reproduction recipe, the developers can't
>>> research the "bug". "Full reproduction recipe" includes telling us
>>> what version of TSVN you're using, and your OS.
>>>
>>
>> 1) Ensure "use recycle bin when reverting" is selected
>> 2) Select an unversioned file and a modified file from the check for
>> modifications dialogue, select "revert".
>> Both files are sent to the recycle bin. The modified file is "restored"
>> by the revert, the other is "lost".
>>
>> WinXP SP3. I'm running a nightly build from trunk. (updated this morning)
>>
>>
>>> Revert should be done by the Subversion libraries, meaning that if
>>> this were a true bug, it would have been seen/found by someone by now
>>> and fixed.
>>>
>>
>> I think use of the recycle bin when reverting and resolving is unique to
>> TSVN.
>>
> I'm sorry for the misunderstanding. Dave has already cleared it up.
>
> To sum everything up, TSVN's handling of unversioned files is confusing.
> If you right-click an unversioned file in Explorer, you cannot revert
> it. If you choose "check for modifications" on a folder with an
> unversioned file in it, you cannot choose "revert" if you right-click
> the file. If you select multiple files including unversioned items and
> right-click, you can choose "revert", but the unversioned items are
> deleted. I think TSVN should just ignore the unversioned files (i.e. not
> delete them). This would make TSVN consistent with the command-line
> client which will skip unversioned items if they are the target of a
> revert operation.

1.4.x does indeed ignore unversioned items during revert, so this
would be a regression in 1.5.x

Simon

--
: ___
: oo // \\ "De Chelonian Mobile"
: (_,\/ \_/ \ TortoiseSVN
: \ \_/_\_/> The coolest Interface to (Sub)Version Control
: /_/ \_\ http://tortoisesvn.net

Re: Reverting may delete files

Author Jan Normann Nielsen <spam at dubbekarl dot dk>
Full name Jan Normann Nielsen <spam at dubbekarl dot dk>
Date 2009-01-05 05:02:23 PST
Message On Mon, Jan 5, 2009 at 06:33, Jan Normann Nielsen <spam at dubbekarl dot dk> wrote:
>> If you can't give an exact reproduction recipe, the developers can't
>> research the "bug". "Full reproduction recipe" includes telling us
>> what version of TSVN you're using, and your OS.
>>
>
> 1) Ensure "use recycle bin when reverting" is selected
> 2) Select an unversioned file and a modified file from the check for
> modifications dialogue, select "revert".
> Both files are sent to the recycle bin. The modified file is "restored"
> by the revert, the other is "lost".
>
> WinXP SP3. I'm running a nightly build from trunk. (updated this morning)
>
>
>> Revert should be done by the Subversion libraries, meaning that if
>> this were a true bug, it would have been seen/found by someone by now
>> and fixed.
>>
>
> I think use of the recycle bin when reverting and resolving is unique to
> TSVN.
>
I'm sorry for the misunderstanding. Dave has already cleared it up.

To sum everything up, TSVN's handling of unversioned files is confusing.
If you right-click an unversioned file in Explorer, you cannot revert
it. If you choose "check for modifications" on a folder with an
unversioned file in it, you cannot choose "revert" if you right-click
the file. If you select multiple files including unversioned items and
right-click, you can choose "revert", but the unversioned items are
deleted. I think TSVN should just ignore the unversioned files (i.e. not
delete them). This would make TSVN consistent with the command-line
client which will skip unversioned items if they are the target of a
revert operation.

Best wishes,
Jan

Re: Reverting may delete files

Author Dave Lawrence <dlawrence at ad-holdings dot co dot uk>
Full name Dave Lawrence <dlawrence at ad-holdings dot co dot uk>
Date 2009-01-05 04:42:20 PST
Message Andy Levy wrote:
> On Mon, Jan 5, 2009 at 06:33, Jan Normann Nielsen <spam at dubbekarl dot dk> wrote:
>> Hi
>>
>> In some cases, reverting an added file may cause the file to be deleted.
>> My scenario is as following: In a certain folder, I have an added file
>> and a changed file in a sub folder.
>>
>> C:\data\my-wc\common>svn status
>> ? test.txt
>> M taglibs\my-taglib.tld
>>
>> When choosing "check for modifications" in TSVN on the "common" folder,
>> both files show up. Selecting them both and choosing "revert" reverts
>> the changed file and deletes the added file and puts in the trashcan. In
>> my opinion, TSVN should have left the added file as unversioned.
>
> test.txt is not Added. It's Unknown. Had you actually added that file,
> its status would show A.
>
>> The bug is definitely there, but due to disclosure at my company, I
>> cannot send a copy of my wc. I've tried to reproduce the bug using a
>> very simple local test repository setup, but TSVN doesn't delete the
>> file in that case. I hope you are able to fix the bug using my
>> description above anyway.
>
Possibly the confusion between "added" and "unversioned" is the reason
why you couldn't work out how to reproduce this?

> If you can't give an exact reproduction recipe, the developers can't
> research the "bug". "Full reproduction recipe" includes telling us
> what version of TSVN you're using, and your OS.

1) Ensure "use recycle bin when reverting" is selected
2) Select an unversioned file and a modified file from the check for
modifications dialogue, select "revert".
Both files are sent to the recycle bin. The modified file is "restored"
by the revert, the other is "lost".

WinXP SP3. I'm running a nightly build from trunk. (updated this morning)

>
> Revert should be done by the Subversion libraries, meaning that if
> this were a true bug, it would have been seen/found by someone by now
> and fixed.

I think use of the recycle bin when reverting and resolving is unique to
TSVN.

Re: Reverting may delete files

Author "Andy Levy" <andy dot levy at gmail dot com>
Full name "Andy Levy" <andy dot levy at gmail dot com>
Date 2009-01-05 04:22:17 PST
Message On Mon, Jan 5, 2009 at 06:33, Jan Normann Nielsen <spam at dubbekarl dot dk> wrote:
> Hi
>
> In some cases, reverting an added file may cause the file to be deleted.
> My scenario is as following: In a certain folder, I have an added file
> and a changed file in a sub folder.
>
> C:\data\my-wc\common>svn status
> ? test.txt
> M taglibs\my-taglib.tld
>
> When choosing "check for modifications" in TSVN on the "common" folder,
> both files show up. Selecting them both and choosing "revert" reverts
> the changed file and deletes the added file and puts in the trashcan. In
> my opinion, TSVN should have left the added file as unversioned.

test.txt is not Added. It's Unknown. Had you actually added that file,
its status would show A.

> The bug is definitely there, but due to disclosure at my company, I
> cannot send a copy of my wc. I've tried to reproduce the bug using a
> very simple local test repository setup, but TSVN doesn't delete the
> file in that case. I hope you are able to fix the bug using my
> description above anyway.

If you can't give an exact reproduction recipe, the developers can't
research the "bug". "Full reproduction recipe" includes telling us
what version of TSVN you're using, and your OS.

 Revert should be done by the Subversion libraries, meaning that if
this were a true bug, it would have been seen/found by someone by now
and fixed.

Reverting may delete files

Author Jan Normann Nielsen <spam at dubbekarl dot dk>
Full name Jan Normann Nielsen <spam at dubbekarl dot dk>
Date 2009-01-05 03:33:13 PST
Message Hi

In some cases, reverting an added file may cause the file to be deleted.
My scenario is as following: In a certain folder, I have an added file
and a changed file in a sub folder.

C:\data\my-wc\common>svn status
? test.txt
M taglibs\my-taglib.tld

When choosing "check for modifications" in TSVN on the "common" folder,
both files show up. Selecting them both and choosing "revert" reverts
the changed file and deletes the added file and puts in the trashcan. In
my opinion, TSVN should have left the added file as unversioned.

The bug is definitely there, but due to disclosure at my company, I
cannot send a copy of my wc. I've tried to reproduce the bug using a
very simple local test repository setup, but TSVN doesn't delete the
file in that case. I hope you are able to fix the bug using my
description above anyway.

Best wishes,
Jan
Messages per page: