bzr-colo: wow
Neil Martinsen-Burrell
nmb at wartburg.edu
Mon Sep 27 14:46:26 BST 2010
On 2010-09-27 08:01 , Russ Brown wrote:
> On Fri, Sep 24, 2010 at 7:38 PM, Martin Pool<mbp at canonical.com> wrote:
>> I've just started using bzr-colo
>> <http://doc.bazaar.canonical.com/plugins/en/colo-plugin.html> for all
>> my work, and I have to say it's really very slick. If you haven't
>> tried it I recommend you do.
>>
>
> Does is handle co-located bound branches (or checkouts) better yet[1]?
> If it does, it may become my default workflow...
>
> Or maybe I should just not be so lazy and try it again myself. :)
>
> [1] http://old.nabble.com/-ANN--bzr-colo-0.0.1:-colocated-branches-using-present-technology-to27105538.html#a27118859
In fact, since bzr-colo is just convenient sugar on top of existing
Bazaar facilities, this can be made to work. Some of this exploits the
(very deep?) differences between lightweight checkouts and bound branches.
nmb at guttle[~/tmp]$ rm -r test*
nmb at guttle[~/tmp]$ bzr colo-init test
nmb at guttle[~/tmp]$ bzr init test_server
Created a standalone tree (format: 2a)
nmb at guttle[~/tmp]$ cd test
nmb at guttle[~/tmp/test]$ bzr bind ../test_server
# This binds the branch at .bzr/branches/trunk to the branch in
# ~/tmp/test_server
nmb at guttle[~/tmp/test]$ echo "content" > file1
nmb at guttle[~/tmp/test]$ bzr add
adding file1
nmb at guttle[~/tmp/test]$ bzr ci -m 'added content in the colocated workspace'
Committing to: /Users/nmb/tmp/test_server/
added file1
Committed revision 1.
nmb at guttle[~/tmp/test]$ bzr unbind
# to show that the history is local
nmb at guttle[~/tmp/test]$ bzr log
------------------------------------------------------------
revno: 1
committer: Neil Martinsen-Burrell <nmb at wartburg.edu>
branch nick: test_server
timestamp: Mon 2010-09-27 08:32:15 -0500
message:
added content in the colocated workspace
nmb at guttle[~/tmp/test]$ bzr log ../test_server
------------------------------------------------------------
revno: 1
committer: Neil Martinsen-Burrell <nmb at wartburg.edu>
branch nick: test_server
timestamp: Mon 2010-09-27 08:32:15 -0500
message:
added content in the colocated workspace
The main issue is that in the colocated workspace, you need to make sure
that the underlying branches (which live in .bzr/branches) are bound to
their appropriate server counterparts. The use of ``bzr branch --bind``
along with the colo: specifier should make this easy in the initial stages.
nmb at guttle[~/tmp/test]$ bzr init ../test_server_2
Created a standalone tree (format: 2a)
nmb at guttle[~/tmp/test]$ bzr branch --bind ../test_server_2 colo:server2
Branched 0 revision(s).
New branch bound to ../test_server_2
nmb at guttle[~/tmp/test]$ bzr colo-branches
server2
* trunk
Please file enhancement requests against bzr-colo on launchpad with
suggestions for making this workflow easier. Note that there is already
an existing request for pulling a single colocated workspace from an
entire shared repository on the server. This would be a natural place
to then add a "--bind" option to create a workspace where all of the
local branches are bound to their remote counterparts.
-Neil
More information about the bazaar
mailing list