diff --git a/doc/hg.1.txt b/doc/hg.1.txt --- a/doc/hg.1.txt +++ b/doc/hg.1.txt @@ -33,7 +33,8 @@ COMMAND ELEMENTS ---------------- 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 @@ repository path:: 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 @@ annotate [-r -u -n -c] [files ...] place. options: + -I, --include include directories matching the given patterns + -X, --exclude exclude directories matching the given patterns -r, --revision annotate the specified revision -u, --user list the author -c, --changeset list the changeset @@ -129,6 +135,10 @@ diff [-r revision] [-r revision] [files revisions are specified, the working directory files are compared to its parent. + options: + -I, --include include directories matching the given patterns + -X, --exclude 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 @@ import [-p -b -q] :: 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 " option. To eliminate particular - directories from searching, use the "-x " 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 @@ locate [options] [patterns]:: -0, --print0 end filenames with NUL, for use with xargs -f, --fullpath print complete paths from the filesystem root - -i, --include include directories matching the given globs + -I, --include include directories matching the given patterns -r, --rev search the repository as it stood at rev - -x, --exclude exclude directories matching the given globs + -X, --exclude 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 @@ serve [options]:: -n, --name name to show in web pages (default: working dir) -t, --templatedir 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 @@ status:: R = removed ? = not tracked + options: + + -I, --include include directories matching the given patterns + -X, --exclude exclude directories matching the given patterns + tag [-l -t -d -u ] [revision]:: Name a particular revision using . @@ -398,6 +411,52 @@ verify:: 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 ---------------------------