[PATCH] hgignore.5.txt: improved description of matching

Henri Wiechers hwiechers at gmail.com
Sat Jul 11 08:58:40 CDT 2009


# HG changeset patch
# User Henri Wiechers <hwiechers at gmail.com>
# Date 1247320594 -7200
# Node ID 9978b47f5d4e975c0b9996139af5583cb94aa8fc
# Parent  ac3f1e6696eb01cfe24c01bad44d5c54aca495a7
hgignore.5.txt: improved description of matching

Improved the description of the matching behavior used with .hgignore.
Made some minor language improvements.
Left out some unnecessary details.

diff -r ac3f1e6696eb -r 9978b47f5d4e doc/hgignore.5.txt
--- a/doc/hgignore.5.txt	Fri Jul 10 23:24:35 2009 +0200
+++ b/doc/hgignore.5.txt	Sat Jul 11 15:56:34 2009 +0200
@@ -12,16 +12,20 @@
 --------
 
 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.
+
+For example, say there is a repository at `/home/me/repo` with 
+an untracked file, `file.c`, at `/home/me/repo/a/b/file.c`. 
+Mercurial will ignore `file.c` if any pattern in 
+`/home/me/repo/.hgignore` matches `a/b/file.c`, `a/b` or `a`.
 
 In addition, a Mercurial configuration file can point to a set of
 per-user or global ignore files. See the hgrc(5) man page for details


More information about the Mercurial-devel mailing list