[RFC] Should we rewrite nested-trees or our formats or punt?

John Arbash Meinel john at arbash-meinel.com
Fri Mar 27 03:37:39 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


...

>>>> John has proposed instead that WT.iter_changes would always emit tree
>>>> references, so that we could run commit in the subtrees.  This means
>>>> that iter_changes is emitting things that it has no reason to believe
>>>> have changed, and I think it further confuses that API.
>>> I agree; its very special case and would require all code using
>>> iter_changes to know explicitly about nested trees. At best thats
>>> disruptive to our code today.
>> Actually, I propose more that "iter_changes()" can return entries that
>> with a "maybe" status. So for files that miss the hash cache, and for
>> tree-references (since we haven't recursed into them).
> 
> From that perspective, I find myself liking your proposal more.
> 
> So its not 'tree references are always returned', its 'tree references
> in a working tree a stat-cache misses always'.
> 
> Rob

You have certainly said it more succinctly. Yes, that is what I meant.
It means that 'commit' would always know about tree-references that it
might want to investigate. Except if you used a partial commit, but
again is just as good. (otherwise you need to iter_references() and try
a partial commit there, only to find there are no selected changes.)

Though partial commit across trees is a little bit trickier, as now you
have multiple paths specified by the user, which may be in different
trees. But if you pass 'specific_files =[...]' you should be able to
tell that this path must be underneath the tree-reference you found, and
then you can pass the appropriate subset of paths (along with removing
the path-to-tree-reference, but knowing they need to be added back for
display).

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknMSgMACgkQJdeBCYSNAAPf4wCgzaMaH1qV/6wTis7ut/Eqt8iL
Fj0AoLS9da2kl0vzCobBGH6fftCEFfvh
=jZ1a
-----END PGP SIGNATURE-----



More information about the bazaar mailing list