[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: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 01 Mar 2012 08:48:42 +0000

Julian Foad <julianfoad_at_btopenworld.com> writes:

> 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.

Another example:

svn rm x # delete a versioned file
svn mkdir x # add a versioned dir
echo data > x/f # unversioned data
svn revert -R x # versioned file restored, unversioned data removed

Again, I think revert is doing the right thing.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-03-01 09:49:18 CET

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