author | John Coomes <john.coomes@sun.com> |
Tue, 18 Dec 2007 12:45:30 -0800 | |
changeset 5747 | f75ca1b0c81e |
parent 5660 | 3c80ecdc1bcd |
child 6009 | f077815932ce |
permissions | -rw-r--r-- |
3795
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. |
3811 | 12 |
Many date formats are acceptible. Here are some examples: |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
13 |
|
3811 | 14 |
"Wed Dec 6 13:18:29 2006" (local timezone assumed) |
15 |
"Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
16 |
"Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
17 |
"Dec 6" (midnight) |
|
18 |
"13:18" (today assumed) |
|
19 |
"3:39" (3:39AM assumed) |
|
20 |
"3:39pm" (15:39) |
|
21 |
"2006-12-6 13:18:29" (ISO 8601 format) |
|
22 |
"2006-12-6 13:18" |
|
23 |
"2006-12-6" |
|
24 |
"12-6" |
|
25 |
"12/6" |
|
26 |
"12/6/6" (Dec 6 2006) |
|
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
27 |
|
3811 | 28 |
Lastly, there is Mercurial's internal format: |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
29 |
|
3811 | 30 |
"1165432709 0" (Wed Dec 6 13:18:29 2006 UTC) |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
31 |
|
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
32 |
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
|
33 |
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
|
34 |
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
|
35 |
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
|
36 |
''', |
3799 | 37 |
|
3798 | 38 |
'environment|env|Environment Variables': |
39 |
r''' |
|
4686
849f011dbf79
Remember path to 'hg' executable and pass to external tools and hooks as $HG.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3913
diff
changeset
|
40 |
HG:: |
5062
3d35c8cb5eb4
Simplify/correct finding the hg executable (fixes issue644)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4686
diff
changeset
|
41 |
Path to the 'hg' executable, automatically passed when running hooks, |
3d35c8cb5eb4
Simplify/correct finding the hg executable (fixes issue644)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4686
diff
changeset
|
42 |
extensions or external tools. If unset or empty, an executable named |
3d35c8cb5eb4
Simplify/correct finding the hg executable (fixes issue644)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4686
diff
changeset
|
43 |
'hg' (with com/exe/bat/cmd extension on Windows) is searched. |
4686
849f011dbf79
Remember path to 'hg' executable and pass to external tools and hooks as $HG.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3913
diff
changeset
|
44 |
|
3798 | 45 |
HGEDITOR:: |
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
46 |
This is the name of the editor to use when committing. See EDITOR. |
3798 | 47 |
|
48 |
(deprecated, use .hgrc) |
|
49 |
||
50 |
HGENCODING:: |
|
51 |
This overrides the default locale setting detected by Mercurial. |
|
52 |
This setting is used to convert data including usernames, |
|
53 |
changeset descriptions, tag names, and branches. This setting can |
|
54 |
be overridden with the --encoding command-line option. |
|
55 |
||
56 |
HGENCODINGMODE:: |
|
57 |
This sets Mercurial's behavior for handling unknown characters |
|
58 |
while transcoding user inputs. The default is "strict", which |
|
59 |
causes Mercurial to abort if it can't translate a character. Other |
|
60 |
settings include "replace", which replaces unknown characters, and |
|
61 |
"ignore", which drops them. This setting can be overridden with |
|
62 |
the --encodingmode command-line option. |
|
63 |
||
64 |
HGMERGE:: |
|
65 |
An executable to use for resolving merge conflicts. The program |
|
66 |
will be executed with three arguments: local file, remote file, |
|
67 |
ancestor file. |
|
68 |
||
69 |
The default program is "hgmerge", which is a shell script provided |
|
70 |
by Mercurial with some sensible defaults. |
|
71 |
||
72 |
(deprecated, use .hgrc) |
|
73 |
||
74 |
HGRCPATH:: |
|
75 |
A list of files or directories to search for hgrc files. Item |
|
76 |
separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, |
|
77 |
platform default search path is used. If empty, only .hg/hgrc of |
|
78 |
current repository is read. |
|
79 |
||
80 |
For each element in path, if a directory, all entries in directory |
|
81 |
ending with ".rc" are added to path. Else, element itself is |
|
82 |
added to path. |
|
83 |
||
84 |
HGUSER:: |
|
85 |
This is the string used for the author of a commit. |
|
86 |
||
87 |
(deprecated, use .hgrc) |
|
88 |
||
89 |
EMAIL:: |
|
90 |
If HGUSER is not set, this will be used as the author for a commit. |
|
91 |
||
92 |
LOGNAME:: |
|
93 |
If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
|
94 |
'@hostname' appended) as the author value for a commit. |
|
95 |
||
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
96 |
VISUAL:: |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
97 |
This is the name of the editor to use when committing. See EDITOR. |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
98 |
|
3798 | 99 |
EDITOR:: |
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
100 |
Sometimes Mercurial needs to open a text file in an editor for a user |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
101 |
to modify, for example when writing commit messages or when using the |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
102 |
hgmerge script. The editor it uses is determined by looking at the |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
103 |
environment variables HGEDITOR, VISUAL and EDITOR, in that order. The |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
104 |
first non-empty one is chosen. If all of them are empty, the editor |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
105 |
defaults to 'vi'. |
3798 | 106 |
|
107 |
PYTHONPATH:: |
|
108 |
This is used by Python to find imported modules and may need to be set |
|
109 |
appropriately if Mercurial is not installed system-wide. |
|
3799 | 110 |
''', |
111 |
||
112 |
"patterns|File Name Patterns": r''' |
|
113 |
Mercurial accepts several notations for identifying one or more |
|
114 |
files at a time. |
|
115 |
||
116 |
By default, Mercurial treats filenames as shell-style extended |
|
117 |
glob patterns. |
|
118 |
||
119 |
Alternate pattern notations must be specified explicitly. |
|
120 |
||
121 |
To use a plain path name without any pattern matching, start a |
|
122 |
name with "path:". These path names must match completely, from |
|
123 |
the root of the current repository. |
|
124 |
||
125 |
To use an extended glob, start a name with "glob:". Globs are |
|
126 |
rooted at the current directory; a glob such as "*.c" will match |
|
127 |
files ending in ".c" in the current directory only. |
|
128 |
||
129 |
The supported glob syntax extensions are "**" to match any string |
|
130 |
across path separators, and "{a,b}" to mean "a or b". |
|
131 |
||
132 |
To use a Perl/Python regular expression, start a name with "re:". |
|
133 |
Regexp pattern matching is anchored at the root of the repository. |
|
134 |
||
135 |
Plain examples: |
|
136 |
||
137 |
path:foo/bar a name bar in a directory named foo in the root of |
|
138 |
the repository |
|
139 |
path:path:name a file or directory named "path:name" |
|
140 |
||
141 |
Glob examples: |
|
142 |
||
143 |
glob:*.c any name ending in ".c" in the current directory |
|
144 |
*.c any name ending in ".c" in the current directory |
|
145 |
**.c any name ending in ".c" in the current directory, or |
|
146 |
any subdirectory |
|
147 |
foo/*.c any name ending in ".c" in the directory foo |
|
148 |
foo/**.c any name ending in ".c" in the directory foo, or any |
|
149 |
subdirectory |
|
150 |
||
151 |
Regexp examples: |
|
152 |
||
153 |
re:.*\.c$ any name ending in ".c", anywhere in the repository |
|
154 |
||
155 |
''', |
|
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
156 |
} |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
157 |