/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2005-06-28 03:02:31 UTC
  • Revision ID: mbp@sourcefrog.net-20050628030231-d311e4ebcd467ef4
Merge John's import-speedup branch:

                                                                                         
  777 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:32 -0500
      revision-id: john@arbash-meinel.com-20050627032031-e82a50db3863b18e
      bzr selftest was not using the correct bzr

  776 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:22 -0500
      revision-id: john@arbash-meinel.com-20050627032021-c9f21fde989ddaee
      Add was using an old mutter

  775 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:02:33 -0500
      revision-id: john@arbash-meinel.com-20050627030233-9165cfe98fc63298
      Cleaned up to be less different

  774 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:54:53 -0500
      revision-id: john@arbash-meinel.com-20050627025452-4260d0e744edef43
      Allow BZR_PLUGIN_PATH='' to negate plugin loading.

  773 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:49:34 -0500
      revision-id: john@arbash-meinel.com-20050627024933-b7158f67b7b9eae5
      Finished the previous cleanup (allowing load_plugins to be called twice)

  772 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:45:08 -0500
      revision-id: john@arbash-meinel.com-20050627024508-723b1df510d196fc
      Work on making the tests pass. versioning.py is calling run_cmd directly, but plugins have been loaded.

  771 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:32:29 -0500
      revision-id: john@arbash-meinel.com-20050627023228-79972744d7c53e15
      Got it down a little bit more by removing import of tree and inventory.

  770 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:26:05 -0500
      revision-id: john@arbash-meinel.com-20050627022604-350b9773ef622f95
      Reducing the number of import from bzrlib/__init__.py and bzrlib/branch.py

  769 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:32:25 -0500
      revision-id: john@arbash-meinel.com-20050627013225-32dd044f10d23948
      Updated revision.py and xml.py to include SubElement.

  768 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:56 -0500
      revision-id: john@arbash-meinel.com-20050627010356-ee66919e1c377faf
      Minor typo

  767 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:13 -0500
      revision-id: john@arbash-meinel.com-20050627010312-40d024007eb85051
      Caching the import

  766 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:51:47 -0500
      revision-id: john@arbash-meinel.com-20050627005147-5281c99e48ed1834
      Created wrapper functions for lazy import of ElementTree

  765 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:46:37 -0500
      revision-id: john@arbash-meinel.com-20050627004636-bf432902004a94c5
      Removed all of the test imports of cElementTree

  764 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:43:59 -0500
      revision-id: john@arbash-meinel.com-20050627004358-d137fbe9570dd71b
      Trying to make bzr startup faster.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Using checkouts
2
 
===============
3
 
 
4
 
Turning a branch into a checkout
5
 
--------------------------------
6
 
 
7
 
If you have a local branch and wish to make it a checkout, use the
8
 
``bind`` command like this::
9
 
 
10
 
  bzr bind sftp://centralhost/srv/bzr/PROJECT/trunk
11
 
 
12
 
This is necessary, for example, after creating a central branch using
13
 
``push`` as illustrated in the previous section.
14
 
 
15
 
After this, commits will be applied to the bound branch before
16
 
being applied locally.
17
 
 
18
 
Turning a checkout into a branch
19
 
--------------------------------
20
 
 
21
 
If you have a checkout and wish to make it a normal branch, use the
22
 
``unbind`` command like this::
23
 
 
24
 
  bzr unbind
25
 
 
26
 
After this, commits will only be applied locally.
27
 
 
28
 
Getting a checkout
29
 
------------------
30
 
 
31
 
When working in a team using a central branch, one person needs
32
 
to provide some initial content as shown in the previous section.
33
 
After that, each person should use the ``checkout`` command to
34
 
create their local checkout, i.e. the sandbox in which they
35
 
will make their changes.
36
 
 
37
 
Unlike Subversion and CVS, in Bazaar the ``checkout`` command creates a
38
 
local full copy of history in addition to creating a working tree holding
39
 
the latest content. This means that operations such as ``diff`` and ``log``
40
 
are fast and can still be used when disconnected from the central location.
41
 
 
42
 
Getting a lightweight checkout
43
 
------------------------------
44
 
 
45
 
While Bazaar does its best to efficiently store version history, there
46
 
are occasions when the history is simply not wanted. For example, if your
47
 
team is managing the content of a web site using Bazaar with a
48
 
central repository, then your release process might be as simple as
49
 
updating a checkout of the content on the public web server. In this
50
 
case, you probably don't want the history downloaded to that location
51
 
as doing so:
52
 
 
53
 
 * wastes disk space holding history that isn't needed there
54
 
 * exposes a Bazaar branch that you may want kept private.
55
 
 
56
 
To get a history-less checkout in Bazaar, use the ``--lightweight``
57
 
option like this::
58
 
 
59
 
  bzr checkout --lightweight sftp://centralhost/srv/bzr/PROJECT/trunk
60
 
 
61
 
Of course, many of the benefits of a normal checkout are lost by doing
62
 
this but that's a tradeoff you can make if and when it makes sense.
63
 
 
64
 
The ``--lightweight`` option only applies to checkouts, not to all branches.
65
 
 
66
 
Note: If your code base is really large and disk space on your computer
67
 
is limited, lightweight checkouts may be the right choice for you.
68
 
Be sure to consider all your options though including
69
 
`shared repositories <branching_a_project.html#a-reminder-about-shared-repositories>`_,
70
 
`stacked branches <stacked.html>`_, and
71
 
`reusing a checkout <reusing_a_checkout.html>`_.
72
 
 
73
 
Updating to the latest content
74
 
------------------------------
75
 
 
76
 
One of the important aspects of working in lockstep with others is
77
 
keeping your checkout up to date with the latest changes made to
78
 
the central branch. Just as you would in Subversion or CVS, you do
79
 
this in Bazaar by using the ``update`` command like this::
80
 
 
81
 
  bzr update
82
 
 
83
 
This gets any new revisions available in the bound branch and
84
 
merges your local changes, if any.
85
 
 
86
 
Handling commit failures
87
 
------------------------
88
 
 
89
 
Note that your checkout *must* be up to date with the bound branch
90
 
before running ``commit``. Bazaar is actually stricter about this
91
 
than Subversion or CVS - you need to be up to date with the full
92
 
tree, not just for the files you've changed. Bazaar will ask you
93
 
to run ``update`` if it detects that a revision has been added to
94
 
the central location since you last updated.
95
 
 
96
 
If the network connection to the bound branch is lost, the commit will
97
 
fail. Some alternative ways of working around that are outlined next.