RFC: difference in dirstate iter_changes and inventory iter_changes

Robert Collins robertc at robertcollins.net
Sat Aug 9 23:36:42 BST 2008


On Fri, 2008-08-08 at 08:00 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > There is a slight difference between the two iter_changes
> > implementations.
> > 
> > Specifically, the inventory based one includes missing files, whereas
> > the dirstate one is skipping them. We have a test about this, but I
> > think its wrong :)
> > 
> > tree.add('foo')
> > os.unlink('foo')
> > len(tree.iter_changes(tree.basis_tree()))
> > -> 1 for inventory based iter_changes
> > -> 0 for dirstate
> > 
> > any objection to my making these consistently 1 ? 
> > 
> > -Rob
> > 
> 
> I think it would be good to be consistent.
> 
> I think part of the problem with Inventory based iter_changes is that it
> does not accurately represent what is on disk, which is bad.

I think you're confused :)

iter_changes will return a kind that is accurate with whats on disk for
the inventory based version; it returns None for the kind of a missing
file.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080810/dc78de3a/attachment-0001.pgp 


More information about the bazaar mailing list