understanding shared repo and push
Wouter van Heyst
larstiq at larstiq.dyndns.org
Tue Aug 1 14:51:16 BST 2006
On Tue, Aug 01, 2006 at 09:27:13AM -0400, Davis, Jacob wrote:
> Hello,
>
> After reading http://bazaar-vcs.org/SharedRepositoryTutorial I was
> inspired to place configuration files for several machines under bzr
> control. What I want to accomplish is to have a central server with a
> shared repository that contains a directory for each client machine. The
> idea is to allow an admin to modify configuration files on the central
> servers shared repository and "push" changes to the individual
> repositories on the client machines. I have tried the following...
>
> - on client -
> $ cd /etc
> $ bzr init
> $ bzr add some_file.conf
> $ bzr commit -m "added file"
>
> - on central server -
> $ bzr init-repo --trees /bzr
> $ cd /bzr
> $ mkdir client; cd client
> $ bzr branch sftp://client/etc
> $ vi /bzr/client/etc/some_file.conf
> $ bzr commit -m "edited file"
>
> This all works great until I try to push the changes to the client...
>
> $ bzr push sftp://client/etc
> bzr: WARNING: This transport does not update the working tree of
> sftp://client/etc/
>
> The wording of the error makes me think that if I were to use something
> other then sftp, then the commend would work. Is that so?
> Is this behavior intentional or is there someway I can get it to work
> the way I want other then simply copying the file to the client?
Most transports don't allow pushing the workingtree, but you could do it
in the other direction, and issue pull from the client machines. I
believe Wouter Bolsterlee manages his website deployments that way,
using the update-mirrors plugin on one machine to update a couple of
branches. For your situation, you could set up a script on the central
machine to ssh into all the client machines, and pull the right branch.
This does require bzr on the client though.
Wouter van Heyst
More information about the bazaar
mailing list