~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help_topics/en/rules.txt

  • Committer: Jelmer Vernooij
  • Date: 2008-07-08 15:58:12 UTC
  • mfrom: (3353.1.4 paramiko-1.7.2-compat)
  • mto: This revision was merged to the branch mainline in revision 3531.
  • Revision ID: jelmer@samba.org-20080708155812-gacwrgs7d7n48a0d
Merge bashprompt script that prints the bzr branch nick.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
Rules are defined in ini file format where the sections are file glob
8
8
patterns and the contents of each section are the preferences for files
9
 
matching that pattern(s). For example::
 
9
matching that pattern. For example::
10
10
 
11
11
    [name *.bat]
12
 
    eol = native
 
12
    eol = dos
13
13
 
14
 
    [name *.html *.xml]
15
 
    keywords = xml_escape
 
14
    [name *.html]
 
15
    keywords = escape
16
16
 
17
17
Preferences like these are useful for commands and plugins wishing to
18
 
provide custom behaviour for selected files.  For more information on 
19
 
end of line conversion see :doc:`eol-help`.
20
 
Keyword support is provided by the `keywords plugin
21
 
<http://doc.bazaar.canonical.com/plugins/en/keywords-plugin.html>`_.
 
18
provide custom behaviour for selected files in selected branches.
 
19
 
22
20
 
23
21
Files
24
22
-----
25
23
 
26
 
Default rules for all branches are defined in the optional file
27
 
``BZR_HOME/rules``. 
 
24
Branch-specific rules are defined in ``.bzrrules`` in the root of the
 
25
working tree. Default rules for all branches are defined in
 
26
``BZR_HOME/rules``. Either or both files may be missing. If a rule is
 
27
matched by a pattern in the branch level file, searching stops.
 
28
 
28
29
 
29
30
Rule Patterns
30
31
-------------
32
33
Patterns are ordered and searching stops as soon as one matches.
33
34
As a consequence, more explicit patterns should be placed towards
34
35
the top of the file. Rule patterns use exactly the same conventions
35
 
as ignore patterns. See :doc:`patterns-help` for details.
36
 
 
37
 
.. note::
38
 
 
39
 
   Patterns containing square brackets or spaces should be
40
 
   surrounded in quotes to ensure they are correctly parsed.
 
36
as ignore patterns. See ``bzr help patterns`` for details.
 
37
 
 
38
Note: Patterns containing square brackets should be surrounded in
 
39
quotes to ensure they are corrected parsed.