integration with core colocation support

Bug #830799 reported by Jelmer Vernooij
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-colo
Confirmed
Medium
Unassigned

Bug Description

It would be nice if the support in bzr core for colocated branches could be used for colo.

At the moment this means being able to use ",branch=foo" in branches and e.g. being able to list colocated branches using "bzr branches".

Adding support for colocated branches in bzr-colo will probably involve registering a custom implementation of BzrDirMeta1 that backs onto the bzr-colo implementation,

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

I'd love to do this, but I'm going to need some help with the nitty-gritty. It looks like all of the methods of BzrDirMeta1 that take a "name" parameter need to be over-ridden: create_branch, destroy_branch, find_branch_format, get_branch_reference, get_branch_transport, open_branch. Is that on the right track?

Changed in bzr-colo:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Yep.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I've done some more investigation into this. bzr-colo duplicates the .bzr directory for each of the branches, and moves the repository which makes it harder to support in a BzrMeta1 implementation.

I think the best way to make it possible for bzr-colo users to work with the bzrlib colocated branch implementation while getting the benefit of the subcommands from bzr-colo is:

 * Provide a "bzr colo-upgrade" command or something similar, which changes a colo workspace back to a regular bzrdir with colocated branches. Perhaps bzr-colo could do this upgrade automatically when a branch gets accessed.
 * Add a ColocatedWorkspace implementation which wraps around BzrDirMeta1 implementation and which gets used for branches that use the bzrlib format.

Does that sound like a reasonable approach?

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

I have started on a ColocatedWorkspace for BzrDirMeta1, so I can easily do that wrapper.

For the first thing though, I can't figure out how to create a bzrdir which supports colocated branches. Which format is it that I need to create for the new root bzrdir? Do we have a way of upgrading bzrdirs in place or will I need to move the existing one and create a new one and then branch into it?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

You'll need this branch, which will hopefully land in bzr.dev soon:

https://code.launchpad.net/~jelmer/bzr/metadir-goes-colo

With that branch the standard BzrDirMeta1 supports colocated branches:

bzrdir.create_branch(name="name-of-colocated-branch")
bzrdir.list_branches()
bzrdir.destroy_branch(name="name-of-colocated-branch")
bzrdir.open_branch(name="name-of-colocated-branch")

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.