doc/hg.1.txt
author Matt Mackall <mpm@selenic.com>
Thu, 27 Dec 2007 23:55:39 -0600
changeset 5729 73646515c435
parent 5661 ba40e267762b
child 6446 ee5313bc3c0c
child 6487 9e3bddb5fae2
permissions -rw-r--r--
bisect: slightly improve the help message
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     1
HG(1)
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     2
=====
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     3
Matt Mackall <mpm@selenic.com>
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     4
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     5
NAME
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     6
----
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
     7
hg - Mercurial source code management system
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     8
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     9
SYNOPSIS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    10
--------
3544
4745cf66f77d Corrected hg synopsis.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3287
diff changeset
    11
'hg' [global option]... <command> [command/global option]... [argument]...
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    12
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    13
DESCRIPTION
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    14
-----------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    15
The hg(1) command provides a command line interface to the Mercurial system.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    16
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    17
COMMAND ELEMENTS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    18
----------------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    19
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    20
files ...::
724
1c0c413cccdd Get add and locate to use new repo and dirstate walk code.
Bryan O'Sullivan <bos@serpentine.com>
parents: 671
diff changeset
    21
    indicates one or more filename or relative path filenames; see
1c0c413cccdd Get add and locate to use new repo and dirstate walk code.
Bryan O'Sullivan <bos@serpentine.com>
parents: 671
diff changeset
    22
    "FILE NAME PATTERNS" for information on pattern matching
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    23
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    24
path::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    25
    indicates a path on the local machine
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    26
478
f1804f2e7f35 Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents: 438
diff changeset
    27
revision::
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
    28
    indicates a changeset which can be specified as a changeset revision
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
    29
    number, a tag, or a unique substring of the changeset hash value
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    30
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    31
repository path::
498
8cf3999b3d03 Various doc clean-ups and spelling fixes
mpm@selenic.com
parents: 497
diff changeset
    32
    either the pathname of a local repository or the URI of a remote
181
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
    33
    repository.  There are two available URI protocols, http:// which is
2431
d90a9d7c7d4d replace old-http:// syntax by static-http:// and deprecate the redundant hg://
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2209
diff changeset
    34
    fast and the static-http:// protocol which is much slower but does not
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
    35
    require a special server on the web host.
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    36
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
    37
1814
7956893e8458 generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1758
diff changeset
    38
include::hg.1.gendoc.txt[]
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
    39
580
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    40
SPECIFYING SINGLE REVISIONS
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    41
---------------------------
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    42
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    43
    Mercurial accepts several notations for identifying individual
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    44
    revisions.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    45
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    46
    A plain integer is treated as a revision number.  Negative
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    47
    integers are treated as offsets from the tip, with -1 denoting the
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    48
    tip.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    49
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    50
    A 40-digit hexadecimal string is treated as a unique revision
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    51
    identifier.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    52
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    53
    A hexadecimal string less than 40 characters long is treated as a
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    54
    unique revision identifier, and referred to as a short-form
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    55
    identifier.  A short-form identifier is only valid if it is the
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    56
    prefix of one full-length identifier.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    57
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    58
    Any other string is treated as a tag name, which is a symbolic
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    59
    name associated with a revision identifier.  Tag names may not
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    60
    contain the ":" character.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    61
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    62
    The reserved name "tip" is a special tag that always identifies
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    63
    the most recent revision.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    64
5296
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    65
    The reserved name "null" indicates the null revision. This is the
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    66
    revision of an empty repository, and the parent of revision 0.
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    67
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    68
    The reserved name "." indicates the working directory parent. If
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    69
    no working directory is checked out, it is equivalent to null.
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    70
    If an uncommitted merge is in progress, "." is the revision of
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    71
    the first parent.
c8efd19e248c Document pseudo-tags "null" and ".".
Brendan Cully <brendan@kublai.com>
parents: 4635
diff changeset
    72
580
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    73
SPECIFYING MULTIPLE REVISIONS
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    74
-----------------------------
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    75
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    76
    When Mercurial accepts more than one revision, they may be
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    77
    specified individually, or provided as a continuous range,
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    78
    separated by the ":" character.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    79
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    80
    The syntax of range notation is [BEGIN]:[END], where BEGIN and END
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    81
    are revision identifiers.  Both BEGIN and END are optional.  If
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    82
    BEGIN is not specified, it defaults to revision number 0.  If END
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    83
    is not specified, it defaults to the tip.  The range ":" thus
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    84
    means "all revisions".
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    85
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    86
    If BEGIN is greater than END, revisions are treated in reverse
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    87
    order.
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    88
860
8ccbac05cf59 Use correct term "closed interval" for ranges.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 840
diff changeset
    89
    A range acts as a closed interval.  This means that a range of 3:5
