Useful script: multi-push script to push a hierarchy of branches

Colin D Bennett colin at gibibit.com
Wed Dec 10 23:45:35 GMT 2008


This script pushes a hierarchy of branches from one location to
another.  It works better for me than the 'bzr multi-pull' command from
bzrtools in many situations, because it will push new branches, while
doing a multi-pull from the other end will only pull branches that
already exist on that end.

I use this to mirror my treeless shared repositories that I work from
between machines.  Because it uses the 'bzr push' command it will
create new branches in the destination when they don't already exist.

Caveats
-------

- Unlike 'bzr multi-pull', this is just a shell script, so
  multiple authentication prompts will occur if SOURCE_ROOT or DEST_ROOT
  refers to a remote location that requires interactive authentication.
  Maybe sometime I'll look at multi-pull and see if I can re-implement
  this multi-push script properly as a bzr plugin command.

Info
----

Bazaar VCS multi-push script.
By Colin D Bennett <colin at gibibit.com>

Usage: /home/cdb/bin/bzr-multi-push SOURCE_ROOT DEST_ROOT

  This will push all branches under SOURCE_ROOT into
  corresponding locations under DEST_ROOT.

Bash script is attached.

Hope this is useful to someone.
Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-multi-push
Type: application/octet-stream
Size: 985 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081210/023e3fdb/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/023e3fdb/attachment.pgp 


More information about the bazaar mailing list