Jelmer Vernooij wrote:
> On Wed, 21 Mar 2007 15:57:06 -0000
> Aaron Bentley <email address hidden> wrote:
>> WorkingTree._write_inventory was "privatized" after it was already in
>> use by TreeTransform and smart_add, and no substitute has been made
>> available.
>>
>> I think the bug is that _write_inventory is private.
> Implementing _write_inventory will be a major pain for bzr-svn, but I
> can see why it's being used in smart_add() and TreeTransform. Something
> like it would be required for merge and revert in working copies
> in bzr-svn anyway.
>
> summary "WorkingTree._write_inventory() should be public"
Robert and I have just discussed a possible interface to substitute for
_write_inventory.
It would be called WorkingTree.apply_inventory_delta(). Its argument
would be a list of tuples of (old_path, new_path, new_entry). The new
entry would be a new InventoryEntry of the correct type, which whatever
updated fields were necessary. The delta would be applied as a single
operation, not as a sequence. So it would be legal to supply:
Even though applying the operations sequentially would result in entry_1
being renamed on top of entry_2, this would not happen because the delta
is considered to be applied atomically.
For WorkingTree2/3, this would just use write_inventory internally. For
WorkingTree4, I think Robert will write something.
Does this proposed interface make sense for you? Would it be reasonably
easy to implement on SVN?
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jelmer Vernooij wrote: _write_ inventory was "privatized" after it was already in _write_ inventory( ) should be public"
> On Wed, 21 Mar 2007 15:57:06 -0000
> Aaron Bentley <email address hidden> wrote:
>> WorkingTree.
>> use by TreeTransform and smart_add, and no substitute has been made
>> available.
>>
>> I think the bug is that _write_inventory is private.
> Implementing _write_inventory will be a major pain for bzr-svn, but I
> can see why it's being used in smart_add() and TreeTransform. Something
> like it would be required for merge and revert in working copies
> in bzr-svn anyway.
>
> summary "WorkingTree.
Robert and I have just discussed a possible interface to substitute for
_write_inventory.
It would be called WorkingTree. apply_inventory _delta( ). Its argument
would be a list of tuples of (old_path, new_path, new_entry). The new
entry would be a new InventoryEntry of the correct type, which whatever
updated fields were necessary. The delta would be applied as a single
operation, not as a sequence. So it would be legal to supply:
[('path_a', 'path_b', entry_1), ('path_b', 'path_a', entry_2)]
Even though applying the operations sequentially would result in entry_1
being renamed on top of entry_2, this would not happen because the delta
is considered to be applied atomically.
For WorkingTree2/3, this would just use write_inventory internally. For
WorkingTree4, I think Robert will write something.
Does this proposed interface make sense for you? Would it be reasonably
easy to implement on SVN?
Aaron enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFGAv1S0F+ nu1YWqI0RAga8AJ 9X5eOzEMX1W0Zux cnuObfB90CcHwCf dahQ sAFziAt4=
hPLekf63uAClN4M
=fNym
-----END PGP SIGNATURE-----