doc/hg.1.txt
changeset 724 1c0c413cccdd
parent 671 efa4a7e2f322
child 725 c6b912f8b5b2
equal deleted inserted replaced
723:9e0f3ba4a9c2 724:1c0c413cccdd
    31 
    31 
    32 COMMAND ELEMENTS
    32 COMMAND ELEMENTS
    33 ----------------
    33 ----------------
    34 
    34 
    35 files ...::
    35 files ...::
    36     indicates one or more filename or relative path filenames
    36     indicates one or more filename or relative path filenames; see
       
    37     "FILE NAME PATTERNS" for information on pattern matching
    37 
    38 
    38 path::
    39 path::
    39     indicates a path on the local machine
    40     indicates a path on the local machine
    40 
    41 
    41 revision::
    42 revision::
    49     require a special server on the web host.
    50     require a special server on the web host.
    50 
    51 
    51 COMMANDS
    52 COMMANDS
    52 --------
    53 --------
    53 
    54 
    54 add [files ...]::
    55 add [options] [files ...]::
    55     Schedule files to be version controlled and added to the repository.
    56     Schedule files to be version controlled and added to the repository.
    56     
    57     
    57     The files will be added to the repository at the next commit.
    58     The files will be added to the repository at the next commit.
       
    59 
       
    60     If no names are given, add all files in the current directory and
       
    61     its subdirectory.
    58 
    62 
    59 addremove::
    63 addremove::
    60     Add all new files and remove all missing files from the repository.
    64     Add all new files and remove all missing files from the repository.
    61     
    65     
    62     New files are ignored if they match any of the patterns in .hgignore. As
    66     New files are ignored if they match any of the patterns in .hgignore. As
   181     aliases: patch
   185     aliases: patch
   182 
   186 
   183 init::
   187 init::
   184     Initialize a new repository in the current directory.
   188     Initialize a new repository in the current directory.
   185 
   189 
   186 locate [options] [patterns]::
   190 locate [options] [files]::
   187     Print all files under Mercurial control whose basenames match the
   191     Print all files under Mercurial control whose names match the
   188     given patterns.
   192     given patterns.
   189 
       
   190     Patterns are shell-style globs.  To restrict searches to specific
       
   191     directories, use the "-i <pat>" option.  To eliminate particular
       
   192     directories from searching, use the "-x <pat>" option.
       
   193 
   193 
   194     This command searches the current directory and its
   194     This command searches the current directory and its
   195     subdirectories.  To search an entire repository, move to the root
   195     subdirectories.  To search an entire repository, move to the root
   196     of the repository.
   196     of the repository.
   197 
   197 
   205 
   205 
   206     options:
   206     options:
   207 
   207 
   208     -0, --print0         end filenames with NUL, for use with xargs
   208     -0, --print0         end filenames with NUL, for use with xargs
   209     -f, --fullpath       print complete paths from the filesystem root
   209     -f, --fullpath       print complete paths from the filesystem root
   210     -i, --include <pat>  include directories matching the given globs
   210     -I, --include <pat>  include directories matching the given patterns
   211     -r, --rev <rev>      search the repository as it stood at rev
   211     -r, --rev <rev>      search the repository as it stood at rev
   212     -x, --exclude <pat>  exclude directories matching the given globs
   212     -X, --exclude <pat>  exclude directories matching the given patterns
   213 
   213 
   214 log [-r revision ...] [-p] [file]::
   214 log [-r revision ...] [-p] [file]::
   215     Print the revision history of the specified file or the entire project.
   215     Print the revision history of the specified file or the entire project.
   216 
   216 
   217     By default this command outputs: changeset id and hash, tags,
   217     By default this command outputs: changeset id and hash, tags,
   396     This will perform an extensive check of the repository's
   396     This will perform an extensive check of the repository's
   397     integrity, validating the hashes and checksums of each entry in
   397     integrity, validating the hashes and checksums of each entry in
   398     the changelog, manifest, and tracked files, as well as the
   398     the changelog, manifest, and tracked files, as well as the
   399     integrity of their crosslinks and indices.
   399     integrity of their crosslinks and indices.
   400 
   400 
       
   401 FILE NAME PATTERNS
       
   402 ------------------
       
   403 
       
   404     Mercurial accepts several notations for identifying one or more
       
   405     file at a time.
       
   406 
       
   407     By default, Mercurial treats file names as shell-style extended
       
   408     glob patterns.
       
   409 
       
   410     Alternate pattern notations must be specified explicitly.
       
   411 
       
   412     To use a plain path name without any pattern matching, start a
       
   413     name with "path:".  These path names must match completely, from
       
   414     the root of the current repository.
       
   415 
       
   416     To use an extended glob, start a name with "glob:".  Globs are
       
   417     rooted at the current directory; a glob such as "*.c" will match
       
   418     files ending in ".c" in the current directory only.
       
   419 
       
   420     The supported glob syntax extensions are "**" to match any string
       
   421     across path separators, and "{a,b}" to mean "a or b".
       
   422 
       
   423     To use a Perl/Python regular expression, start a name with "re:".
       
   424     Regexp pattern matching is anchored at the root of the repository.
       
   425 
       
   426     Plain examples:
       
   427 
       
   428     path:foo/bar   a name bar in a directory named foo in the root of
       
   429                    the repository
       
   430     path:path:name a file or directory named "path:name"
       
   431 
       
   432     Glob examples:
       
   433 
       
   434     glob:*.c       any name ending in ".c" in the current directory
       
   435     *.c            any name ending in ".c" in the current directory
       
   436     **.c           any name ending in ".c" in the current directory, or
       
   437                    any subdirectory
       
   438     foo/*.c        any name ending in ".c" in the directory foo
       
   439     foo/**.c       any name ending in ".c" in the directory foo, or any
       
   440                    subdirectory
       
   441 
       
   442     Regexp examples:
       
   443 
       
   444     re:.*\.c$      any name ending in ".c", anywhere in the repsitory
       
   445 
       
   446 
   401 SPECIFYING SINGLE REVISIONS
   447 SPECIFYING SINGLE REVISIONS
   402 ---------------------------
   448 ---------------------------
   403 
   449 
   404     Mercurial accepts several notations for identifying individual
   450     Mercurial accepts several notations for identifying individual
   405     revisions.
   451     revisions.