RFC: difference in dirstate iter_changes and inventory iter_changes

John Arbash Meinel john at arbash-meinel.com
Fri Aug 8 14:00:18 BST 2008


-----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.

For example, doing:

rm foo
ln -s bar foo

bzr st

inventory based will give no changes
dirstate will give a kind change


I would be very pleased to have iter_changes have a way to represent
"missing". This is probably a special case of "added and still missing".

John
=:->



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

iEYEARECAAYFAkicQ2IACgkQJdeBCYSNAAM28gCfTO15GzTIbiCWHmKmWmhCNq1T
o6EAoK+tWDhiM2hwVHZHovgRo4gP0zAg
=IvnU
-----END PGP SIGNATURE-----



More information about the bazaar mailing list