On Wed, Feb 23, 2011 at 04:13:21PM +0000, Julian Foad wrote: > We need a handle that we can pass around that references the whole > nesting of WCs (where "WC" is defined as the scope of a single wcroot). > That could be a new thing that we can invent, but I wonder if instead it > would be reasonable to extend the functionality of the existing "wcroot" > object so that it knows about its place within a hierarchy of parent and > child wcroots.
Hmmm... What you are saying above sounds just like the hierarchy of wcroots we are proposing, doesn't it? I'm not planning on inventing a new data type for wcroot, unless that's really needed. It's likely that the existing types and APIs could be used directly, or with small modifications, to support this idea. Note that I would like the relationship to be tracked both ways. I.e. given a wcroot of the parent WC you can discover all its child working copies (i.e. all the externals within it). And given a wcroot of an external it should be easy to find the wcroot for its parent WC. We should design the data structures and APIs in a way that doesn't assume too much about the way the code will want to interpret and manipulate information about externals (to avoid problems such as we have with copyfrom, where it was discovered much later that having a one-way relationship really hurts for some use cases, and it's really hard to fix retroactively).