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

[RFC] Children of a replaced node - schedule delete vs. deleted-by-the-replace

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 10 Mar 2011 18:43:13 +0000

If I ask a WC API for "the children" of a working directory, I would
expect to get just the children that belong to it, not including any
paths that were children of an underlying directory that has been
locally replaced.

The attached patch starts this by creating a test and defining a new
version of one of the APIs. (Only the API description is different, the
signature is the same.)

Sanity checks appreciated, especially of the test. I'll describe the
test.

I start with a repo and clean WC at revision 1 containing just the
following directories (no files):

  A
  A/F
  A/G
  A/H
  X
  X/G
  X/H
  X/I

and then (in Subversion) I replace A with a copy of X:

  rm A
  cp X A

and then delete the child 'H' and add a new child 'J':

  rm A/G
  mkdir A/J

I expect to the "working view" of A to consist of

  A - copied, replacing an old 'A'
  A/G - scheduled for delete (was a copied child of 'A')
  A/H - copied (as a child of 'A')
  A/I - copied (as a child of 'A')
  A/J - scheduled for add

Note that I don't expect to hear anything about the path 'A/F'.
Currently, 'F' is included in the results returned by
svn_wc__db_read_children() and svn_wc__db_read_children_info().

On the right track?

- Julian

p.s. The last part of the test - calling svn_wc__node_get_children() -
isn't working right yet. It returns abspaths where the test expects
relpaths.

w|loc|o|p|r|rep|r|presence|||kind||depth ||| | | |

1|A |0| |1|A |1|normal |||dir ||infinity|||1|1299779887071167|||||
1|A/F|0|A|1|A/F|1|normal |||dir ||infinity|||1|1299779887071167|||||
1|A/G|0|A|1|A/G|1|normal |||dir ||infinity|||1|1299779887071167|||||
1|A/H|0|A|1|A/H|1|normal |||dir ||infinity|||1|1299779887071167|||||

1|A |1| |1|X |1|normal |||dir ||infinity|||1|1299779887071167|||||
1|A/F|1|A|-|- |-|base-del|||dir ||infinity|||1|1299779887071167|||||
1|A/G|1|A|1|X/G|1|normal |||dir ||infinity|||1|1299779887071167|||||
1|A/H|1|A|1|X/H|1|normal |||dir ||infinity|||1|1299779887071167|||||
1|A/I|1|A|1|X/I|1|normal |||dir ||infinity|||1|1299779887071167|||||

1|A/H|2|A|-|- |-|base-del|||dir ||infinity|||1|1299779887071167|||||
1|A/J|2|A|-|- |-|normal |||dir ||infinity|||-|0|||||

Received on 2011-03-10 19:43:50 CET

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