# HG changeset patch # User Henri Wiechers # Date 1247378203 -7200 # Node ID 35c3f94233a0192fa143555f4dd3e60e3b997d67 # Parent 64994005bcb77874e9c01152f262a6e44b4bb9dd hgignore.5.txt: improved description of matching Improved the description of the matching behavior used with .hgignore. Made some minor language improvements. diff -r 64994005bcb7 -r 35c3f94233a0 doc/hgignore.5.txt --- a/doc/hgignore.5.txt Tue Jul 14 17:59:36 2009 -0700 +++ b/doc/hgignore.5.txt Sun Jul 12 07:56:43 2009 +0200 @@ -12,22 +12,28 @@ -------- 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. +directory of a repository to control its behavior when it searches +for files that it is not currently tracking. 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 hg(1) man page. Look for the "-I" and "-X" options. +An untracked file is ignored if its path relative to the repository +root directory, or any prefix path of that path, is matched against +any pattern in `.hgignore`. -In addition, a Mercurial configuration file can point to a set of +For example, say we have an an untracked file, `file.c`, at +`a/b/file.c` inside our repository. Mercurial will ignore `file.c` if +any pattern in `.hgignore` matches `a/b/file.c`, `a/b` or `a`. + +In addition, a Mercurial configuration file can reference a set of per-user or global ignore files. See the hgrc(5) man page for details of how to configure these files. Look for the "ignore" entry in the "ui" section. +To control Mercurial's handling of files that it manages, see the +hg(1) man page. Look for the "-I" and "-X" options. + SYNTAX ------