getting started, advice and help
Neil Martinsen-Burrell
nmb at wartburg.edu
Thu Feb 26 06:14:51 GMT 2009
<mikekay <at> channelk.ca> writes:
Greetings. I have Bazzar installed and working, for the most part. I am
> looking for some advice on how to best to set this up for our particular
> use.
>
> I have two developers at remote locations. I have two on-site - all
> working on different aspects of the code - this is a web application. What
> I would like to accomplish is to keep a centrailzed store of all the code,
> plus have the remote and local users keep their own code local, and update
> the central store when its tested and working. This allows me to not only
> version control but to back up all the code on the central server.
>
> I belive then that each developer works on their own branch and the
> branches are merged into one repository? Do I have this right?
>
> Any sugggestions on how best to manage this little project would be most
> appreciated.
If the two local and two remote developers don't collaborate specifically with
one another without communicating back to the central server, then I would do
the following:
Set up a central branch somewhere:
bzr init bzr+ssh://server.example.com/var/branches/trunk
# import code into branch
# from a directory with code in it
export TRUNK=bzr+ssh://server.example.com/var/branches/trunk
bzr checkout $TRUNK
bzr add
bzr ci -m 'initial import'
For each developer, have them maintain a _checkout_ of the trunk locally:
bzr checkout $TRUNK
Then, each developer can branch that checkout:
bzr branch trunk feature1
then do their work in the feature1 branch, including testing:
cd feature1
# hack, hack, hack
bzr ci -m 'in progress'
# test, hack, test, hack
bzr ci -m 'finished'
then merge their feature1 work back to their trunk checkout:
cd ../trunk
# stay up to date
bzr update
bzr merge ../feature1
# test the merge now
# if updates break the merge, do:
# cd ../feature1
# bzr merge #uses default merge location
# test, hack, test, hack
# bzr ci -m 'updated for trunk'; cd ../trunk; bzr merge ../feature1
# test the merge again
bzr ci -m 'now we have feature1'
which will then update the central server with the tested feature1 code (since
the local trunk is a checkout, it updates the central branch automatically).
Maintaining a pristine copy of the trunk as a checkout that one only commits
fully tested merges of other branches is important in this workflow.
-Neil
More information about the bazaar
mailing list