On Thu, Apr 26, 2001 at 05:19:30PM -0500, Ben Collins-Sussman wrote:
> Sam TH <sam@uchicago.edu> writes:
>
> > The nameless root node is definitely neccessary, for the reasons you
> > described. The problem is with the next node. Maybe this will
> > explain it better.
> >
> > You're generating trees that look like this:
> >
> > ROOT
> > |
> > +-- wc-t1
> > |
> > |-- iota
> > +-- A
> >
> > etc.
> >
> > The problem is with the wc-t1 node, which we don't want, since it
> > isn't a property of the working copy, and will be different with a
> > different working copy that we might want to compare with. What we
> > want is a tree like this:
>
> Ahhhh, nope. wc-t1 (in the example above) may contain dir-props that
> need to be examined. Should we be storing dir-props in the nameless
> root node instead?
Ok, the name of 'wc-t1' isn't a property of the working copy, and
keeping it there will cause a test to fail that just checks out two
working copies and compares them. I think that the dir-props should
go with ROOT instead, since the point of ROOT when I originally wrote
it was to represent wc-t1.
>
>
> >
> > ROOT
> > |
> > |-- iota
> > +-- A
> >
> > etc.
> >
> > The latter is the kind generated by build_generic_tree(). The former
> > is generated by wc_to_tree(). The way I got wc_to_tree to generate
> > the latter kind of tree was with the hack I mentioned above.
>
> Heh, of course I did the opposite. I made the systems match by
> calling wc_to_tree(wc-t1), and then comparing against a homemade tree
> constructed out of paths that *all* began with 'wc-t1'.
>
> Hm. I'm not sure what to think. What's the elegant answer here?
I think the elegant answer is to have wc_to_tree(wc-t1) be the correct
call (modulo a change to build_tree_from_wc) and have that generate
the latter tree I mentioned, with the dir-props being attached to the
ROOT node. That way the trees can compare properly, and can compare
with (say) a tree from entries files, which won't know the name
'wc-t1', but will know the dir-props, presumably.
How does that sound?
sam th --- sam_at_uchicago.edu --- http://www.abisource.com/~sam/
OpenPGP Key: CABD33FC --- http://samth.dyndns.org/key
DeCSS: http://samth.dynds.org/decss
- application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:29 2006