[MERGE] Delegate basis inventory calculation during commit to the CommitBuilder object.
John Arbash Meinel
john at arbash-meinel.com
Fri Dec 5 17:26:52 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This is a follow up on Robert's patch, which I believe addresses
Martin's concerns.
1) Rename the Repository function to "add_inventory_by_delta()". I
believe we all agree it is a better name.
2) Change the function to "CommitBuilder.will_record_deletes()". We need
to have some way for the code that *uses* CommitBuilder to inform CB
that it promises to call record_delete() so that the inventory delta
being computed will be valid.
We could pass it as a constructor, but that actually requires passing it
through Repository.get_commit_builder() which is a more invasive API break.
I chose "will_record_deletes()" to help push harder on the fact that it
is the clients responsibility to call record_delete() and not a signal
to the CommitBuilder that *it* should record deletes.
3) Changed away from using the list directly (cb.basis_delta) to having
a function cb.get_basis_delta() which refuses to work if the client has
not already informed the CB that it promised to call record_delete().
I'm pushing to see this merged, because I want to bring in some more of
the chk code into bzr core (partially because I have some bug fixes for
them, and I think getting it as core code is a better way of getting it
under test).
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkk5ZFwACgkQJdeBCYSNAANUbgCgmZpWJ/r5iF4kgIFUfnL+gkw4
y6EAoKEa1wMsd0hG4mLtTpuZBvm/l2mu
=VtPf
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: add_inventory_by_delta.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20081205/6888727a/attachment-0001.diff
More information about the bazaar
mailing list