plan9fox/sys/man/8/hgignore

80 lines
2.3 KiB
Plaintext
Raw Normal View History

2011-05-04 09:02:04 +00:00
.TH HGIGNORE 8
2011-05-03 11:25:13 +00:00
.nh
.ad l
2011-05-04 09:02:04 +00:00
.SH NAME
2011-05-03 11:25:13 +00:00
hgignore \- syntax for Mercurial ignore files
2011-05-04 09:02:04 +00:00
.SH SYNOPSIS
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.
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
.SH DESCRIPTION
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
.IR hg (1)
man page. Look for the "\-I" and "\-X" options.
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
In addition, a Mercurial configuration file can point to a set of per\-user or global ignore files. See the
.IR hgrc (8)
man page for details of how to configure these files. Look for the "ignore" entry in the "ui" section.
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
.SH SYNTAX
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.
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
Mercurial supports several pattern syntaxes. The default syntax used is Python/Perl\-style regular expressions.
2011-05-03 11:25:13 +00:00
.sp
To change the syntax used, use a line of the following form:
.sp
syntax: NAME
.sp
where NAME is one of the following:
.PP
regexp
.RS 4
2011-05-04 09:02:04 +00:00
Regular expression, Python/Perl syntax.
2011-05-03 11:25:13 +00:00
.RE
.PP
glob
.RS 4
2011-05-04 09:02:04 +00:00
Shell\-style glob.
2011-05-03 11:25:13 +00:00
.RE
2011-05-04 09:02:04 +00:00
The chosen syntax stays in effect when parsing all patterns that follow, until another syntax is selected.
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
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 "^".
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
.SH EXAMPLE
Here is an example ignore file.
2011-05-03 11:25:13 +00:00
.sp
.sp
.RS 4
.nf
2011-05-04 09:02:04 +00:00
# use glob syntax.
2011-05-03 11:25:13 +00:00
syntax: glob
.fi
.RE
.sp
.RS 4
.nf
2011-05-04 09:02:04 +00:00
*.elc
*.pyc
2011-05-03 11:25:13 +00:00
*~
.fi
.RE
.sp
.RS 4
.nf
2011-05-04 09:02:04 +00:00
# switch to regexp syntax.
2011-05-03 11:25:13 +00:00
syntax: regexp
2011-05-04 09:02:04 +00:00
^\e.pc/
2011-05-03 11:25:13 +00:00
.fi
.RE
2011-05-04 09:02:04 +00:00
.SH AUTHOR
Vadim Gelfer <vadim.gelfer@gmail.com>
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
Mercurial was written by Matt Mackall <mpm@selenic.com>.
2011-05-03 11:25:13 +00:00
.sp
.SH "SEE ALSO"
2011-05-04 09:02:04 +00:00
.IR hg (1),
.IR hgrc (8).
2011-05-03 11:25:13 +00:00
.sp
2011-05-04 09:02:04 +00:00
.SH COPYING
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).
2011-05-03 11:25:13 +00:00
.sp