~bzr-pqm/bzr/bzr.dev

2977.1.6 by Ian Clatworthy
first cut at Central development chapter
1
Working offline on a central branch
2
===================================
3
2977.1.8 by Ian Clatworthy
completed Central workflow chapter
4
The centralized with local commits workflow
5
-------------------------------------------
6
7
If you lose your network connection because you are travelling, the central
8
server goes down, or you simply want to snapshot changes locally without
9
publishing them centrally just yet, this workflow is for you.
10
11
.. image:: images/workflows_localcommit.png
12
2977.1.6 by Ian Clatworthy
first cut at Central development chapter
13
Committing locally
14
------------------
15
2977.1.8 by Ian Clatworthy
completed Central workflow chapter
16
If you're working in a checkout and need/wish to commit locally only,
17
add the ``--local`` option to the ``commit`` command like this::
18
19
  bzr commit --local
20
21
Being disconnected for long time periods
22
----------------------------------------
23
24
If you will be or want to be disconnected from the bound branch for
25
a while, then remembering to add ``--local`` to every ``commit`` command
26
can be annoying. An alternative is to use the ``unbind`` command to
27
make the checkout temporarily into a normal branch followed by the
28
``bind`` command at some later point in time when you want to
29
keep in lockstep again.
30
31
Note that the ``bind`` command remembers where you were bound to
32
last time this branch was a checkout so it isn't necessary to enter
33
the URL of the remote branch when you use ``bind`` after an earlier
34
``unbind``.
2977.1.6 by Ian Clatworthy
first cut at Central development chapter
35
36
Merging a series of local commits
37
---------------------------------
38
2977.1.8 by Ian Clatworthy
completed Central workflow chapter
39
When you make commits locally independent of ongoing development
40
on a central branch, then Bazaar treats these as two lines of
41
development next time you ``update``. In this case, ``update``
42
does the following:
43
44
 * it brings the latest revisions from the bound branch down and
3074.1.3 by Ian Clatworthy
more feedback from jameinel
45
   makes that the mainline of development within your checkout
2977.1.8 by Ian Clatworthy
completed Central workflow chapter
46
47
 * it moves your local changes since you last updated into a logical
48
   parallel branch
49
50
 * it merges these together so that your local changes are reported
51
   as a pending merge by ``status``.
52
53
As always, you will need to run ``commit`` after this to send your
54
work to the central branch.