~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-02-06 14:52:16 UTC
  • mfrom: (2266 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2268.
  • Revision ID: abentley@panoramicfeedback.com-20070206145216-fcpi8o3ufvuzwbp9
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Rules
2
 
=====
3
 
 
4
 
Introduction
5
 
------------
6
 
 
7
 
Rules are defined in ini file format where the sections are file glob
8
 
patterns and the contents of each section are the preferences for files
9
 
matching that pattern. For example::
10
 
 
11
 
    [name *.bat]
12
 
    eol = dos
13
 
 
14
 
    [name *.html]
15
 
    keywords = escape
16
 
 
17
 
Preferences like these are useful for commands and plugins wishing to
18
 
provide custom behaviour for selected files in selected branches.
19
 
 
20
 
 
21
 
Files
22
 
-----
23
 
 
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
 
 
29
 
 
30
 
Rule Patterns
31
 
-------------
32
 
 
33
 
Patterns are ordered and searching stops as soon as one matches.
34
 
As a consequence, more explicit patterns should be placed towards
35
 
the top of the file. Rule patterns use exactly the same conventions
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.