mercurial/help.py
author Matt Mackall <mpm@selenic.com>
Tue, 05 Dec 2006 16:36:06 -0600
changeset 3802 eb66d76c7746
parent 3801 6f0c42d50394
child 3813 6fa11a9d7cac
permissions -rw-r--r--
move patterns topics
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3798
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
# help.py - help data for mercurial
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
#
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
# Copyright 2006 Matt Mackall <mpm@selenic.com>
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
#
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
# This software may be used and distributed according to the terms
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     6
# of the GNU General Public License, incorporated herein by reference.
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     7
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     8
helptable = {
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
    "dates|Date Formats":
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
    r'''
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
    Some commands (backout, commit, tag) allow the user to specify a date.
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
    Possible formats for dates are:
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    14
YYYY-mm-dd \HH:MM[:SS] [(+|-)NNNN]::
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    15
    This is a subset of ISO 8601, allowing just the recommended notations
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    16
    for date and time. The last part represents the timezone; if omitted,
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    17
    local time is assumed. Examples:
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    18
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    19
    "2005-08-22 03:27 -0700"
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    20
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    21
    "2006-04-19 21:39:51"
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    22
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
aaa bbb dd HH:MM:SS YYYY [(+|-)NNNN]::
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    24
    This is the date format used by the C library. Here, aaa stands for
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    25
    abbreviated weekday name and bbb for abbreviated month name. The last
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
    part represents the timezone; if omitted, local time is assumed.
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
    Examples:
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    28
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    29
    "Mon Aug 22 03:27:00 2005 -0700"
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    30
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    31
    "Wed Apr 19 21:39:51 2006"
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33
unixtime offset::
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    34
    This is the internal representation format for dates. unixtime is
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    35
    the number of seconds since the epoch (1970-01-01 00:00 UTC). offset
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
    is the offset of the local timezone, in seconds west of UTC (negative
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    37
    if the timezone is east of UTC).
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    38
    Examples:
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    39
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    40
    "1124706420 25200" (2005-08-22 03:27:00 -0700)
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    41
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    42
    "1145475591 -7200" (2006-04-19 21:39:51 +0200)
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    43
    ''',
3802
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
    44
3801
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    45
    'environment|env|Environment Variables':
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    46
    r'''
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    47
HGEDITOR::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    48
    This is the name of the editor to use when committing. Defaults to the
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    49
    value of EDITOR.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    50
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    51
    (deprecated, use .hgrc)
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    52
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    53
HGENCODING::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    54
    This overrides the default locale setting detected by Mercurial.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    55
    This setting is used to convert data including usernames,
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    56
    changeset descriptions, tag names, and branches. This setting can
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    57
    be overridden with the --encoding command-line option.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    58
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    59
HGENCODINGMODE::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    60
    This sets Mercurial's behavior for handling unknown characters
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    61
    while transcoding user inputs. The default is "strict", which
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    62
    causes Mercurial to abort if it can't translate a character. Other
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    63
    settings include "replace", which replaces unknown characters, and
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    64
    "ignore", which drops them. This setting can be overridden with
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    65
    the --encodingmode command-line option.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    66
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    67
HGMERGE::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    68
    An executable to use for resolving merge conflicts. The program
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    69
    will be executed with three arguments: local file, remote file,
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    70
    ancestor file.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    71
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    72
    The default program is "hgmerge", which is a shell script provided
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    73
    by Mercurial with some sensible defaults.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    74
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    75
    (deprecated, use .hgrc)
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    76
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    77
HGRCPATH::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    78
    A list of files or directories to search for hgrc files.  Item
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    79
    separator is ":" on Unix, ";" on Windows.  If HGRCPATH is not set,
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    80
    platform default search path is used.  If empty, only .hg/hgrc of
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    81
    current repository is read.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    82
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    83
    For each element in path, if a directory, all entries in directory
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    84
    ending with ".rc" are added to path.  Else, element itself is
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    85
    added to path.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    86
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    87
HGUSER::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    88
    This is the string used for the author of a commit.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    89
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    90
    (deprecated, use .hgrc)
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    91
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    92
EMAIL::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    93
    If HGUSER is not set, this will be used as the author for a commit.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    94
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    95
LOGNAME::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    96
    If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    97
    '@hostname' appended) as the author value for a commit.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    98
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
    99
EDITOR::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
   100
    This is the name of the editor used in the hgmerge script. It will be
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
   101
    used for commit messages if HGEDITOR isn't set. Defaults to 'vi'.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
   102
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
   103
PYTHONPATH::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
   104
    This is used by Python to find imported modules and may need to be set
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
   105
    appropriately if Mercurial is not installed system-wide.
3802
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   106
    ''',
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   107
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   108
    "patterns|File Name Patterns": r'''
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   109
    Mercurial accepts several notations for identifying one or more
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   110
    files at a time.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   111
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   112
    By default, Mercurial treats filenames as shell-style extended
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   113
    glob patterns.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   114
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   115
    Alternate pattern notations must be specified explicitly.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   116
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   117
    To use a plain path name without any pattern matching, start a
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   118
    name with "path:".  These path names must match completely, from
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   119
    the root of the current repository.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   120
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   121
    To use an extended glob, start a name with "glob:".  Globs are
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   122
    rooted at the current directory; a glob such as "*.c" will match
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   123
    files ending in ".c" in the current directory only.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   124
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   125
    The supported glob syntax extensions are "**" to match any string
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   126
    across path separators, and "{a,b}" to mean "a or b".
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   127
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   128
    To use a Perl/Python regular expression, start a name with "re:".
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   129
    Regexp pattern matching is anchored at the root of the repository.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   130
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   131
    Plain examples:
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   132
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   133
    path:foo/bar   a name bar in a directory named foo in the root of
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   134
                   the repository
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   135
    path:path:name a file or directory named "path:name"
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   136
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   137
    Glob examples:
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   138
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   139
    glob:*.c       any name ending in ".c" in the current directory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   140
    *.c            any name ending in ".c" in the current directory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   141
    **.c           any name ending in ".c" in the current directory, or
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   142
                   any subdirectory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   143
    foo/*.c        any name ending in ".c" in the directory foo
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   144
    foo/**.c       any name ending in ".c" in the directory foo, or any
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   145
                   subdirectory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   146
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   147
    Regexp examples:
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   148
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   149
    re:.*\.c$      any name ending in ".c", anywhere in the repository
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   150
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3801
diff changeset
   151
''',
3798
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   152
}
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   153