non-recursive status of a directory?
Mark Hammond
mhammond at skippinet.com.au
Thu Jun 5 00:16:21 BST 2008
Hi John,
Thanks for the reply - for some reason it got stuck at my ISP and didn't arrive until a few minutes ago.
> So, what you actually want is '--partial-recurse' or '--max-depth=1'.
> Because you want to give a directory, and get the values for all
> children, but not for their children.
Actually, that isn't what TSVN does and not what I'm after. IIUC, TSVN does *not* look at the children of a directory - it only looks at the directory object itself. Eg, has it been added? In the case of TSVN they also check if properties for the directory have changed (again, not looking at children), and although that doesn't directly apply here (yet?), the concept seem reasonable.
> If you knew all the entries,
I don't :( All I know if the name of a directory on the file-system I need info for.
> you could do:
>
> tree.iter_changes(specific_files=[names, for, all the files, in the
> directory], r)
>
> That doesn't help you much for missing files, and any directories you
> supply will be recursively searched.
Yeah, I came to the same conclusion - it leaves me in the position that to get any status for a directory the entire tree below that directory needs to be processed.
> It isn't particularly hard to do what you want, we just haven't had a
> specific use case for it, and thus haven't implemented it.
Just to make sure I understand: Is my requirement the same thing required to implement the "no recurse" option for the status command? Given it is commented as a "todo" for that command, I'd say that is another use case :)
> WT4.iter_changes() in
> particular is rather crufty in deference to performance. I've certainly
> considered rewriting it to be more 'obvious', and just create a pyrex/C
> extension as the optimized form.
That's interesting - thanks. Any ideas on how I should move forward? It is not blocking me (I just ask for the entire sub-tree) but I fear it will never perform acceptably well if I stick to doing that.
Thanks,
Mark
More information about the bazaar
mailing list