[MERGE] move smart_add_tree to MutableTree, tested on WorkingTree..

Aaron Bentley aaron.bentley at utoronto.ca
Wed Jul 4 04:23:42 BST 2007


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

Robert Collins wrote:
> On Tue, 2007-07-03 at 21:56 -0400, Aaron Bentley wrote:
>> The interactions between inventory and dirstate mean that we have to
>> periodically sync them.  When we do that, doesn't it potentially hit
>> disk?
> 
> Not at present, and tests would fail if it did. It currently only ever
> writes when the tree is just about to be fully unlocked.
> 
>> My feeling was that ability to change the inventory without writing it
>> to disk, and without intending to ever write it to disk was an
>> unintentional feature, and not something to rely on.
> 
> We used to have add code that simulated adding the files, but it was
> considerably more complicated. I think if we can keeping the current
> constraint of allowing a revert-to-disk facility is better.

I really don't think it's intuitive, and I really don't think it's
valuable.  Pretty much everything assumes that WT.inventory is meant to
be in sync with disk, so calling WT.subsume, WT.extract, WT.move,
WT._update_tree, WT.apply_inventory_delta, and many more are going to
have bad side effects if there are unwanted changes floating in the
inventory.

We're now saying that the whole concept of inventory is bust, and that
we'd like to make it merely an implementation detail of WorkingTree.  If
that's so, I don't think we should be relying on this quirky inventory
behavior.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGixK+0F+nu1YWqI0RArGeAJ9z4AxsQY6balkJ2qLIJIUKDtlv+wCfQe6q
4uXYfVA7yUL/3kaRdQ6kTB8=
=GD1l
-----END PGP SIGNATURE-----



More information about the bazaar mailing list