~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/en/tutorials/centralized_workflow.txt

Merge bzr.dev, update to use new hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
::
82
82
 
83
 
  % bzr init-repo --no-trees sftp://centralhost/srv/bzr/
 
83
  % bzr init-repo --no-trees bzr+ssh://centralhost/srv/bzr/
84
84
 
85
85
You can think of this step as similar to setting up a new cvsroot, or
86
86
subversion repository.  The ``--no-trees`` option tells bzr to not
88
88
since no one will be making changes directly in the branches within
89
89
the central repository.
90
90
 
 
91
Here we're using a ``bzr+ssh`` URL, which means to use Bazaar's own
 
92
protocol on top of the SSH secure shell.  See the Administrator Guide for
 
93
information about setting up a bzr+ssh server.  
 
94
 
91
95
 
92
96
Migrating an existing project to Bazaar
93
97
=======================================
116
120
 
117
121
::
118
122
 
119
 
  % bzr init sftp://centralhost/srv/bzr/sigil
 
123
  % bzr init bzr+ssh://centralhost/srv/bzr/sigil
120
124
 
121
125
This can be thought of as the "HEAD" branch in CVS terms, or as the "trunk"
122
126
in Subversion terms. We will call this the ``dev`` branch.
133
137
  % cd work
134
138
  % mkdir sigil
135
139
  % cd sigil
136
 
  % bzr checkout sftp://centralhost/srv/bzr/sigil dev
 
140
  % bzr checkout bzr+ssh://centralhost/srv/bzr/sigil dev
137
141
  % cd dev
138
142
  % cp -ar ~/sigil/* .
139
143
  % bzr add
162
166
To get a copy of the current development tree::
163
167
 
164
168
  % cd ~/work/sigil
165
 
  % bzr checkout sftp://centralhost/srv/bzr/sigil dev
 
169
  % bzr checkout bzr+ssh://centralhost/srv/bzr/sigil dev
166
170
 
167
171
Now that two people both have a checkout of
168
 
``sftp://centralhost/srv/bzr/sigil``, there will be times when one of
 
172
``bzr+ssh://centralhost/srv/bzr/sigil``, there will be times when one of
169
173
the checkouts will be out of date with the current version.
170
174
At commit time, Bazaar_ will inform the user of this and prevent them from
171
175
committing. To get up to date, use ``bzr update`` to update the
201
205
::
202
206
 
203
207
  % cd ~/work/sigil
204
 
  % bzr branch sftp://centralhost/srv/bzr/sigil \
205
 
               sftp://centralhost/srv/bzr/sigil/doodle-fixes
206
 
  % bzr checkout sftp://centralhost/srv/bzr/sigil/doodle-fixes doodle-fixes
 
208
  % bzr branch bzr+ssh://centralhost/srv/bzr/sigil \
 
209
               bzr+ssh://centralhost/srv/bzr/sigil/doodle-fixes
 
210
  % bzr checkout bzr+ssh://centralhost/srv/bzr/sigil/doodle-fixes doodle-fixes
207
211
  % cd doodle-fixes
208
212
 
209
213
We now have a place to make any fixes we need to ``doodle``. And we would
272
276
developer their own branch, and their own place to work in the central
273
277
location. This can be done with::
274
278
 
275
 
  % bzr branch sftp://centralhost/srv/bzr/sigil \
276
 
               sftp://centralhost/srv/bzr/sigil/user-a
277
 
  % bzr branch sftp://centralhost/srv/bzr/sigil \
278
 
               sftp://centralhost/srv/bzr/sigil/user-b
 
279
  % bzr branch bzr+ssh://centralhost/srv/bzr/sigil \
 
280
               bzr+ssh://centralhost/srv/bzr/sigil/user-a
 
281
  % bzr branch bzr+ssh://centralhost/srv/bzr/sigil \
 
282
               bzr+ssh://centralhost/srv/bzr/sigil/user-b
279
283
 
280
284
This gives each developer their own branch to work on. And, they can
281
285
easily create a new feature branch for themselves with just [#cbranch]_
282
286
::
283
287
 
284
 
  % bzr branch sftp://centralhost/srv/bzr/sigil/user-a \
285
 
               sftp://centralhost/srv/bzr/sigil/user-a/feature
 
288
  % bzr branch bzr+ssh://centralhost/srv/bzr/sigil/user-a \
 
289
               bzr+ssh://centralhost/srv/bzr/sigil/user-a/feature
286
290
  % cd ~/work/sigil
287
 
  % bzr checkout sftp://centralhost/srv/bzr/sigil/user-a/feature myfeature
 
291
  % bzr checkout bzr+ssh://centralhost/srv/bzr/sigil/user-a/feature myfeature
288
292
 
289
293
 
290
294
Glossary