1HGIGNORE(5)                                                        HGIGNORE(5)
2
3
4

NAME

6       hgignore - syntax for Mercurial ignore files
7

SYNOPSIS

9       The Mercurial system uses a file called .hgignore in the root directory
10       of a repository to control its behavior when it finds files that it is
11       not currently managing.
12
13

DESCRIPTION

15       Mercurial ignores every unmanaged file that matches any pattern in an
16       ignore file. The patterns in an ignore file do not apply to files
17       managed by Mercurial. To control Mercurial's handling of files that it
18       manages, see the hg(1) man page. Look for the "-I" and "-X" options.
19
20       In addition, a Mercurial configuration file can point to a set of
21       per-user or global ignore files. See the hgrc(5) man page for details
22       of how to configure these files. Look for the "ignore" entry in the
23       "ui" section.
24
25

SYNTAX

27       An ignore file is a plain text file consisting of a list of patterns,
28       with one pattern per line. Empty lines are skipped. The "#" character
29       is treated as a comment character, and the "\" character is treated as
30       an escape character.
31
32       Mercurial supports several pattern syntaxes. The default syntax used is
33       Python/Perl-style regular expressions.
34
35       To change the syntax used, use a line of the following form:
36
37       syntax: NAME
38
39       where NAME is one of the following:
40
41
42       regexp
43           Regular expression, Python/Perl syntax.
44
45       glob
46           Shell-style glob.
47       The chosen syntax stays in effect when parsing all patterns that
48       follow, until another syntax is selected.
49
50       Neither glob nor regexp patterns are rooted. A glob-syntax pattern of
51       the form "*.c" will match a file ending in ".c" in any directory, and a
52       regexp pattern of the form "\.c$" will do the same. To root a regexp
53       pattern, start it with "^".
54
55

EXAMPLE

57       Here is an example ignore file.
58
59
60           # use glob syntax.
61           syntax: glob
62
63           *.elc
64           *.pyc
65           *~
66           .*.swp
67
68           # switch to regexp syntax.
69           syntax: regexp
70           ^\.pc/
71

AUTHOR

73       Vadim Gelfer <vadim.gelfer@gmail.com>
74
75       Mercurial was written by Matt Mackall <mpm@selenic.com>.
76
77

SEE ALSO

79       hg(1), hgrc(5)
80
81

COPYING

83       This manual page is copyright 2006 Vadim Gelfer. Mercurial is copyright
84       2005-2007 Matt Mackall. Free use of this software is granted under the
85       terms of the GNU General Public License (GPL).
86
87
88
89
90                                  06/25/2007                       HGIGNORE(5)
Impressum