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

Re: Partially recursive revert when node kind changes

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 10 Feb 2011 18:40:55 +0000

"C. Michael Pilato" <cmpilato_at_collab.net> writes:

> On 02/10/2011 11:28 AM, Philip Martin wrote:
>> Suppose I have a directory tree:
>>
>> foo/
>> bar/
>> zig
>>
>> and I delete the tree foo/bar and replace it by a file foo/bar. What
>> should "svn revert --depth=files foo" do? Should it revert foo/bar?
>> How much of foo/bar should it restore?
>
> It should restore foo/bar as a directory with all of its children still
> scheduled for deletion, right?

Perhaps, but if I deleted the tree foo/bar and didn't replace it with a
file then the revert would skip foo/bar and leave it deleted. I would
need to do "svn revert --depth=immediates" to revert foo/bar and leave
the children deleted.

Before revert:

      path op_depth
                     0 1 2
      / normal
      foo normal
      foo/bar normal - normal
      foo/bar/zig normal - deleted

Revert the added file to leave the deleted directory:

      path op_depth
                     0 1 2
      / normal
      foo normal
      foo/bar normal - deleted
      foo/bar/zig normal - deleted

Non-recursive revert on the directory:

      path op_depth
                     0 1 2 3
      / normal
      foo normal
      foo/bar normal
      foo/bar/zig normal - - deleted

So a replacement WORKING file changes depth=files into depth=immediates
for those nodes?

-- 
Philip
Received on 2011-02-10 19:41:40 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.