author | Dongsheng Song <dongsheng.song@gmail.com> |
Thu, 05 Mar 2009 14:44:13 +0800 | |
changeset 7828 | f51e2263d2aa |
parent 7808 | 5b010dae99c3 |
child 7879 | 5c4026a289a4 |
child 7887 | 4b76746a988b |
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''' |
7764
14a42208d8af
help: better formatting in "Date Formats" section
timeless <timeless@gmail.com>
parents:
7693
diff
changeset
|
13 |
Some commands allow the user to specify a date, e.g.: |
14a42208d8af
help: better formatting in "Date Formats" section
timeless <timeless@gmail.com>
parents:
7693
diff
changeset
|
14 |
* backout, commit, import, tag: Specify the commit date. |
14a42208d8af
help: better formatting in "Date Formats" section
timeless <timeless@gmail.com>
parents:
7693
diff
changeset
|
15 |
* log, revert, update: Select revision(s) by date. |
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
|
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 |
|
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
44 |
"<{datetime}" - at or before a given date/time |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
45 |
">{datetime}" - on or after a given date/time |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
46 |
"{datetime} to {datetime}" - a date range, inclusive |
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
|
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 |
|
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
60 |
To use a plain path name without any pattern matching, start it |
7808
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
61 |
with "path:". These path names must completely match starting at |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
62 |
the current repository root. |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
63 |
|
7808
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
64 |
To use an extended glob, start a name with "glob:". Globs are |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
65 |
rooted at the current directory; a glob such as "*.c" will only |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
66 |
match files in the current directory ending with ".c". |
6654
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 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
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 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
84 |
**.c any name ending in ".c" in any subdirectory of the |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
85 |
current directory including itself. |
6654
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 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
87 |
foo/**.c any name ending in ".c" in any subdirectory of foo |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
88 |
including itself. |
6654
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, |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
100 |
extensions or external tools. If unset or empty, this is the hg |
7828 | 101 |
executable's name if it's frozen, or an executable named 'hg' |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
102 |
(with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
103 |
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
|
104 |
|
3798 | 105 |
HGEDITOR:: |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
106 |
This is the name of the editor to run when committing. See EDITOR. |
3798 | 107 |
|
108 |
(deprecated, use .hgrc) |
|
109 |
||
110 |
HGENCODING:: |
|
111 |
This overrides the default locale setting detected by Mercurial. |
|
112 |
This setting is used to convert data including usernames, |
|
113 |
changeset descriptions, tag names, and branches. This setting can |
|
114 |
be overridden with the --encoding command-line option. |
|
115 |
||
116 |
HGENCODINGMODE:: |
|
117 |
This sets Mercurial's behavior for handling unknown characters |
|
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
118 |
while transcoding user input. The default is "strict", which |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
119 |
causes Mercurial to abort if it can't map a character. Other |
3798 | 120 |
settings include "replace", which replaces unknown characters, and |
121 |
"ignore", which drops them. This setting can be overridden with |
|
122 |
the --encodingmode command-line option. |
|
123 |
||
124 |
HGMERGE:: |
|
125 |
An executable to use for resolving merge conflicts. The program |
|
126 |
will be executed with three arguments: local file, remote file, |
|
127 |
ancestor file. |
|
128 |
||
129 |
(deprecated, use .hgrc) |
|
130 |
||
131 |
HGRCPATH:: |
|
7808
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
132 |
A list of files or directories to search for hgrc files. Item |
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
133 |
separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, |
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
134 |
platform default search path is used. If empty, only the .hg/hgrc |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
135 |
from the current repository is read. |
3798 | 136 |
|
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
137 |
For each element in HGRCPATH: |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
138 |
* if it's a directory, all directories ending with .rc are added |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
139 |
* otherwise, the directory itself will be added |
3798 | 140 |
|
141 |
HGUSER:: |
|
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
142 |
This is the string used as the author of a commit. If not set, |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
143 |
available values will be considered in this order: |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
144 |
|
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
145 |
* HGUSER (deprecated) |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
146 |
* hgrc files from the HGRCPATH |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
147 |
|
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
148 |
* interactive prompt |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
149 |
* LOGNAME (with '@hostname' appended) |
3798 | 150 |
|
151 |
(deprecated, use .hgrc) |
|
152 |
||
153 |
EMAIL:: |
|
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
154 |
May be used as the author of a commit; see HGUSER. |
3798 | 155 |
|
156 |
LOGNAME:: |
|
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
157 |
May be used as the author of a commit; see HGUSER. |
3798 | 158 |
|
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
159 |
VISUAL:: |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
160 |
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
|
161 |
|
3798 | 162 |
EDITOR:: |
6009
f077815932ce
filemerge: remove the hgmerge script
Matt Mackall <mpm@selenic.com>
parents:
5660
diff
changeset
|
163 |
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
|
164 |
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
|
165 |
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
|
166 |
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
|
167 |
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
|
168 |
defaults to 'vi'. |
3798 | 169 |
|
170 |
PYTHONPATH:: |
|
171 |
This is used by Python to find imported modules and may need to be set |
|
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
172 |
appropriately if this Mercurial is not installed system-wide. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
173 |
''')), |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
174 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
175 |
(['revs', 'revisions'], _('Specifying Single Revisions'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
176 |
_(r''' |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
177 |
Mercurial supports several ways to specify individual |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
178 |
revisions. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
179 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
180 |
A plain integer is treated as a revision number. Negative |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
181 |
integers are treated as toplogical offsets from the tip, with |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
182 |
-1 denoting the tip. As such, negative numbers are only useful |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
183 |
if you've memorized your local tree numbers and want to save |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
184 |
typing a single digit. This editor suggests copy and paste. |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
185 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
186 |
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
|
187 |
identifier. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
188 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
189 |
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
|
190 |
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
|
191 |
identifier. A short-form identifier is only valid if it is the |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
192 |
prefix of exactly one full-length identifier. |
6655
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 |
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
|
195 |
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
|
196 |
contain the ":" character. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
197 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
198 |
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
|
199 |
the most recent revision. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
200 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
201 |
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
|
202 |
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
|
203 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
204 |
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
|
205 |
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
|
206 |
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
|
207 |
the first parent. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
208 |
''')), |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
209 |
|
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
210 |
(['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
211 |
_(r''' |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
212 |
When Mercurial accepts more than one revision, they may be |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
213 |
specified individually, or provided as a topologically continuous |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
214 |
range, separated by the ":" character. |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
215 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
216 |
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
|
217 |
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
|
218 |
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
|
219 |
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
|
220 |
means "all revisions". |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
221 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
222 |
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
|
223 |
order. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
224 |
|
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
225 |
A range acts as a closed interval. This means that a range of 3:5 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
226 |
gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
227 |
''')), |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
228 |
|
7387 | 229 |
(['diffs'], _('Diff Formats'), |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
230 |
_(r''' |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
231 |
Mercurial's default format for showing changes between two versions |
7387 | 232 |
of a file is compatible with the unified format of GNU diff, which |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
233 |
can be used by GNU patch and many other standard tools. |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
234 |
|
7387 | 235 |
While this standard format is often enough, it does not encode the |
236 |
following information: |
|
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
237 |
|
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
238 |
- executable status and other permission bits |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
239 |
- copy or rename information |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
240 |
- changes in binary files |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
241 |
- creation or deletion of empty files |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
242 |
|
7387 | 243 |
Mercurial also supports the extended diff format from the git VCS |
244 |
which addresses these limitations. The git diff format is not |
|
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
245 |
produced by default because a few widespread tools still do not |
7387 | 246 |
understand this format. |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
247 |
|
7387 | 248 |
This means that when generating diffs from a Mercurial repository |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
249 |
(e.g. with "hg export"), you should be careful about things like |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
250 |
file copies and renames or other things mentioned above, because |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
251 |
when applying a standard diff to a different repository, this extra |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
252 |
information is lost. Mercurial's internal operations (like push and |
7387 | 253 |
pull) are not affected by this, because they use an internal binary |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
254 |
format for communicating changes. |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
255 |
|
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
256 |
To make Mercurial produce the git extended diff format, use the |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
257 |
--git option available for many commands, or set 'git = True' in the |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
258 |
[diff] section of your hgrc. You do not need to set this option when |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
259 |
importing diffs in this format or using them in the mq extension. |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
260 |
''')), |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
261 |
(['templating'], _('Template Usage'), |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
262 |
_(r''' |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
263 |
Mercurial allows you to customize output of commands through |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
264 |
templates. You can either pass in a template from the command line, |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
265 |
via the --template option, or select an existing template-style (--style). |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
266 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
267 |
You can customize output for any "log-like" command: log, outgoing, |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
268 |
incoming, tip, parents, heads and glog. |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
269 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
270 |
Three styles are packaged with Mercurial: default (the style used |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
271 |
when no explicit preference is passed), compact and changelog. Usage: |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
272 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
273 |
$ hg log -r1 --style changelog |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
274 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
275 |
A template is a piece of text, with markup to invoke variable expansion: |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
276 |
|
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
277 |
$ hg log -r1 --template "{node}\n" |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
278 |
b56ce7b07c52de7d5fd79fb89701ea538af65746 |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
279 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
280 |
Strings in curly braces are called keywords. The availability of |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
281 |
keywords depends on the exact context of the templater. These keywords |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
282 |
are usually available for templating a log-like command: |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
283 |
|
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
284 |
- author: String. The unmodified author of the changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
285 |
- branches: String. The name of the branch on which the changeset |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
286 |
was committed. Will be empty if the branch name was default. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
287 |
- date: Date information. The date when the changeset was committed. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
288 |
- desc: String. The text of the changeset description. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
289 |
- files: List of strings. All files modified, added, or removed by |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
290 |
this changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
291 |
- file_adds: List of strings. Files added by this changeset. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
292 |
- file_mods: List of strings. Files modified by this changeset. |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
293 |
- file_dels: List of strings. Files removed by this changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
294 |
- node: String. The changeset identification hash, as a 40-character |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
295 |
hexadecimal string. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
296 |
- parents: List of strings. The parents of the changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
297 |
- rev: Integer. The repository-local changeset revision number. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
298 |
- tags: List of strings. Any tags associated with the changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
299 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
300 |
The "date" keyword does not produce human-readable output. If you |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
301 |
want to use a date in your output, you can use a filter to process it. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
302 |
Filters are functions which return a string based on the input variable. |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
303 |
You can also use a chain of filters to get the desired output: |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
304 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
305 |
$ hg tip --template "{date|isodate}\n" |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
306 |
2008-08-21 18:22 +0000 |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
307 |
|
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
308 |
List of filters: |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
309 |
|
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
310 |
- addbreaks: Any text. Add an XHTML "<br />" tag before the end of |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
311 |
every line except the last. |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
312 |
- age: Date. Returns a human-readable date/time difference between |
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
313 |
the given date/time and the current date/time. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
314 |
- basename: Any text. Treats the text as a path, and returns the |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
315 |
last component of the path after splitting by the path |
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
316 |
separator (ignoring trailing seprators). For example, |
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
317 |
"foo/bar/baz" becomes "baz" and "foo/bar//" becomes "bar". |
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
318 |
- date: Date. Returns a date in a Unix date format, including |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
319 |
the timezone: "Mon Sep 04 15:13:13 2006 0700". |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
320 |
- domain: Any text. Finds the first string that looks like an email |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
321 |
address, and extracts just the domain component. |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
322 |
Example: 'User <user@example.com>' becomes 'example.com'. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
323 |
- email: Any text. Extracts the first string that looks like an email |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
324 |
address. Example: 'User <user@example.com>' becomes |
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
325 |
'user@example.com'. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
326 |
- escape: Any text. Replaces the special XML/XHTML characters "&", |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
327 |
"<" and ">" with XML entities. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
328 |
- fill68: Any text. Wraps the text to fit in 68 columns. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
329 |
- fill76: Any text. Wraps the text to fit in 76 columns. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
330 |
- firstline: Any text. Returns the first line of text. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
331 |
- hgdate: Date. Returns the date as a pair of numbers: |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
332 |
"1157407993 25200" (Unix timestamp, timezone offset). |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
333 |
- isodate: Date. Returns the date in ISO 8601 format. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
334 |
- obfuscate: Any text. Returns the input text rendered as a sequence |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
335 |
of XML entities. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
336 |
- person: Any text. Returns the text before an email address. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
337 |
- rfc822date: Date. Returns a date using the same format used |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
338 |
in email headers. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
339 |
- short: Changeset hash. Returns the short form of a changeset hash, |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
340 |
i.e. a 12-byte hexadecimal string. |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
341 |
- shortdate: Date. Returns a date like "2006-09-18". |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
342 |
- strip: Any text. Strips all leading and trailing whitespace. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
343 |
- tabindent: Any text. Returns the text, with every line except the |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
344 |
first starting with a tab character. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
345 |
- urlescape: Any text. Escapes all "special" characters. For example, |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
346 |
"foo bar" becomes "foo%20bar". |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
347 |
- user: Any text. Returns the user portion of an email address. |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
348 |
''')), |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
349 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
350 |
(['urls'], _('Url Paths'), |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
351 |
_(r''' |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
352 |
Valid URLs are of the form: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
353 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
354 |
local/filesystem/path (or file://local/filesystem/path) |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
355 |
http://[user[:pass]@]host[:port]/[path] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
356 |
https://[user[:pass]@]host[:port]/[path] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
357 |
ssh://[user[:pass]@]host[:port]/[path] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
358 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
359 |
Paths in the local filesystem can either point to Mercurial |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
360 |
repositories or to bundle files (as created by 'hg bundle' or |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
361 |
'hg incoming --bundle'). |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
362 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
363 |
An optional identifier after # indicates a particular branch, tag, |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
364 |
or changeset to use from the remote repository. |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
365 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
366 |
Some features, such as pushing to http:// and https:// URLs are |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
367 |
only possible if the feature is explicitly enabled on the |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
368 |
remote Mercurial server. |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
369 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
370 |
Some notes about using SSH with Mercurial: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
371 |
- SSH requires an accessible shell account on the destination machine |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
372 |
and a copy of hg in the remote path or specified with as remotecmd. |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
373 |
- path is relative to the remote user's home directory by default. |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
374 |
Use an extra slash at the start of a path to specify an absolute path: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
375 |
ssh://example.com//tmp/repository |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
376 |
- Mercurial doesn't use its own compression via SSH; the right thing |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
377 |
to do is to configure it in your ~/.ssh/config, e.g.: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
378 |
Host *.mylocalnetwork.example.com |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
379 |
Compression no |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
380 |
Host * |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
381 |
Compression yes |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
382 |
Alternatively specify "ssh -C" as your ssh command in your hgrc or |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
383 |
with the --ssh command line option. |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
384 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
385 |
These urls can all be stored in your hgrc with path aliases under the |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
386 |
[paths] section like so: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
387 |
[paths] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
388 |
alias1 = URL1 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
389 |
alias2 = URL2 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
390 |
... |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
391 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
392 |
You can then use the alias for any command that uses a url (for example |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
393 |
'hg pull alias1' would pull from the 'alias1' path). |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
394 |
|
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
395 |
Two path aliases are special because they are used as defaults |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
396 |
when you do not provide the url to a command: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
397 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
398 |
default: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
399 |
When you create a repository with hg clone, the clone command saves |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
400 |
the location of the source repository as the new repository's |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
401 |
'default' path. This is then used when you omit path from push- |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
402 |
and pull-like commands (including in and out). |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
403 |
|
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
404 |
default-push: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
405 |
The push command will look for a path named 'default-push', and |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
406 |
prefer it over 'default' if both are defined. |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
407 |
''')), |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
408 |
) |