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

Re: lose unversioned data with revert

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 29 Feb 2012 14:46:04 +0000 (GMT)

Philip Martin wrote:

> Neels J Hofmeyr <neels_at_elego.de> writes:
>
>> Found this but haven't got the time to dive into right now.
>> An unversioned file should never be killed, right?
>> Should I create an issue?
>>
>> [[[
>> svn mkdir -mm ^/x
>> echo important data > x
>> svn st
>> svn up
>> svn st
>> svn revert x
>> svn st
>> # empty status
>> ls -l
>> # x is now a dir, and "important data" is gone.
>> ]]]
>
> You are explicitly reverting x, are you saying revert should fail?  My
> first instinct is that revert is doing the right thing.

Agreed.  "revert" means "revert to the base state", so that's as expected.  Did you (or the user) mean to run "svn resolve --accept=mine" instead?

>  What about this:
>
> svn rm x        # delete a versioned dir
> echo data > x    # add an unversioned file
> svn revert x    # directory restored
>
> Do you think revert should fail here as well?

FWIW I think revert should succeed -- replacing the unversioned file with a versioned dir -- there.

- Julian
Received on 2012-02-29 15:46:40 CET

This is an archived mail posted to the Subversion Dev mailing list.