Mercurial > hg > mercurial-crew-with-dirclash
diff doc/hg.1.txt @ 740:d2422f10c136
Merge from BOS
manifest hash: 2276dbd96bb4221e579c871a1de2403c92c85659
author | mpm@selenic.com |
---|---|
date | Wed, 20 Jul 2005 20:00:29 -0500 |
parents | efa4a7e2f322 8db4d406b3d3 |
children | 9246ae925d57 |
line wrap: on
line diff
--- 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 <rev> -u -n -c] [files ...] 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 @@ diff [-r revision] [-r revision] [files 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 @@ import [-p <n> -b <base> -q] <patches>:: 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 @@ locate [options] [patterns]:: -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 @@ serve [options]:: -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 @@ status:: 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 @@ 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 ---------------------------