Patchwork [1,of,1,STABLE] doc: fix mistake about matching against directories in "pattern.txt"

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Jan. 30, 2014, 6:16 a.m.
Message ID <84ba2b270ad4c35dc664.1391062580@feefifofum>
Download mbox | patch
Permalink /patch/3420/
State Accepted
Commit 45f23b1ff345c8f37069ff29be68e3540ce87d74
Headers show

Comments

Katsunori FUJIWARA - Jan. 30, 2014, 6:16 a.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1391061816 -32400
#      Thu Jan 30 15:03:36 2014 +0900
# Branch stable
# Node ID 84ba2b270ad4c35dc6649007d670602dad764f63
# Parent  427d672c0e4e07642d2400a28946cefde11e04ff
doc: fix mistake about matching against directories in "pattern.txt"

This fixes mistake of documentation about matching against directories
in "pattern.txt" introduced by 50db996bccaf.

".hgignore" treats specified "glob:" pattern as same as one specified
for "-X" option: it can match against directories, too.

For reference, extra regexp string appended to specified pattern for
each types are listed below: see also "match.match()" and
"match._regex()" for detail.

  ============= ========== ===============
  type          cmdline    -I/-X
  ============= ========== ===============
  glob/relglob  '$'        '(?:/|$)'
  path/relpath  '(?:/|$)'  '(?:/|$)'
  re/relre      (none)     (none)
  ============= ========== ===============

Appending '$' means that the specified pattern should match against
only files.
Matt Mackall - Jan. 30, 2014, 8:28 p.m.
On Thu, 2014-01-30 at 15:16 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1391061816 -32400
> #      Thu Jan 30 15:03:36 2014 +0900
> # Branch stable
> # Node ID 84ba2b270ad4c35dc6649007d670602dad764f63
> # Parent  427d672c0e4e07642d2400a28946cefde11e04ff
> doc: fix mistake about matching against directories in "pattern.txt"

Queued for stable, thanks.

Patch

diff --git a/mercurial/help/patterns.txt b/mercurial/help/patterns.txt
--- a/mercurial/help/patterns.txt
+++ b/mercurial/help/patterns.txt
@@ -30,9 +30,8 @@ 
 pattern.
 
 All patterns, except for ``glob:`` specified in command line (not for
-``-I`` or ``-X`` options) or ``.hgignore`` file, can match also
-against directories: files under matched directories are treated as
-matched.
+``-I`` or ``-X`` options), can match also against directories: files
+under matched directories are treated as matched.
 
 Plain examples::