[brisbane-core/MERGE] inventory fix & refactor
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Mar 4 14:57:02 GMT 2009
>>>>> "Ian" == ian clatworthy <ian.clatworthy at internode.on.net> writes:
Ian> The attached patch fixes CHKInventory._get_mutable_inventory()
Ian> and refactors CHKInventory_create_by_apply_delta() so that
Ian> an apply_delta() method can be added real soon now.
BB:comment
revno 3838 was about avoiding using a CHKInventory when a mutable
inventory was needed.
Are you trying to make CHKInventory mutable ?
Ian> Altogether, there are currently 15 public methods on Inventory
Ian> that CHKInventory doesn't support. Adding apply_delta() will
Ian> reduce that number by one and make it easy to add others
Ian> that I need (e.g. add, __del__, rename) for fastimport to work
Ian> on formats using CHKInventories.
All of them requiring a mutable inventory I presume ?
Ian> Yes, I know that fastimport will need tweaking to be
Ian> efficent on new formats but I want it working first.
I'm not sure trying to make CHKInventory mutable is the way to
go[1], if you need a mutable inventory, just use Inventory,
CHKInventory._get_mutable_inventory was added for cases like
that.
Vincent
[1] Your patch already makes 28 tests error out (after an
obvious rename of delta into inventory_delta in and one fail because
you introduced many TABs) because a CHKInventory needs a backing
store to accept modifications (I'm surprised fast-import can even
use that...).
More information about the bazaar
mailing list