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