understanding shared repo and push
Davis, Jacob
Jacob_Davis at sra.com
Tue Aug 1 16:01:17 BST 2006
> -----Original Message-----
> From: bazaar-ng-bounces at lists.canonical.com
> [mailto:bazaar-ng-bounces at lists.canonical.com] On Behalf Of
> Wouter van Heyst
> Sent: Tuesday, August 01, 2006 9:51 AM
> To: bazaar-ng at lists.canonical.com
> Subject: Re: understanding shared repo and push
>
> 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
Thanks for the clarification and the suggestions Wouter.
Another thought I had was to use checkouts instead of normal branches.
Although I suppose that would still require one to ssh to the client and
initiate an update before changes would show up in the client working
directory.
-Jake
More information about the bazaar
mailing list