shared storage and branch api

Aaron Bentley aaron.bentley at utoronto.ca
Thu Sep 8 15:12:03 BST 2005


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

Lalo Martins wrote:
> Paste from IRC:
> 
> (16:54:55) bob2: so, before I make an ass of myself on the list:
> (16:55:01) bob2: > It's not delegation.  Responsibility for storage is
>     at the branch level.
> (16:58:13) bob2: but any sort of shared-storage stuff decouples it,
>     right?

Not really.  The branch can implement the storage however it likes, but
it is responsible for making sure that it meets the minimum requirements.

Lifeless has pointed out that the dual purposes of Branch
(line-of-descent tracking and storage management) lead to confusion
about the semantics of the storage access functionality.

To address this, I would suggest
1. stop exposing the revision, inventory and text stores as part of the
Branch interface.
2. create a member for Branch called "storage", that implements the
storage API.

class Storage:
    def __init__(self, branch_transport, branch_root):
    def lock_write(self): # probably invoked by Branch.lock_write

# Not currently needed, storage is create-only
    def lock_read(self):
    def get_revision_xml_file(self, revision_id):
    def get_revision(self, revision_id):
    def get_revision_sha1(self, revision_id):
    def get_inventory(self, inventory_id):
    def get_inventory_xml(self, inventory_id):
    def get_inventory_sha1(self, inventory_id):
    def get_revision_inventory(self, revision_id):
    def install_revisions(self, other, revision_id, pb):
    def create_new_revision(self, revision, inventory, texts):
    def revision_tree(self, revision_id)

I think this is pretty much what people already have in mind.

Anyhow, that's what I'm talkin' bout.  Is that any clearer?

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

iD8DBQFDIEaz0F+nu1YWqI0RAjUmAJ4mEWBU/SgPb2SYGt/kbUXK/qCABACfWOA6
5R3r7n58cQ+UfaL7jqMyBSQ=
=vVKF
-----END PGP SIGNATURE-----




More information about the bazaar mailing list