~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/en/user-guide/reusing_a_checkout.txt

  • Committer: Aaron Bentley
  • Date: 2007-12-08 01:00:58 UTC
  • mfrom: (3095 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3133.
  • Revision ID: aaron.bentley@utoronto.ca-20071208010058-1vuj9qn49qfu808e
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 3. Make your checkout a copy of the desired branch by using
35
35
    the ``update`` command followed by the ``revert`` command.
36
36
 
37
 
 
38
37
Note that simply binding to a new branch
39
 
and running ``update`` is not enough: you need the ``revert`` to
40
 
throw away any local differences in the working tree.
 
38
and running ``update`` merges in your local changes. You need
 
39
to decide whether to keep them or not by running either ``revert``
 
40
or ``commit``.
 
41
 
 
42
An alternative to the bind+update recipe is:
 
43
 
 
44
 1. Use the ``unbind`` command to turn the checkout into a normal branch.
 
45
 
 
46
 2. Run ``bzr pull --overwrite URL`` to make the branch a mirror of
 
47
    a new URL.
 
48
 
 
49
 3. Run ``bzr bind URL`` to bind to that URL.
41
50
 
42
51
Switching a lightweight checkout
43
52
--------------------------------
59
68
  (hack away)
60
69
 
61
70
Note that X-trunk in this example will have a ``.bzr`` directory within it
62
 
but their will be no working tree there as the branch was created in
 
71
but there will be no working tree there as the branch was created in
63
72
a tree-less repository. You can grab or create as many branches as you
64
73
need there and switch between them as required. For example::
65
74
 
75
84
refreshes your working tree and merges in any local changes you
76
85
have made. The primary different is that ``switch`` requires
77
86
a branch location and it is only supported (currently) on
78
 
lightweight checkouts.
 
87
lightweight checkouts. ``switch`` also only preserves
 
88
uncommitted changes while update keeps committed ones.
79
89
 
80
90
Note: The branches may be local only or they may be bound to
81
91
remote ones (by creating them with ``checkout`` or by using ``bind``