Commit Hook Implementation

Matthieu Moy Matthieu.Moy at imag.fr
Tue Oct 3 10:09:12 BST 2006


"Erik Bågfors" <zindar at gmail.com> writes:

> For this, you have checkouts/bind.  Basically, do this
> I have branch foo, and I want a public mirror of it
> cd foo
> bzr push sftp://host/~/public_html/foo
> bzr bind sftp://host/~/public_html/foo

That said, it could be interesting also to have an asynchronous "push"
after a commit:

Commit over bound branch does a commit in both locations in a
transactional manner, so you're sure that if the commit is done
locally, it aslo succeeded remotely. But that's slow over slow
network.

Another approach is to do something like

$ bzr commit && echo "bzr push" | batch

(I had a commit hook doing this with baz).

you lose the atomicity of local+remote commit, but the commit is
purely local, and the mirror will be updated shortly, while you're
working on something else.

-- 
Matthieu




More information about the bazaar mailing list