Bzr push/pull
Jeff Licquia
jeff at licquia.org
Fri Oct 5 17:11:17 BST 2007
Micron Engineering wrote:
> I am experimenting with Bazaar, I would create a flexible way to work
> both inside and outside the company building but I have some problems to
> realize it.
I'm not exactly the top expert in bzr, but I'll see what I can do to help.
> So I created an experimental public repository (PUBREPO) on our web
> space (accessible using a ftp connection); I have also create a
> repository on our net internal server (NETREPO) not accessible from outside.
> PUBREPO and NETREPO will contain a repository for every project (i.e.
> PUBREPO\TdsProject is the repository for TdsProject containing all its
> branches).
So far, so good.
> Every engineer also will create a private repository using the same
> organization of PUBREPO but limited to the projects where he is working.
> So normally inside engineers will use NETREPO as their public repository.
OK. This sorta mirrors my typical workflow, in that I keep local
branches that mirror upstream, and then branch from that for my local work.
But is there a reason to specify how a local developer organizes his/her
branches on the local workstation?
> 1. Is there a preferred/automatic way to synchronize NETREPO and PUBREPO?
Figure out how to do it manually, and then schedule it via cron (or your
OS's equivalent).
Rsync should work, or you can use bzr to do the job. If you're on
Unix-like systems, using the smart server protocol over ssh can work
quite nicely. If not, maybe "bzr serve" on one end can work.
> 2. I would sync the 2 repo after that last commits to NETREPO are
> approved; is there a predefined way to perform this?
Not really. "Approval" implies "manual". The trick is to separate the
parts that can't be automated from the parts that can.
You could, for example, implement an approval process using a separate
"approved" branch on NETREPO, which only reviewers can merge to. Then
you'd only transfer the "approved" branch to the public repo.
BundleBuggy might be useful to implement the approval workflow here.
> 3. If the above operations have to be done manually, is there a way to
> permit only at project administrators to perform them?
You probably want this whether things can be automated or not, for the
sake of security.
Bzr doesn't really have ready-to-use security policies built into it.
There are tools to help, such as signed changesets. (Although it
doesn't look like more than one person can sign a changeset; too bad.)
Beyond that, one can implement filesystem security and/or transfer
protocol security. An example might be to use ssh keys for rsync and/or
bzr+ssh://.
> 4. I would understand better the purpose of push/pull commands.
Both commands mean, basically, "make this branch and that branch the
same". If I remember correctly, there are some things about the history
that may not get rearranged to be identical, but otherwise branching
from one or the other gives you the same end result.
More information about the bazaar
mailing list