"Bert Huijben" <b...@qqmail.nl> writes:

>> +-- STMT_UPDATE_COPYFROM_TO_INHERIT_1
>> +UPDATE NODES SET
>> +  repos_id = null,
>> +  repos_path = null,
>> +  revision = null
>> +WHERE wc_id = ?1 AND local_relpath = ?2
>> +  AND op_depth IN (SELECT op_depth FROM nodes
>> +                   WHERE wc_id = ?1 AND local_relpath = ?2
>> +                   ORDER BY op_depth DESC
>> +                   LIMIT 1);
>
> Can you add some marker somewhere that this is just temporary behavior?
> (Probably in wc_db.c)
>
> The final code should (of course) make the op_depth of the NODES
> record match the op_depth of the inherited operation and not just
> update some information on the highest op_depth version of the node
> itself.

The whole op_depth stuff is little more than zero/non-zero at present,
it all needs attention.

> The update behavior op_depth should be explicit instead of just
> taking the highest current op_depth. (Updating the highest existing
> op_depth doesn't verify if the node is deleted/replaced (where you
> can still elide lower layers) or maybe just a base_node (error in
> caller))

There is a comment to that fact where this is used.  The code has just
done a query using the same algorithm to determine that something
needs to change.

-- 
Philip

Reply via email to