Mercurial > hg > pyhgsh
comparison doc/hgignore.5.txt @ 2209:956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
fix issue 162.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Thu, 04 May 2006 22:20:02 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2208:12e36dedf668 | 2209:956e329f9e13 |
---|---|
1 HGIGNORE(5) | |
2 =========== | |
3 Vadim Gelfer <vadim.gelfer@gmail.com> | |
4 | |
5 NAME | |
6 ---- | |
7 hgignore - syntax for Mercurial ignore files | |
8 | |
9 SYNOPSIS | |
10 -------- | |
11 | |
12 The Mercurial system uses a file called .hgignore in the root | |
13 directory of a repository to control its behavior when it finds files | |
14 that it is not currently managing. | |
15 | |
16 DESCRIPTION | |
17 ----------- | |
18 | |
19 Mercurial ignores every unmanaged file that matches any pattern in an | |
20 ignore file. The patterns in an ignore file do not apply to files | |
21 managed by Mercurial. To control Mercurial's handling of files that | |
22 it manages, see the hg(1) man page. Look for the "-I" and "-X" | |
23 options. | |
24 | |
25 In addition, a Mercurial configuration file can point to a set of | |
26 per-user or global ignore files. See the hgrc(5) man page for details | |
27 of how to configure these files. Look for the "ignore" entry in the | |
28 "ui" section. | |
29 | |
30 SYNTAX | |
31 ------ | |
32 | |
33 An ignore file is a plain text file consisting of a list of patterns, | |
34 with one pattern per line. Empty lines are skipped. The "#" | |
35 character is treated as a comment character, and the "\" character is | |
36 treated as an escape character. | |
37 | |
38 Mercurial supports several pattern syntaxes. The default syntax used | |
39 is Python/Perl-style regular expressions. | |
40 | |
41 To change the syntax used, use a line of the following form: | |
42 | |
43 syntax: NAME | |
44 | |
45 where NAME is one of the following: | |
46 | |
47 regexp:: | |
48 Regular expression, Python/Perl syntax. | |
49 glob:: | |
50 Shell-style glob. | |
51 | |
52 The chosen syntax stays in effect when parsing all patterns that | |
53 follow, until another syntax is selected. | |
54 | |
55 Neither glob nor regexp patterns are rooted. A glob-syntax pattern of | |
56 the form "*.c" will match a file ending in ".c" in any directory, and | |
57 a regexp pattern of the form "\.c$" will do the same. To root a | |
58 regexp pattern, start it with "^". | |
59 | |
60 EXAMPLE | |
61 ------- | |
62 | |
63 Here is an example ignore file. | |
64 | |
65 # use glob syntax. | |
66 syntax: glob | |
67 | |
68 *.elc | |
69 *.pyc | |
70 *~ | |
71 .*.swp | |
72 | |
73 # switch to regexp syntax. | |
74 syntax: regexp | |
75 ^\.pc/ | |
76 | |
77 AUTHOR | |
78 ------ | |
79 Vadim Gelfer <vadim.gelfer@gmail.com> | |
80 | |
81 Mercurial was written by Matt Mackall <mpm@selenic.com>. | |
82 | |
83 SEE ALSO | |
84 -------- | |
85 hg(1), hgrc(5) | |
86 | |
87 COPYING | |
88 ------- | |
89 This manual page is copyright 2006 Vadim Gelfer. | |
90 Mercurial is copyright 2005, 2006 Matt Mackall. | |
91 Free use of this software is granted under the terms of the GNU General | |
92 Public License (GPL). |