author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
Mon, 03 Nov 2008 16:31:47 +0100 | |
changeset 7307 | 56380212d630 |
parent 7298 | 0e2e371c7406 |
child 7328 | 3909e2c2622b |
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 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
8 |
from i18n import _ |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
9 |
|
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
10 |
helptable = ( |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
11 |
(["dates"], _("Date Formats"), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
12 |
_(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
|
13 |
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
|
14 |
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
|
15 |
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
|
16 |
|
1f733c2f0165
Document log date ranges and mention 'hg help dates' for all commands (issue998)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6009
diff
changeset
|
17 |
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
|
18 |
|
3811 | 19 |
"Wed Dec 6 13:18:29 2006" (local timezone assumed) |
20 |
"Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
21 |
"Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
22 |
"Dec 6" (midnight) |
|
23 |
"13:18" (today assumed) |
|
24 |
"3:39" (3:39AM assumed) |
|
25 |
"3:39pm" (15:39) |
|
6773 | 26 |
"2006-12-06 13:18:29" (ISO 8601 format) |
3811 | 27 |
"2006-12-6 13:18" |
28 |
"2006-12-6" |
|
29 |
"12-6" |
|
30 |
"12/6" |
|
31 |
"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
|
32 |
|
3811 | 33 |
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
|
34 |
|
3811 | 35 |
"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
|
36 |
|
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
37 |
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
|
38 |
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
|
39 |
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
|
40 |
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
|
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 |
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
|
43 |
|
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}" - 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
|
45 |
">{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
|
46 |
"{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
|
47 |
"-{days}" - within a given number of days of today |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
48 |
''')), |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
49 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
50 |
(["patterns"], _("File Name Patterns"), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
51 |
_(r''' |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
52 |
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
|
53 |
files at a time. |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
54 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
55 |
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
|
56 |
glob patterns. |
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 |
Alternate pattern notations must be specified explicitly. |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
59 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
60 |
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
|
61 |
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
|
62 |
the root of the current repository. |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
63 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
64 |
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
|
65 |
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
|
66 |
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
|
67 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
68 |
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
|
69 |
across path separators, and "{a,b}" to mean "a or b". |
3799 | 70 |
|
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
71 |
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
|
72 |
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
|
73 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
74 |
Plain examples: |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
75 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
76 |
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
|
77 |
the repository |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
78 |
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
|
79 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
80 |
Glob examples: |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
81 |
|
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
82 |
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
|
83 |
*.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
|
84 |
**.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
|
85 |
any subdirectory |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
86 |
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
|
87 |
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
|
88 |
subdirectory |
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 |
Regexp examples: |
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 |
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
|
93 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
94 |
''')), |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
95 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
96 |
(['environment', 'env'], _('Environment Variables'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
97 |
_(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
|
98 |
HG:: |
5062
3d35c8cb5eb4
Simplify/correct finding the hg executable (fixes issue644)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4686
diff
changeset
|
99 |
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
|
100 |
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
|
101 |
'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
|
102 |
|
3798 | 103 |
HGEDITOR:: |
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
104 |
This is the name of the editor to use when committing. See EDITOR. |
3798 | 105 |
|
106 |
(deprecated, use .hgrc) |
|
107 |
||
108 |
HGENCODING:: |
|
109 |
This overrides the default locale setting detected by Mercurial. |
|
110 |
This setting is used to convert data including usernames, |
|
111 |
changeset descriptions, tag names, and branches. This setting can |
|
112 |
be overridden with the --encoding command-line option. |
|
113 |
||
114 |
HGENCODINGMODE:: |
|
115 |
This sets Mercurial's behavior for handling unknown characters |
|
116 |
while transcoding user inputs. The default is "strict", which |
|
117 |
causes Mercurial to abort if it can't translate a character. Other |
|
118 |
settings include "replace", which replaces unknown characters, and |
|
119 |
"ignore", which drops them. This setting can be overridden with |
|
120 |
the --encodingmode command-line option. |
|
121 |
||
122 |
HGMERGE:: |
|
123 |
An executable to use for resolving merge conflicts. The program |
|
124 |
will be executed with three arguments: local file, remote file, |
|
125 |
ancestor file. |
|
126 |
||
127 |
(deprecated, use .hgrc) |
|
128 |
||
129 |
HGRCPATH:: |
|
130 |
A list of files or directories to search for hgrc files. Item |
|
131 |
separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, |
|
132 |
platform default search path is used. If empty, only .hg/hgrc of |
|
133 |
current repository is read. |
|
134 |
||
135 |
For each element in path, if a directory, all entries in directory |
|
136 |
ending with ".rc" are added to path. Else, element itself is |
|
137 |
added to path. |
|
138 |
||
139 |
HGUSER:: |
|
140 |
This is the string used for the author of a commit. |
|
141 |
||
142 |
(deprecated, use .hgrc) |
|
143 |
||
144 |
EMAIL:: |
|
145 |
If HGUSER is not set, this will be used as the author for a commit. |
|
146 |
||
147 |
LOGNAME:: |
|
148 |
If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
|
149 |
'@hostname' appended) as the author value for a commit. |
|
150 |
||
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
151 |
VISUAL:: |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
152 |
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
|
153 |
|
3798 | 154 |
EDITOR:: |
6009
f077815932ce
filemerge: remove the hgmerge script
Matt Mackall <mpm@selenic.com>
parents:
5660
diff
changeset
|
155 |
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
|
156 |
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
|
157 |
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
|
158 |
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
|
159 |
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
|
160 |
defaults to 'vi'. |
3798 | 161 |
|
162 |
PYTHONPATH:: |
|
163 |
This is used by Python to find imported modules and may need to be set |
|
164 |
appropriately if Mercurial is not installed system-wide. |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
165 |
''')), |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
166 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
167 |
(['revs', 'revisions'], _('Specifying Single Revisions'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
168 |
_(r''' |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
169 |
Mercurial accepts several notations for identifying individual |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
170 |
revisions. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
171 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
172 |
A plain integer is treated as a revision number. Negative |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
173 |
integers are treated as offsets from the tip, with -1 denoting the |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
174 |
tip. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
175 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
176 |
A 40-digit hexadecimal string is treated as a unique revision |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
177 |
identifier. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
178 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
179 |
A hexadecimal string less than 40 characters long is treated as a |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
180 |
unique revision identifier, and referred to as a short-form |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
181 |
identifier. A short-form identifier is only valid if it is the |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
182 |
prefix of one full-length identifier. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
183 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
184 |
Any other string is treated as a tag name, which is a symbolic |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
185 |
name associated with a revision identifier. Tag names may not |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
186 |
contain the ":" character. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
187 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
188 |
The reserved name "tip" is a special tag that always identifies |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
189 |
the most recent revision. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
190 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
191 |
The reserved name "null" indicates the null revision. This is the |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
192 |
revision of an empty repository, and the parent of revision 0. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
193 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
194 |
The reserved name "." indicates the working directory parent. If |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
195 |
no working directory is checked out, it is equivalent to null. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
196 |
If an uncommitted merge is in progress, "." is the revision of |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
197 |
the first parent. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
198 |
''')), |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
199 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
200 |
(['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
201 |
_(r''' |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
202 |
When Mercurial accepts more than one revision, they may be |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
203 |
specified individually, or provided as a continuous range, |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
204 |
separated by the ":" character. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
205 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
206 |
The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
207 |
are revision identifiers. Both BEGIN and END are optional. If |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
208 |
BEGIN is not specified, it defaults to revision number 0. If END |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
209 |
is not specified, it defaults to the tip. The range ":" thus |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
210 |
means "all revisions". |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
211 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
212 |
If BEGIN is greater than END, revisions are treated in reverse |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
213 |
order. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
214 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
215 |
A range acts as a closed interval. This means that a range of 3:5 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
216 |
gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
217 |
''')), |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
218 |
|
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
219 |
(['gitdiffs'], _('Using git Diffs'), |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
220 |
_(r''' |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
221 |
In several places, Mercurial supports two separate variations on |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
222 |
the unified diff format: normal diffs, as are de facto standardized |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
223 |
by GNU's patch utility, and git diffs, invented for the git VCS. |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
224 |
|
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
225 |
The git diff format is an addition of some information to the normal |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
226 |
diff format, which allows diff to convey changes in file permissions |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
227 |
as well as the creation, deletion, renaming and copying of files, as |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
228 |
well as diffs for binary files (unsupported by standard diff), |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
229 |
operations which are very useful to modern version control systems |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
230 |
such as Mercurial, in trying to faithfully replay your changes. |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
231 |
|
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
232 |
In building Mercurial, we made a choice to support the git diff |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
233 |
format, but we haven't made it the default. This is because for a |
7298
0e2e371c7406
kill some trailing spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7293
diff
changeset
|
234 |
long time, the format for unified diffs we usually use has been |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
235 |
defined by GNU patch, and it doesn't (yet) support git's extensions |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
236 |
to the diff format. This means that, when extracting diffs from a |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
237 |
Mercurial repository (through the diff command, for example), you |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
238 |
must be careful about things like file copies and renames (file |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
239 |
creation and deletion are mostly handled fine by the traditional |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
240 |
diff format, with some rare edge cases for which the git extensions |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
241 |
can be used). Mercurial's internal operations (like push and pull) |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
242 |
are not affected by these differences, because they use a different, |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
243 |
binary format for communicating changes. |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
244 |
|
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
245 |
To use git diffs, use the --git option for relevant commands, or |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
246 |
enable them in a hgrc, setting 'git = True' in the [diff] section. |
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
247 |
''')), |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
248 |
) |