/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
1
Controlling file registration
2
=============================
3
6622.1.23 by Jelmer Vernooij
More renames in English docs.
4
What does Breezy track?
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
5
-----------------------
6
6622.1.23 by Jelmer Vernooij
More renames in English docs.
7
As explained earlier, ``brz add`` finds and registers all the things in
8
and under the current directory that Breezy thinks ought to be
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
9
version controlled. These things may be:
10
11
 * files
12
 * directories
13
 * symbolic links.
14
6622.1.23 by Jelmer Vernooij
More renames in English docs.
15
Breezy has default rules for deciding which files are
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
16
interesting and which ones are not. You can tune those rules as
17
explained in `Ignoring files`_ below.
18
6622.1.23 by Jelmer Vernooij
More renames in English docs.
19
Unlike many other VCS tools, Breezy tracks directories as first class
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
20
items. As a consequence, empty directories are correctly supported -
21
you don't need to create a dummy file inside a directory just to
22
ensure it gets tracked and included in project exports.
23
24
For symbolic links, the value of the symbolic link is tracked,
25
not the content of the thing the symbolic link is pointing to.
26
27
Note: Support for tracking projects-within-projects ("nested trees")
6622.1.23 by Jelmer Vernooij
More renames in English docs.
28
is currently under development. Please contact the Breezy developers
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
29
if you are interested in helping develop or test this functionality.
30
31
Selective registration
32
----------------------
33
34
In some cases, you may want or need to explicitly nominate the things
6622.1.23 by Jelmer Vernooij
More renames in English docs.
35
to register rather than leave it up to Breezy to find things. To do this,
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
36
simply provide paths as arguments to the ``add`` command like this::
37
6622.1.23 by Jelmer Vernooij
More renames in English docs.
38
  brz add fileX dirY/
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
39
40
Adding a directory implicitly adds all interesting things
41
underneath it.
42
43
Ignoring files
44
--------------
45
46
Many source trees contain some files that do not need to be versioned,
47
such as editor backups, object or bytecode files, and built programs.  You
48
can simply not add them, but then they'll always crop up as unknown files.
6622.1.23 by Jelmer Vernooij
More renames in English docs.
49
You can also tell Breezy to ignore these files by adding them to a file
6622.1.24 by Jelmer Vernooij
More doc renames.
50
called ``.bzrignore`` at the top of the tree.
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
51
52
This file contains a list of file wildcards (or "globs"), one per line.
53
Typical contents are like this::
54
55
    *.o
56
    *~
57
    *.tmp
58
    *.py[co]
59
60
If a glob contains a slash, it is matched against the whole path from the
61
top of the tree; otherwise it is matched against only the filename.  So
62
the previous example ignores files with extension ``.o`` in all
63
subdirectories, but this example ignores only ``config.h`` at the top level
64
and HTML files in ``doc/``::
65
66
    ./config.h
67
    doc/*.html
68
69
To get a list of which files are ignored and what pattern they matched,
6622.1.23 by Jelmer Vernooij
More renames in English docs.
70
use ``brz ignored``::
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
71
6622.1.23 by Jelmer Vernooij
More renames in English docs.
72
    % brz ignored
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
73
    config.h                 ./config.h
74
    configure.in~            *~
75
3350.2.1 by Martin Pool
Clearer explanation of ignore/add in user guide.
76
Note that ignore patterns are only matched against non-versioned files,
77
and control whether they are treated as "unknown" or "ignored".  If a file
78
is explicitly added, it remains versioned regardless of whether it matches
79
an ignore pattern.
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
80
6622.1.24 by Jelmer Vernooij
More doc renames.
81
The ``.bzrignore`` file should normally be versioned, so that new copies
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
82
of the branch see the same patterns::
83
6622.1.24 by Jelmer Vernooij
More doc renames.
84
    % brz add .bzrignore
6622.1.23 by Jelmer Vernooij
More renames in English docs.
85
    % brz commit -m "Add ignore patterns"
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
86
6622.1.23 by Jelmer Vernooij
More renames in English docs.
87
The command ``brz ignore PATTERN`` can be used to easily add PATTERN to
6622.1.24 by Jelmer Vernooij
More doc renames.
88
the ``.bzrignore file`` (creating it if necessary and registering it to
6622.1.23 by Jelmer Vernooij
More renames in English docs.
89
be tracked by Breezy).  Removing and modifying patterns are done by
6622.1.24 by Jelmer Vernooij
More doc renames.
90
directly editing the ``.bzrignore`` file.
3373.3.1 by Neil Martinsen-Burrell
add bzr ignore to the Users Guide
91
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
92
Global ignores
93
--------------
94
95
There are some ignored files which are not project specific, but more user
96
specific. Things like editor temporary files, or personal temporary files.
6622.1.23 by Jelmer Vernooij
More renames in English docs.
97
Rather than add these ignores to every project, brz supports a global
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
98
ignore file in ``~/.bazaar/ignore`` [#]_. It has the same syntax as the
99
per-project ignore file.
100
101
.. [#] On Windows, the users configuration files can be found in the
102
   application data directory. So instead of ``~/.bazaar/branch.conf``
4853.1.1 by Patrick Regan
Removed trailing whitespace from files in doc directory
103
   the configuration file can be found as:
6622.1.23 by Jelmer Vernooij
More renames in English docs.
104
   ``C:\Documents and Settings\<username>\Application Data\Breezy\2.0\branch.conf``.
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
105
   The same is true for ``locations.conf``, ``ignore``, and the
106
   ``plugins`` directory.