doc/hg.1.txt
changeset 740 d2422f10c136
parent 671 efa4a7e2f322
parent 737 8db4d406b3d3
child 745 9246ae925d57
--- a/doc/hg.1.txt	Wed Jul 20 11:40:27 2005 -0500
+++ b/doc/hg.1.txt	Wed Jul 20 20:00:29 2005 -0500
@@ -33,7 +33,8 @@
 ----------------
 
 files ...::
-    indicates one or more filename or relative path filenames
+    indicates one or more filename or relative path filenames; see
+    "FILE NAME PATTERNS" for information on pattern matching
 
 path::
     indicates a path on the local machine
@@ -51,11 +52,14 @@
 COMMANDS
 --------
 
-add [files ...]::
+add [options] [files ...]::
     Schedule files to be version controlled and added to the repository.
     
     The files will be added to the repository at the next commit.
 
+    If no names are given, add all files in the current directory and
+    its subdirectories.
+
 addremove::
     Add all new files and remove all missing files from the repository.
     
@@ -69,6 +73,8 @@
     place.
     
     options:
+    -I, --include <pat>  include directories matching the given patterns
+    -X, --exclude <pat>  exclude directories matching the given patterns
     -r, --revision <rev>  annotate the specified revision
     -u, --user            list the author
     -c, --changeset       list the changeset
@@ -129,6 +135,10 @@
     revisions are specified, the working directory files are compared
     to its parent.
 
+    options:
+    -I, --include <pat>  include directories matching the given patterns
+    -X, --exclude <pat>  exclude directories matching the given patterns
+
 export [-o filespec] [revision] ...::
     Print the changeset header and diffs for one or more revisions.
 
@@ -183,14 +193,10 @@
 init::
     Initialize a new repository in the current directory.
 
-locate [options] [patterns]::
-    Print all files under Mercurial control whose basenames match the
+locate [options] [files]::
+    Print all files under Mercurial control whose names match the
     given patterns.
 
-    Patterns are shell-style globs.  To restrict searches to specific
-    directories, use the "-i <pat>" option.  To eliminate particular
-    directories from searching, use the "-x <pat>" option.
-
     This command searches the current directory and its
     subdirectories.  To search an entire repository, move to the root
     of the repository.
@@ -207,9 +213,9 @@
 
     -0, --print0         end filenames with NUL, for use with xargs
     -f, --fullpath       print complete paths from the filesystem root
-    -i, --include <pat>  include directories matching the given globs
+    -I, --include <pat>  include directories matching the given patterns
     -r, --rev <rev>      search the repository as it stood at rev
-    -x, --exclude <pat>  exclude directories matching the given globs
+    -X, --exclude <pat>  exclude directories matching the given patterns
 
 log [-r revision ...] [-p] [file]::
     Print the revision history of the specified file or the entire project.
@@ -319,8 +325,10 @@
     -n, --name <name>        name to show in web pages (default: working dir)
     -t, --templatedir <path> web templates to use
 
-status::
-    Show changed files in the working directory.
+status [options] [files]::
+    Show changed files in the working directory.  If no names are
+    given, all files are shown.  Otherwise, only files matching the
+    given names are shown.
 
     The codes used to show the status of files are:
     
@@ -329,6 +337,11 @@
     R = removed
     ? = not tracked
 
+    options:
+
+    -I, --include <pat>  include directories matching the given patterns
+    -X, --exclude <pat>  exclude directories matching the given patterns
+
 tag [-l -t <text> -d <datecode> -u <user>] <name> [revision]::
     Name a particular revision using <name>.
     
@@ -398,6 +411,52 @@
     the changelog, manifest, and tracked files, as well as the
     integrity of their crosslinks and indices.
 
+FILE NAME PATTERNS
+------------------
+
+    Mercurial accepts several notations for identifying one or more
+    file at a time.
+
+    By default, Mercurial treats file names as shell-style extended
+    glob patterns.
+
+    Alternate pattern notations must be specified explicitly.
+
+    To use a plain path name without any pattern matching, start a
+    name with "path:".  These path names must match completely, from
+    the root of the current repository.
+
+    To use an extended glob, start a name with "glob:".  Globs are
+    rooted at the current directory; a glob such as "*.c" will match
+    files ending in ".c" in the current directory only.
+
+    The supported glob syntax extensions are "**" to match any string
+    across path separators, and "{a,b}" to mean "a or b".
+
+    To use a Perl/Python regular expression, start a name with "re:".
+    Regexp pattern matching is anchored at the root of the repository.
+
+    Plain examples:
+
+    path:foo/bar   a name bar in a directory named foo in the root of
+                   the repository
+    path:path:name a file or directory named "path:name"
+
+    Glob examples:
+
+    glob:*.c       any name ending in ".c" in the current directory
+    *.c            any name ending in ".c" in the current directory
+    **.c           any name ending in ".c" in the current directory, or
+                   any subdirectory
+    foo/*.c        any name ending in ".c" in the directory foo
+    foo/**.c       any name ending in ".c" in the directory foo, or any
+                   subdirectory
+
+    Regexp examples:
+
+    re:.*\.c$      any name ending in ".c", anywhere in the repsitory
+
+
 SPECIFYING SINGLE REVISIONS
 ---------------------------