On Thu, Apr 12, 2012 at 12:06 PM, Julian Foad
<julianf...@btopenworld.com> wrote:
> Philip Martin wrote:
>
>> I think alter_directory needs a list of children as well as the new
>> properties.
>
> I agree.  I already felt that was needed for API symmetry (or else the 
> add_directory() should *not* take the list of children).  Now your use case 
> below adds a practical reason.

Fixed in r1334244.

>...
>> An alternative might be marking A incomplete, like a v1 drive.  I don't
>> like that, I would prefer it if v2 could reserve incomplete for nodes
>> that are just names and have no content.

Right. That was always the design plan.

> An important point here is that, by knowing the list of children, the 
> semantics of the WC "incomplete" status can be greatly simplified.  We will 
> only ever need to make new children "incomplete", never the directory 
> itself.  Now the "incomplete" status will only need to mean, "We know there 
> is a node with this name; we know nothing else about it".  It will no longer 
> ever need to mean "This directory has some children which are completely (or 
> partially?) fleshed out, and/or perhaps some that we don't know anything 
> about yet".

Sure. That's why the wc_db interface and why the Ev2 add_directory API
requires the set of children up front. I just missed doing the same
for alter_directory. We're good now!

As a concrete example/improvement: during a checkout/update, a new
directory is "done" immediately. If the update stops, and is
restarted: you don't have to ask about the directory and its set of
children. *Just* the subset of children which are still incomplete.

Cheers,
-g

Reply via email to