Julian Foad <email@example.com> writes:
> Philip Martin wrote:
>> Julian Foad <firstname.lastname@example.org> writes:
>>>- if (recurse && (entry->kind == svn_node_dir))
>>>+ if (recurse && (entry->kind == svn_node_dir)
>>>+ && ((! entry->deleted && ! entry->absent)
>>>+ || (entry->schedule == svn_wc_schedule_add)
>>>+ || (entry->schedule == svn_wc_schedule_replace)))
>>> svn_wc_adm_access_t *subdir_access;
>>> const char *subdir = svn_path_join (path, key, pool);
>>>I'm rather unsure of the exact meanings and combinations of "absent"
>>>and "deleted" and "schedule", and am worried by other bits of code
>>>using different tests such as the following:
>> 'schedule="delete"' indicates that an existing item will be deleted
>> the next commit, think 'svn rm wc/foo'.
>> 'schedule="add"' indicates that a new item will be added at the next
>> commit, think 'svn add wc/foo'.
>> 'schedule="replace"' indicates both of the above, think 'svn rm
>> followed by 'svn add wc/foo'.
>> 'deleted="true"' indicates that the entry was scheduled for deletion
>> and subsequently committed, but that the parent directory has not been
>> updated and so is at a revision that would otherwise contain the
>> deleted item, think 'svn rm wc/foo' followed by 'svn ci wc'
>> 'absent="true"' indicates that mod_authz_svn doesn't allow read
>> to that item so it's not physically present in the working copy.
> Yes, their individual meanings all sound simple enough at first
> reading, but in combination, how, for instance, do you get a directory
> "deleted" with "schedule=replace"?
"deleted" with "schedule=replace" would be a bug, it should not occur.
>> Your change looks correct to me.
But you are right, I was probably a bit hasty. "absent" is often
treated very much like "deleted" in the existing code, but as far as I
know "absent" can't be deleted or added and so can never be
"schedule=anything". Your code probably has redundant checks.
The code should avoid recursing if "absent" since such items can never
be present on disk. The code should avoid recursing if "deleted"
unless "schedule=add". So I think that makes it:
if (recurse && entry->kind == svn_node_dir
&& ! entry->absent
&& (! entry->deleted || entry->schedule == svn_wc_schedule_add))
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Wed Oct 12 13:54:36 2005