580
353a2ce50423 [PATCH] New export patch
mpm@selenic.com
parents: 553
diff changeset
    90
    gives 3, 4 and 5.  Similarly, a range of 4:2 gives 4, 3, and 2.
196
48827121af7e add export, recover, and undo to the man page
jake@edge2.net
parents: 182
diff changeset
    91
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    92
FILES
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    93
-----
5576
1c1ef561d541 doc: add repo/ to .hgignore and .hgtags
Matt Mackall <mpm@selenic.com>
parents: 5296
diff changeset
    94
 repo/.hgignore::
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
    95
    This file contains regular expressions (one per line) that describe file
2209
956e329f9e13 document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2031
diff changeset
    96
    names that should be ignored by hg. For details, see hgignore(5).
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    97
5576
1c1ef561d541 doc: add repo/ to .hgignore and .hgtags
Matt Mackall <mpm@selenic.com>
parents: 5296
diff changeset
    98
 repo/.hgtags::
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
    99
    This file contains changeset hash values and text tag names (one of each
1045
b35d5b86e240 run the doc/* through aspell.
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1036
diff changeset
   100
    separated by spaces) that correspond to tagged versions of the repository
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   101
    contents.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   102
951
859de3ebc041 Read global config file /etc/mercurial/hgrc and fix reading hgrc on Windows.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 940
diff changeset
   103
 /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc::
438
b38deaf7873e Update docs
mpm@selenic.com
parents: 330
diff changeset
   104
    This file contains defaults and configuration. Values in .hg/hgrc
951
859de3ebc041 Read global config file /etc/mercurial/hgrc and fix reading hgrc on Windows.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 940
diff changeset
   105
    override those in $HOME/.hgrc, and these override settings made in the
859de3ebc041 Read global config file /etc/mercurial/hgrc and fix reading hgrc on Windows.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 940
diff changeset
   106
    global /etc/mercurial/hgrc configuration.  See hgrc(5) for details of
859de3ebc041 Read global config file /etc/mercurial/hgrc and fix reading hgrc on Windows.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 940
diff changeset
   107
    the contents and format of these files.
321
73b8a8a059ec Transparent proxy support
mpm@selenic.com
parents: 196
diff changeset
   108
3021
b9dbbcf8a488 Document the fact that revert might overwrite .orig files
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2859
diff changeset
   109
Some commands (e.g. revert) produce backup files ending in .orig, if
b9dbbcf8a488 Document the fact that revert might overwrite .orig files
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2859
diff changeset
   110
the .orig file already exists and is not tracked by Mercurial, it
b9dbbcf8a488 Document the fact that revert might overwrite .orig files
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2859
diff changeset
   111
will be overwritten.
b9dbbcf8a488 Document the fact that revert might overwrite .orig files
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2859
diff changeset
   112
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   113
BUGS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   114
----
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   115
Probably lots, please post them to the mailing list (See Resources below)
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   116
when you find them.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   117
671
efa4a7e2f322 Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents: 631
diff changeset
   118
SEE ALSO
efa4a7e2f322 Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents: 631
diff changeset
   119
--------
2209
956e329f9e13 document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2031
diff changeset
   120
hgignore(5), hgrc(5)
671
efa4a7e2f322 Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents: 631
diff changeset
   121
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   122
AUTHOR
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   123
------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   124
Written by Matt Mackall <mpm@selenic.com>
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   125
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   126
RESOURCES
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   127
---------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   128
http://selenic.com/mercurial[Main Web Site]
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   129
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   130
http://selenic.com/hg[Source code repository]
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   131
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   132
http://selenic.com/mailman/listinfo/mercurial[Mailing list]
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   133
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   134
COPYING
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   135
-------
4635
63b9d2deed48 Updated copyright notices and add "and others" to "hg version"
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3799
diff changeset
   136
Copyright \(C) 2005-2007 Matt Mackall.
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   137
Free use of this software is granted under the terms of the GNU General
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   138
Public License (GPL).