[attn aaron] differences between RevisionTree and WorkingTree

Robert Collins robertc at robertcollins.net
Mon Jul 24 05:48:03 BST 2006


On Fri, 2006-07-21 at 01:23 -0400, Aaron Bentley wrote:
> Robert Collins wrote:
> > On Thu, 2006-07-20 at 10:38 -0400, Aaron Bentley wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Robert Collins wrote:
> >>> Looks to me like the cleanest way to fix this is for
> >>> inventory.iter_entries() to yield self.root as well as the other
> >>> elements.
> >>>
> >>> That sound ok to everyone ?
> >> I think you'll wind up duplicating a lot of the effort in nested-trees.
> > 
> > If you can guide me such that I do not do it differently, that would be
> > great. However, to write the tests for the new code paths I'm bringing
> > in, I need RevisionTree and WorkingTree to be more homogenous than they
> > are at the moment :(.
> 
> I overreacted a bit.
> 
> I think what can happen if you alter iter_entries is that compare_trees
> will start behaving differently, because it will include the root entry
> in its iteration.
> 
> However, the root entry will only show up in the list of unmodified
> files, so that's fairly easy to paper over.  It's not as nasty as it was
> when the root id was showing up as a new entry in some places.

So heres a patch that does this: changes iter_entries to yield the root.

I hope this will be uncontentious - its a small change, it hasn't broken
any plugins AFAICT. 

The tree implementation tests I have planned at this point are primarily
for ensuring test trees are available, but there are a number of tests
we can move into there should someone be interested.

Cheers,
Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree-implementation-tests.patch
Type: text/x-patch
Size: 129734 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060724/c1575f2f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060724/c1575f2f/attachment.pgp 


More information about the bazaar mailing list