##// END OF EJS Templates
help: better explanations for some of the template filters...
Dirkjan Ochtman -
r7806:6d0cf2a2 default
parent child Browse files
Show More
@@ -1,403 +1,408 b''
1 # help.py - help data for mercurial
1 # help.py - help data for mercurial
2 #
2 #
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 from i18n import _
8 from i18n import _
9
9
10 helptable = (
10 helptable = (
11 (["dates"], _("Date Formats"),
11 (["dates"], _("Date Formats"),
12 _(r'''
12 _(r'''
13 Some commands allow the user to specify a date, e.g.:
13 Some commands allow the user to specify a date, e.g.:
14 * backout, commit, import, tag: Specify the commit date.
14 * backout, commit, import, tag: Specify the commit date.
15 * log, revert, update: Select revision(s) by date.
15 * log, revert, update: Select revision(s) by date.
16
16
17 Many date formats are valid. Here are some examples:
17 Many date formats are valid. Here are some examples:
18
18
19 "Wed Dec 6 13:18:29 2006" (local timezone assumed)
19 "Wed Dec 6 13:18:29 2006" (local timezone assumed)
20 "Dec 6 13:18 -0600" (year assumed, time offset provided)
20 "Dec 6 13:18 -0600" (year assumed, time offset provided)
21 "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
21 "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
22 "Dec 6" (midnight)
22 "Dec 6" (midnight)
23 "13:18" (today assumed)
23 "13:18" (today assumed)
24 "3:39" (3:39AM assumed)
24 "3:39" (3:39AM assumed)
25 "3:39pm" (15:39)
25 "3:39pm" (15:39)
26 "2006-12-06 13:18:29" (ISO 8601 format)
26 "2006-12-06 13:18:29" (ISO 8601 format)
27 "2006-12-6 13:18"
27 "2006-12-6 13:18"
28 "2006-12-6"
28 "2006-12-6"
29 "12-6"
29 "12-6"
30 "12/6"
30 "12/6"
31 "12/6/6" (Dec 6 2006)
31 "12/6/6" (Dec 6 2006)
32
32
33 Lastly, there is Mercurial's internal format:
33 Lastly, there is Mercurial's internal format:
34
34
35 "1165432709 0" (Wed Dec 6 13:18:29 2006 UTC)
35 "1165432709 0" (Wed Dec 6 13:18:29 2006 UTC)
36
36
37 This is the internal representation format for dates. unixtime is
37 This is the internal representation format for dates. unixtime is
38 the number of seconds since the epoch (1970-01-01 00:00 UTC). offset
38 the number of seconds since the epoch (1970-01-01 00:00 UTC). offset
39 is the offset of the local timezone, in seconds west of UTC (negative
39 is the offset of the local timezone, in seconds west of UTC (negative
40 if the timezone is east of UTC).
40 if the timezone is east of UTC).
41
41
42 The log command also accepts date ranges:
42 The log command also accepts date ranges:
43
43
44 "<{datetime}" - at or before a given date/time
44 "<{datetime}" - at or before a given date/time
45 ">{datetime}" - on or after a given date/time
45 ">{datetime}" - on or after a given date/time
46 "{datetime} to {datetime}" - a date range, inclusive
46 "{datetime} to {datetime}" - a date range, inclusive
47 "-{days}" - within a given number of days of today
47 "-{days}" - within a given number of days of today
48 ''')),
48 ''')),
49
49
50 (["patterns"], _("File Name Patterns"),
50 (["patterns"], _("File Name Patterns"),
51 _(r'''
51 _(r'''
52 Mercurial accepts several notations for identifying one or more
52 Mercurial accepts several notations for identifying one or more
53 files at a time.
53 files at a time.
54
54
55 By default, Mercurial treats filenames as shell-style extended
55 By default, Mercurial treats filenames as shell-style extended
56 glob patterns.
56 glob patterns.
57
57
58 Alternate pattern notations must be specified explicitly.
58 Alternate pattern notations must be specified explicitly.
59
59
60 To use a plain path name without any pattern matching, start it
60 To use a plain path name without any pattern matching, start it
61 with "path:". These path names must completely match starting at
61 with "path:". These path names must completely match starting at
62 the current repository root.
62 the current repository root.
63
63
64 To use an extended glob, start a name with "glob:". Globs are
64 To use an extended glob, start a name with "glob:". Globs are
65 rooted at the current directory; a glob such as "*.c" will only
65 rooted at the current directory; a glob such as "*.c" will only
66 match files in the current directory ending with ".c".
66 match files in the current directory ending with ".c".
67
67
68 The supported glob syntax extensions are "**" to match any string
68 The supported glob syntax extensions are "**" to match any string
69 across path separators and "{a,b}" to mean "a or b".
69 across path separators and "{a,b}" to mean "a or b".
70
70
71 To use a Perl/Python regular expression, start a name with "re:".
71 To use a Perl/Python regular expression, start a name with "re:".
72 Regexp pattern matching is anchored at the root of the repository.
72 Regexp pattern matching is anchored at the root of the repository.
73
73
74 Plain examples:
74 Plain examples:
75
75
76 path:foo/bar a name bar in a directory named foo in the root of
76 path:foo/bar a name bar in a directory named foo in the root of
77 the repository
77 the repository
78 path:path:name a file or directory named "path:name"
78 path:path:name a file or directory named "path:name"
79
79
80 Glob examples:
80 Glob examples:
81
81
82 glob:*.c any name ending in ".c" in the current directory
82 glob:*.c any name ending in ".c" in the current directory
83 *.c any name ending in ".c" in the current directory
83 *.c any name ending in ".c" in the current directory
84 **.c any name ending in ".c" in any subdirectory of the
84 **.c any name ending in ".c" in any subdirectory of the
85 current directory including itself.
85 current directory including itself.
86 foo/*.c any name ending in ".c" in the directory foo
86 foo/*.c any name ending in ".c" in the directory foo
87 foo/**.c any name ending in ".c" in any subdirectory of foo
87 foo/**.c any name ending in ".c" in any subdirectory of foo
88 including itself.
88 including itself.
89
89
90 Regexp examples:
90 Regexp examples:
91
91
92 re:.*\.c$ any name ending in ".c", anywhere in the repository
92 re:.*\.c$ any name ending in ".c", anywhere in the repository
93
93
94 ''')),
94 ''')),
95
95
96 (['environment', 'env'], _('Environment Variables'),
96 (['environment', 'env'], _('Environment Variables'),
97 _(r'''
97 _(r'''
98 HG::
98 HG::
99 Path to the 'hg' executable, automatically passed when running hooks,
99 Path to the 'hg' executable, automatically passed when running hooks,
100 extensions or external tools. If unset or empty, this is the hg
100 extensions or external tools. If unset or empty, this is the hg
101 exutable's name if it's frozen, or an executable named 'hg'
101 exutable's name if it's frozen, or an executable named 'hg'
102 (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on
102 (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on
103 Windows) is searched.
103 Windows) is searched.
104
104
105 HGEDITOR::
105 HGEDITOR::
106 This is the name of the editor to run when committing. See EDITOR.
106 This is the name of the editor to run when committing. See EDITOR.
107
107
108 (deprecated, use .hgrc)
108 (deprecated, use .hgrc)
109
109
110 HGENCODING::
110 HGENCODING::
111 This overrides the default locale setting detected by Mercurial.
111 This overrides the default locale setting detected by Mercurial.
112 This setting is used to convert data including usernames,
112 This setting is used to convert data including usernames,
113 changeset descriptions, tag names, and branches. This setting can
113 changeset descriptions, tag names, and branches. This setting can
114 be overridden with the --encoding command-line option.
114 be overridden with the --encoding command-line option.
115
115
116 HGENCODINGMODE::
116 HGENCODINGMODE::
117 This sets Mercurial's behavior for handling unknown characters
117 This sets Mercurial's behavior for handling unknown characters
118 while transcoding user input. The default is "strict", which
118 while transcoding user input. The default is "strict", which
119 causes Mercurial to abort if it can't map a character. Other
119 causes Mercurial to abort if it can't map a character. Other
120 settings include "replace", which replaces unknown characters, and
120 settings include "replace", which replaces unknown characters, and
121 "ignore", which drops them. This setting can be overridden with
121 "ignore", which drops them. This setting can be overridden with
122 the --encodingmode command-line option.
122 the --encodingmode command-line option.
123
123
124 HGMERGE::
124 HGMERGE::
125 An executable to use for resolving merge conflicts. The program
125 An executable to use for resolving merge conflicts. The program
126 will be executed with three arguments: local file, remote file,
126 will be executed with three arguments: local file, remote file,
127 ancestor file.
127 ancestor file.
128
128
129 (deprecated, use .hgrc)
129 (deprecated, use .hgrc)
130
130
131 HGRCPATH::
131 HGRCPATH::
132 A list of files or directories to search for hgrc files. Item
132 A list of files or directories to search for hgrc files. Item
133 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
133 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
134 platform default search path is used. If empty, only the .hg/hgrc
134 platform default search path is used. If empty, only the .hg/hgrc
135 from the current repository is read.
135 from the current repository is read.
136
136
137 For each element in HGRCPATH:
137 For each element in HGRCPATH:
138 * if it's a directory, all directories ending with .rc are added
138 * if it's a directory, all directories ending with .rc are added
139 * otherwise, the directory itself will be added
139 * otherwise, the directory itself will be added
140
140
141 HGUSER::
141 HGUSER::
142 This is the string used as the author of a commit. If not set,
142 This is the string used as the author of a commit. If not set,
143 available values will be considered in this order:
143 available values will be considered in this order:
144
144
145 * HGUSER (deprecated)
145 * HGUSER (deprecated)
146 * hgrc files from the HGRCPATH
146 * hgrc files from the HGRCPATH
147 * EMAIL
147 * EMAIL
148 * interactive prompt
148 * interactive prompt
149 * LOGNAME (with '@hostname' appended)
149 * LOGNAME (with '@hostname' appended)
150
150
151 (deprecated, use .hgrc)
151 (deprecated, use .hgrc)
152
152
153 EMAIL::
153 EMAIL::
154 May be used as the author of a commit; see HGUSER.
154 May be used as the author of a commit; see HGUSER.
155
155
156 LOGNAME::
156 LOGNAME::
157 May be used as the author of a commit; see HGUSER.
157 May be used as the author of a commit; see HGUSER.
158
158
159 VISUAL::
159 VISUAL::
160 This is the name of the editor to use when committing. See EDITOR.
160 This is the name of the editor to use when committing. See EDITOR.
161
161
162 EDITOR::
162 EDITOR::
163 Sometimes Mercurial needs to open a text file in an editor
163 Sometimes Mercurial needs to open a text file in an editor
164 for a user to modify, for example when writing commit messages.
164 for a user to modify, for example when writing commit messages.
165 The editor it uses is determined by looking at the environment
165 The editor it uses is determined by looking at the environment
166 variables HGEDITOR, VISUAL and EDITOR, in that order. The first
166 variables HGEDITOR, VISUAL and EDITOR, in that order. The first
167 non-empty one is chosen. If all of them are empty, the editor
167 non-empty one is chosen. If all of them are empty, the editor
168 defaults to 'vi'.
168 defaults to 'vi'.
169
169
170 PYTHONPATH::
170 PYTHONPATH::
171 This is used by Python to find imported modules and may need to be set
171 This is used by Python to find imported modules and may need to be set
172 appropriately if this Mercurial is not installed system-wide.
172 appropriately if this Mercurial is not installed system-wide.
173 ''')),
173 ''')),
174
174
175 (['revs', 'revisions'], _('Specifying Single Revisions'),
175 (['revs', 'revisions'], _('Specifying Single Revisions'),
176 _(r'''
176 _(r'''
177 Mercurial supports several ways to specify individual
177 Mercurial supports several ways to specify individual
178 revisions.
178 revisions.
179
179
180 A plain integer is treated as a revision number. Negative
180 A plain integer is treated as a revision number. Negative
181 integers are treated as toplogical offsets from the tip, with
181 integers are treated as toplogical offsets from the tip, with
182 -1 denoting the tip. As such, negative numbers are only useful
182 -1 denoting the tip. As such, negative numbers are only useful
183 if you've memorized your local tree numbers and want to save
183 if you've memorized your local tree numbers and want to save
184 typing a single digit. This editor suggests copy and paste.
184 typing a single digit. This editor suggests copy and paste.
185
185
186 A 40-digit hexadecimal string is treated as a unique revision
186 A 40-digit hexadecimal string is treated as a unique revision
187 identifier.
187 identifier.
188
188
189 A hexadecimal string less than 40 characters long is treated as a
189 A hexadecimal string less than 40 characters long is treated as a
190 unique revision identifier, and referred to as a short-form
190 unique revision identifier, and referred to as a short-form
191 identifier. A short-form identifier is only valid if it is the
191 identifier. A short-form identifier is only valid if it is the
192 prefix of exactly one full-length identifier.
192 prefix of exactly one full-length identifier.
193
193
194 Any other string is treated as a tag name, which is a symbolic
194 Any other string is treated as a tag name, which is a symbolic
195 name associated with a revision identifier. Tag names may not
195 name associated with a revision identifier. Tag names may not
196 contain the ":" character.
196 contain the ":" character.
197
197
198 The reserved name "tip" is a special tag that always identifies
198 The reserved name "tip" is a special tag that always identifies
199 the most recent revision.
199 the most recent revision.
200
200
201 The reserved name "null" indicates the null revision. This is the
201 The reserved name "null" indicates the null revision. This is the
202 revision of an empty repository, and the parent of revision 0.
202 revision of an empty repository, and the parent of revision 0.
203
203
204 The reserved name "." indicates the working directory parent. If
204 The reserved name "." indicates the working directory parent. If
205 no working directory is checked out, it is equivalent to null.
205 no working directory is checked out, it is equivalent to null.
206 If an uncommitted merge is in progress, "." is the revision of
206 If an uncommitted merge is in progress, "." is the revision of
207 the first parent.
207 the first parent.
208 ''')),
208 ''')),
209
209
210 (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'),
210 (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'),
211 _(r'''
211 _(r'''
212 When Mercurial accepts more than one revision, they may be
212 When Mercurial accepts more than one revision, they may be
213 specified individually, or provided as a topologically continuous
213 specified individually, or provided as a topologically continuous
214 range, separated by the ":" character.
214 range, separated by the ":" character.
215
215
216 The syntax of range notation is [BEGIN]:[END], where BEGIN and END
216 The syntax of range notation is [BEGIN]:[END], where BEGIN and END
217 are revision identifiers. Both BEGIN and END are optional. If
217 are revision identifiers. Both BEGIN and END are optional. If
218 BEGIN is not specified, it defaults to revision number 0. If END
218 BEGIN is not specified, it defaults to revision number 0. If END
219 is not specified, it defaults to the tip. The range ":" thus
219 is not specified, it defaults to the tip. The range ":" thus
220 means "all revisions".
220 means "all revisions".
221
221
222 If BEGIN is greater than END, revisions are treated in reverse
222 If BEGIN is greater than END, revisions are treated in reverse
223 order.
223 order.
224
224
225 A range acts as a closed interval. This means that a range of 3:5
225 A range acts as a closed interval. This means that a range of 3:5
226 gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
226 gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
227 ''')),
227 ''')),
228
228
229 (['diffs'], _('Diff Formats'),
229 (['diffs'], _('Diff Formats'),
230 _(r'''
230 _(r'''
231 Mercurial's default format for showing changes between two versions
231 Mercurial's default format for showing changes between two versions
232 of a file is compatible with the unified format of GNU diff, which
232 of a file is compatible with the unified format of GNU diff, which
233 can be used by GNU patch and many other standard tools.
233 can be used by GNU patch and many other standard tools.
234
234
235 While this standard format is often enough, it does not encode the
235 While this standard format is often enough, it does not encode the
236 following information:
236 following information:
237
237
238 - executable status and other permission bits
238 - executable status and other permission bits
239 - copy or rename information
239 - copy or rename information
240 - changes in binary files
240 - changes in binary files
241 - creation or deletion of empty files
241 - creation or deletion of empty files
242
242
243 Mercurial also supports the extended diff format from the git VCS
243 Mercurial also supports the extended diff format from the git VCS
244 which addresses these limitations. The git diff format is not
244 which addresses these limitations. The git diff format is not
245 produced by default because a few widespread tools still do not
245 produced by default because a few widespread tools still do not
246 understand this format.
246 understand this format.
247
247
248 This means that when generating diffs from a Mercurial repository
248 This means that when generating diffs from a Mercurial repository
249 (e.g. with "hg export"), you should be careful about things like
249 (e.g. with "hg export"), you should be careful about things like
250 file copies and renames or other things mentioned above, because
250 file copies and renames or other things mentioned above, because
251 when applying a standard diff to a different repository, this extra
251 when applying a standard diff to a different repository, this extra
252 information is lost. Mercurial's internal operations (like push and
252 information is lost. Mercurial's internal operations (like push and
253 pull) are not affected by this, because they use an internal binary
253 pull) are not affected by this, because they use an internal binary
254 format for communicating changes.
254 format for communicating changes.
255
255
256 To make Mercurial produce the git extended diff format, use the
256 To make Mercurial produce the git extended diff format, use the
257 --git option available for many commands, or set 'git = True' in the
257 --git option available for many commands, or set 'git = True' in the
258 [diff] section of your hgrc. You do not need to set this option when
258 [diff] section of your hgrc. You do not need to set this option when
259 importing diffs in this format or using them in the mq extension.
259 importing diffs in this format or using them in the mq extension.
260 ''')),
260 ''')),
261 (['templating'], _('Template Usage'),
261 (['templating'], _('Template Usage'),
262 _(r'''
262 _(r'''
263 Mercurial allows you to customize output of commands through
263 Mercurial allows you to customize output of commands through
264 templates. You can either pass in a template from the command line,
264 templates. You can either pass in a template from the command line,
265 via the --template option, or select an existing template-style (--style).
265 via the --template option, or select an existing template-style (--style).
266
266
267 You can customize output for any "log-like" command: log, outgoing,
267 You can customize output for any "log-like" command: log, outgoing,
268 incoming, tip, parents, heads and glog.
268 incoming, tip, parents, heads and glog.
269
269
270 Three styles are packaged with Mercurial: default (the style used
270 Three styles are packaged with Mercurial: default (the style used
271 when no explicit preference is passed), compact and changelog. Usage:
271 when no explicit preference is passed), compact and changelog. Usage:
272
272
273 $ hg log -r1 --style changelog
273 $ hg log -r1 --style changelog
274
274
275 A template is a piece of text, with markup to invoke variable expansion:
275 A template is a piece of text, with markup to invoke variable expansion:
276
276
277 $ hg log -r1 --template "{node}\n"
277 $ hg log -r1 --template "{node}\n"
278 b56ce7b07c52de7d5fd79fb89701ea538af65746
278 b56ce7b07c52de7d5fd79fb89701ea538af65746
279
279
280 Strings in curly braces are called keywords. The availability of
280 Strings in curly braces are called keywords. The availability of
281 keywords depends on the exact context of the templater. These keywords
281 keywords depends on the exact context of the templater. These keywords
282 are usually available for templating a log-like command:
282 are usually available for templating a log-like command:
283
283
284 - author: String. The unmodified author of the changeset.
284 - author: String. The unmodified author of the changeset.
285 - branches: String. The name of the branch on which the changeset
285 - branches: String. The name of the branch on which the changeset
286 was committed. Will be empty if the branch name was default.
286 was committed. Will be empty if the branch name was default.
287 - date: Date information. The date when the changeset was committed.
287 - date: Date information. The date when the changeset was committed.
288 - desc: String. The text of the changeset description.
288 - desc: String. The text of the changeset description.
289 - files: List of strings. All files modified, added, or removed by
289 - files: List of strings. All files modified, added, or removed by
290 this changeset.
290 this changeset.
291 - file_adds: List of strings. Files added by this changeset.
291 - file_adds: List of strings. Files added by this changeset.
292 - file_mods: List of strings. Files modified by this changeset.
292 - file_mods: List of strings. Files modified by this changeset.
293 - file_dels: List of strings. Files removed by this changeset.
293 - file_dels: List of strings. Files removed by this changeset.
294 - node: String. The changeset identification hash, as a 40-character
294 - node: String. The changeset identification hash, as a 40-character
295 hexadecimal string.
295 hexadecimal string.
296 - parents: List of strings. The parents of the changeset.
296 - parents: List of strings. The parents of the changeset.
297 - rev: Integer. The repository-local changeset revision number.
297 - rev: Integer. The repository-local changeset revision number.
298 - tags: List of strings. Any tags associated with the changeset.
298 - tags: List of strings. Any tags associated with the changeset.
299
299
300 The "date" keyword does not produce human-readable output. If you
300 The "date" keyword does not produce human-readable output. If you
301 want to use a date in your output, you can use a filter to process it.
301 want to use a date in your output, you can use a filter to process it.
302 Filters are functions which return a string based on the input variable.
302 Filters are functions which return a string based on the input variable.
303 You can also use a chain of filters to get the desired output:
303 You can also use a chain of filters to get the desired output:
304
304
305 $ hg tip --template "{date|isodate}\n"
305 $ hg tip --template "{date|isodate}\n"
306 2008-08-21 18:22 +0000
306 2008-08-21 18:22 +0000
307
307
308 List of filters:
308 List of filters:
309
309
310 - addbreaks: Any text. Add an XHTML "<br />" tag before the end of
310 - addbreaks: Any text. Add an XHTML "<br />" tag before the end of
311 every line except the last.
311 every line except the last.
312 - age: Date. Returns a human-readable age for the given date.
312 - age: Date. Returns a human-readable date/time difference between
313 the given date/time and the current date/time.
313 - basename: Any text. Treats the text as a path, and returns the
314 - basename: Any text. Treats the text as a path, and returns the
314 basename. For example, "foo/bar/baz" becomes "baz".
315 last component of the path after splitting by the path
315 - date: Date. Returns a date in a Unix date command format, including
316 separator (ignoring trailing seprators). For example,
317 "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "bar".
318 - date: Date. Returns a date in a Unix date format, including
316 the timezone: "Mon Sep 04 15:13:13 2006 0700".
319 the timezone: "Mon Sep 04 15:13:13 2006 0700".
317 - domain: Any text. Finds the first string that looks like an email
320 - domain: Any text. Finds the first string that looks like an email
318 address, and extracts just the domain component.
321 address, and extracts just the domain component.
322 Example: 'User <user@example.com>' becomes 'example.com'.
319 - email: Any text. Extracts the first string that looks like an email
323 - email: Any text. Extracts the first string that looks like an email
320 address.
324 address. Example: 'User <user@example.com>' becomes
325 'user@example.com'.
321 - escape: Any text. Replaces the special XML/XHTML characters "&",
326 - escape: Any text. Replaces the special XML/XHTML characters "&",
322 "<" and ">" with XML entities.
327 "<" and ">" with XML entities.
323 - fill68: Any text. Wraps the text to fit in 68 columns.
328 - fill68: Any text. Wraps the text to fit in 68 columns.
324 - fill76: Any text. Wraps the text to fit in 76 columns.
329 - fill76: Any text. Wraps the text to fit in 76 columns.
325 - firstline: Any text. Returns the first line of text.
330 - firstline: Any text. Returns the first line of text.
326 - hgdate: Date. Returns the date as a pair of numbers:
331 - hgdate: Date. Returns the date as a pair of numbers:
327 "1157407993 25200" (Unix timestamp, timezone offset).
332 "1157407993 25200" (Unix timestamp, timezone offset).
328 - isodate: Date. Returns the date in ISO 8601 format.
333 - isodate: Date. Returns the date in ISO 8601 format.
329 - obfuscate: Any text. Returns the input text rendered as a sequence
334 - obfuscate: Any text. Returns the input text rendered as a sequence
330 of XML entities.
335 of XML entities.
331 - person: Any text. Returns the text before an email address.
336 - person: Any text. Returns the text before an email address.
332 - rfc822date: Date. Returns a date using the same format used
337 - rfc822date: Date. Returns a date using the same format used
333 in email headers.
338 in email headers.
334 - short: Changeset hash. Returns the short form of a changeset hash,
339 - short: Changeset hash. Returns the short form of a changeset hash,
335 i.e. a 12-byte hexadecimal string.
340 i.e. a 12-byte hexadecimal string.
336 - shortdate: Date. Returns a date like "2006-09-04".
341 - shortdate: Date. Returns a date like "2006-09-18".
337 - strip: Any text. Strips all leading and trailing whitespace.
342 - strip: Any text. Strips all leading and trailing whitespace.
338 - tabindent: Any text. Returns the text, with every line except the
343 - tabindent: Any text. Returns the text, with every line except the
339 first starting with a tab character.
344 first starting with a tab character.
340 - urlescape: Any text. Escapes all "special" characters. For example,
345 - urlescape: Any text. Escapes all "special" characters. For example,
341 "foo bar" becomes "foo%20bar".
346 "foo bar" becomes "foo%20bar".
342 - user: Any text. Returns the user portion of an email address.
347 - user: Any text. Returns the user portion of an email address.
343 ''')),
348 ''')),
344
349
345 (['urls'], _('Url Paths'),
350 (['urls'], _('Url Paths'),
346 _(r'''
351 _(r'''
347 Valid URLs are of the form:
352 Valid URLs are of the form:
348
353
349 local/filesystem/path (or file://local/filesystem/path)
354 local/filesystem/path (or file://local/filesystem/path)
350 http://[user[:pass]@]host[:port]/[path]
355 http://[user[:pass]@]host[:port]/[path]
351 https://[user[:pass]@]host[:port]/[path]
356 https://[user[:pass]@]host[:port]/[path]
352 ssh://[user[:pass]@]host[:port]/[path]
357 ssh://[user[:pass]@]host[:port]/[path]
353
358
354 Paths in the local filesystem can either point to Mercurial
359 Paths in the local filesystem can either point to Mercurial
355 repositories or to bundle files (as created by 'hg bundle' or
360 repositories or to bundle files (as created by 'hg bundle' or
356 'hg incoming --bundle').
361 'hg incoming --bundle').
357
362
358 An optional identifier after # indicates a particular branch, tag,
363 An optional identifier after # indicates a particular branch, tag,
359 or changeset to use from the remote repository.
364 or changeset to use from the remote repository.
360
365
361 Some features, such as pushing to http:// and https:// URLs are
366 Some features, such as pushing to http:// and https:// URLs are
362 only possible if the feature is explicitly enabled on the
367 only possible if the feature is explicitly enabled on the
363 remote Mercurial server.
368 remote Mercurial server.
364
369
365 Some notes about using SSH with Mercurial:
370 Some notes about using SSH with Mercurial:
366 - SSH requires an accessible shell account on the destination machine
371 - SSH requires an accessible shell account on the destination machine
367 and a copy of hg in the remote path or specified with as remotecmd.
372 and a copy of hg in the remote path or specified with as remotecmd.
368 - path is relative to the remote user's home directory by default.
373 - path is relative to the remote user's home directory by default.
369 Use an extra slash at the start of a path to specify an absolute path:
374 Use an extra slash at the start of a path to specify an absolute path:
370 ssh://example.com//tmp/repository
375 ssh://example.com//tmp/repository
371 - Mercurial doesn't use its own compression via SSH; the right thing
376 - Mercurial doesn't use its own compression via SSH; the right thing
372 to do is to configure it in your ~/.ssh/config, e.g.:
377 to do is to configure it in your ~/.ssh/config, e.g.:
373 Host *.mylocalnetwork.example.com
378 Host *.mylocalnetwork.example.com
374 Compression no
379 Compression no
375 Host *
380 Host *
376 Compression yes
381 Compression yes
377 Alternatively specify "ssh -C" as your ssh command in your hgrc or
382 Alternatively specify "ssh -C" as your ssh command in your hgrc or
378 with the --ssh command line option.
383 with the --ssh command line option.
379
384
380 These urls can all be stored in your hgrc with path aliases under the
385 These urls can all be stored in your hgrc with path aliases under the
381 [paths] section like so:
386 [paths] section like so:
382 [paths]
387 [paths]
383 alias1 = URL1
388 alias1 = URL1
384 alias2 = URL2
389 alias2 = URL2
385 ...
390 ...
386
391
387 You can then use the alias for any command that uses a url (for example
392 You can then use the alias for any command that uses a url (for example
388 'hg pull alias1' would pull from the 'alias1' path).
393 'hg pull alias1' would pull from the 'alias1' path).
389
394
390 Two path aliases are special because they are used as defaults
395 Two path aliases are special because they are used as defaults
391 when you do not provide the url to a command:
396 when you do not provide the url to a command:
392
397
393 default:
398 default:
394 When you create a repository with hg clone, the clone command saves
399 When you create a repository with hg clone, the clone command saves
395 the location of the source repository as the new repository's
400 the location of the source repository as the new repository's
396 'default' path. This is then used when you omit path from push-
401 'default' path. This is then used when you omit path from push-
397 and pull-like commands (including in and out).
402 and pull-like commands (including in and out).
398
403
399 default-push:
404 default-push:
400 The push command will look for a path named 'default-push', and
405 The push command will look for a path named 'default-push', and
401 prefer it over 'default' if both are defined.
406 prefer it over 'default' if both are defined.
402 ''')),
407 ''')),
403 )
408 )
General Comments 0
You need to be logged in to leave comments. Login now