Useful script: create a sibling branch to a lightweight checkout

Colin D Bennett colin at gibibit.com
Wed Dec 10 23:38:14 GMT 2008


This is a script that I created and find useful for my usual workflow
of working with lightweight checkouts from local shared repository.  It
makes it easy to create a branch as a sibling to the branch bound to
this checkout.

I tend to use a treeless shared repository on my local disk so that I
can have many branches cheaply stored, and then use lightweight
checkouts (also on the local disk) where I do my work.  Then I can 'bzr
switch' between branches easily, or even check out many at once to do
parallel work.  Then I can 'bzr zap' the lightweight checkouts when I'm
done.  (Caution:  Make sure you don't 'bzr zap' a lightweight checkout
that you have shelved changes in!  You will lose them, so don't find
out the way I did.)

Info
----

Bazaar VCS lightweight checkout quick branch script
By Colin D Bennett <colin at gibibit.com>

Usage: /home/cdb/bin/bzr-lightweight-branch SOURCE_TREE DEST_BRANCH_NAME

  This will create a sibling to the branch that backs SOURCE_TREE
  within the repository, and it will be named DEST_BRANCH_NAME.

Bash script is attached.

Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-lightweight-branch
Type: application/octet-stream
Size: 1536 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081210/7081d969/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081210/7081d969/attachment.pgp 


More information about the bazaar mailing list