]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/hgignore
lib9p: get rid of Srv.nopipe and Srv.leavefdsopen hacks
[plan9front.git] / sys / man / 8 / hgignore
1 .TH HGIGNORE 8
2 .nh
3 .ad l
4 .SH NAME
5 hgignore \- syntax for Mercurial ignore files
6 .SH SYNOPSIS
7 The Mercurial system uses a file called .hgignore in the root directory of a repository to control its behavior when it finds files that it is not currently managing.
8 .sp
9 .SH DESCRIPTION
10 Mercurial ignores every unmanaged file that matches any pattern in an ignore file. The patterns in an ignore file do not apply to files managed by Mercurial. To control Mercurial\'s handling of files that it manages, see the 
11 .IR hg (1)
12 man page. Look for the "\-I" and "\-X" options.
13 .sp
14 In addition, a Mercurial configuration file can point to a set of per\-user or global ignore files. See the
15 .IR hgrc (8)
16 man page for details of how to configure these files. Look for the "ignore" entry in the "ui" section.
17 .sp
18 .SH SYNTAX
19 An ignore file is a plain text file consisting of a list of patterns, with one pattern per line. Empty lines are skipped. The "#" character is treated as a comment character, and the "\e" character is treated as an escape character.
20 .sp
21 Mercurial supports several pattern syntaxes. The default syntax used is Python/Perl\-style regular expressions.
22 .sp
23 To change the syntax used, use a line of the following form:
24 .sp
25 syntax: NAME
26 .sp
27 where NAME is one of the following:
28 .PP
29 regexp
30 .RS 4
31 Regular expression, Python/Perl syntax.
32 .RE
33 .PP
34 glob
35 .RS 4
36 Shell\-style glob.
37 .RE
38 The chosen syntax stays in effect when parsing all patterns that follow, until another syntax is selected.
39 .sp
40 Neither glob nor regexp patterns are rooted. A glob\-syntax pattern of the form "*.c" will match a file ending in ".c" in any directory, and a regexp pattern of the form "\e.c$" will do the same. To root a regexp pattern, start it with "^".
41 .sp
42 .SH EXAMPLE
43 Here is an example ignore file.
44 .sp
45 .sp
46 .RS 4
47 .nf
48 # use glob syntax.
49 syntax: glob
50 .fi
51 .RE
52 .sp
53 .RS 4
54 .nf
55 *.elc
56 *.pyc
57 *~
58 .fi
59 .RE
60 .sp
61 .RS 4
62 .nf
63 # switch to regexp syntax.
64 syntax: regexp
65 ^\e.pc/
66 .fi
67 .RE
68 .SH AUTHOR
69 Vadim Gelfer <vadim.gelfer@gmail.com>
70 .sp
71 Mercurial was written by Matt Mackall <mpm@selenic.com>.
72 .sp
73 .SH "SEE ALSO"
74 .IR hg (1),
75 .IR hgrc (8).
76 .sp
77 .SH COPYING
78 This manual page is copyright 2006 Vadim Gelfer. Mercurial is copyright 2005\-2007 Matt Mackall. Free use of this software is granted under the terms of the GNU General Public License (GPL).
79 .sp