Show More
@@ -35,9 +35,9 b' helptable = (' | |||||
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). |
|
38 | the number of seconds since the epoch (1970-01-01 00:00 UTC). | |
39 |
is the offset of the local timezone, in seconds west of UTC |
|
39 | offset is the offset of the local timezone, in seconds west of UTC | |
40 | if the timezone is east of UTC). |
|
40 | (negative 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 | |||
@@ -96,10 +96,10 b' helptable = (' | |||||
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 |
|
99 | Path to the 'hg' executable, automatically passed when running | |
100 |
extensions or external tools. If unset or empty, this is |
|
100 | hooks, extensions or external tools. If unset or empty, this is | |
101 |
executable's name if it's frozen, or an executable named |
|
101 | the hg executable's name if it's frozen, or an executable named | |
102 | (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on |
|
102 | 'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on | |
103 | Windows) is searched. |
|
103 | Windows) is searched. | |
104 |
|
104 | |||
105 | HGEDITOR:: |
|
105 | HGEDITOR:: | |
@@ -160,28 +160,27 b' 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 for a | |
164 |
|
|
164 | user to modify, for example when writing commit messages. The | |
165 |
|
|
165 | 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 |
|
171 | This is used by Python to find imported modules and may need to be | |
172 | appropriately if this Mercurial is not installed system-wide. |
|
172 | set 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 revisions. | |
178 | revisions. |
|
|||
179 |
|
178 | |||
180 | A plain integer is treated as a revision number. Negative |
|
179 | A plain integer is treated as a revision number. Negative integers | |
181 |
|
|
180 | are treated as topological offsets from the tip, with -1 denoting | |
182 |
|
|
181 | the tip. As such, negative numbers are only useful if you've | |
183 |
|
|
182 | memorized your local tree numbers and want to save typing a single | |
184 |
|
|
183 | digit. This editor suggests copy and paste. | |
185 |
|
184 | |||
186 | A 40-digit hexadecimal string is treated as a unique revision |
|
185 | A 40-digit hexadecimal string is treated as a unique revision | |
187 | identifier. |
|
186 | identifier. | |
@@ -202,9 +201,9 b' PYTHONPATH::' | |||||
202 | revision of an empty repository, and the parent of revision 0. |
|
201 | revision of an empty repository, and the parent of revision 0. | |
203 |
|
202 | |||
204 | The reserved name "." indicates the working directory parent. If |
|
203 | The reserved name "." indicates the working directory parent. If | |
205 | no working directory is checked out, it is equivalent to null. |
|
204 | no working directory is checked out, it is equivalent to null. If | |
206 |
|
|
205 | an uncommitted merge is in progress, "." is the revision of the | |
207 |
|
|
206 | first parent. | |
208 | ''')), |
|
207 | ''')), | |
209 |
|
208 | |||
210 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
|
209 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), | |
@@ -216,8 +215,8 b' PYTHONPATH::' | |||||
216 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
|
215 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END | |
217 | are revision identifiers. Both BEGIN and END are optional. If |
|
216 | are revision identifiers. Both BEGIN and END are optional. If | |
218 | BEGIN is not specified, it defaults to revision number 0. If END |
|
217 | BEGIN is not specified, it defaults to revision number 0. If END | |
219 | is not specified, it defaults to the tip. The range ":" thus |
|
218 | is not specified, it defaults to the tip. The range ":" thus means | |
220 |
|
|
219 | "all revisions". | |
221 |
|
220 | |||
222 | If BEGIN is greater than END, revisions are treated in reverse |
|
221 | If BEGIN is greater than END, revisions are treated in reverse | |
223 | order. |
|
222 | order. | |
@@ -228,9 +227,10 b' PYTHONPATH::' | |||||
228 |
|
227 | |||
229 | (['diffs'], _('Diff Formats'), |
|
228 | (['diffs'], _('Diff Formats'), | |
230 | _(r''' |
|
229 | _(r''' | |
231 |
Mercurial's default format for showing changes between two |
|
230 | Mercurial's default format for showing changes between two | |
232 |
of a file is compatible with the unified format of GNU |
|
231 | versions of a file is compatible with the unified format of GNU | |
233 |
can be used by GNU patch and many other standard |
|
232 | diff, which can be used by GNU patch and many other standard | |
|
233 | 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: | |
@@ -248,61 +248,66 b' PYTHONPATH::' | |||||
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 |
|
251 | when applying a standard diff to a different repository, this | |
252 |
information is lost. Mercurial's internal operations (like |
|
252 | extra information is lost. Mercurial's internal operations (like | |
253 |
pull) are not affected by this, because they use an |
|
253 | push and pull) are not affected by this, because they use an | |
254 | format for communicating changes. |
|
254 | internal binary 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 |
|
257 | --git option available for many commands, or set 'git = True' in | |
258 |
[diff] section of your hgrc. You do not need to set this |
|
258 | the [diff] section of your hgrc. You do not need to set this | |
259 |
importing diffs in this format or using them in the mq |
|
259 | option when importing diffs in this format or using them in the mq | |
|
260 | extension. | |||
260 | ''')), |
|
261 | ''')), | |
261 | (['templating'], _('Template Usage'), |
|
262 | (['templating'], _('Template Usage'), | |
262 | _(r''' |
|
263 | _(r''' | |
263 | Mercurial allows you to customize output of commands through |
|
264 | Mercurial allows you to customize output of commands through | |
264 |
templates. You can either pass in a template from the command |
|
265 | templates. You can either pass in a template from the command | |
265 |
via the --template option, or select an existing |
|
266 | line, via the --template option, or select an existing | |
|
267 | template-style (--style). | |||
266 |
|
268 | |||
267 |
You can customize output for any "log-like" command: log, |
|
269 | You can customize output for any "log-like" command: log, | |
268 | incoming, tip, parents, heads and glog. |
|
270 | outgoing, incoming, tip, parents, heads and glog. | |
269 |
|
271 | |||
270 | Three styles are packaged with Mercurial: default (the style used |
|
272 | Three styles are packaged with Mercurial: default (the style used | |
271 |
when no explicit preference is passed), compact and changelog. |
|
273 | when no explicit preference is passed), compact and changelog. | |
|
274 | Usage: | |||
272 |
|
275 | |||
273 | $ hg log -r1 --style changelog |
|
276 | $ hg log -r1 --style changelog | |
274 |
|
277 | |||
275 |
A template is a piece of text, with markup to invoke variable |
|
278 | A template is a piece of text, with markup to invoke variable | |
|
279 | expansion: | |||
276 |
|
280 | |||
277 | $ hg log -r1 --template "{node}\n" |
|
281 | $ hg log -r1 --template "{node}\n" | |
278 | b56ce7b07c52de7d5fd79fb89701ea538af65746 |
|
282 | b56ce7b07c52de7d5fd79fb89701ea538af65746 | |
279 |
|
283 | |||
280 | Strings in curly braces are called keywords. The availability of |
|
284 | Strings in curly braces are called keywords. The availability of | |
281 |
keywords depends on the exact context of the templater. These |
|
285 | keywords depends on the exact context of the templater. These | |
282 | are usually available for templating a log-like command: |
|
286 | keywords are usually available for templating a log-like command: | |
283 |
|
287 | |||
284 | - author: String. The unmodified author of the changeset. |
|
288 | - author: String. The unmodified author of the changeset. | |
285 | - branches: String. The name of the branch on which the changeset |
|
289 | - branches: String. The name of the branch on which the changeset | |
286 | was committed. Will be empty if the branch name was default. |
|
290 | was committed. Will be empty if the branch name was default. | |
287 | - date: Date information. The date when the changeset was committed. |
|
291 | - date: Date information. The date when the changeset was committed. | |
288 | - desc: String. The text of the changeset description. |
|
292 | - desc: String. The text of the changeset description. | |
289 |
- diffstat: String. Statistics of changes with the following |
|
293 | - diffstat: String. Statistics of changes with the following | |
290 | "modified files: +added/-removed lines" |
|
294 | format: "modified files: +added/-removed lines" | |
291 | - files: List of strings. All files modified, added, or removed by |
|
295 | - files: List of strings. All files modified, added, or removed by | |
292 | this changeset. |
|
296 | this changeset. | |
293 | - file_adds: List of strings. Files added by this changeset. |
|
297 | - file_adds: List of strings. Files added by this changeset. | |
294 | - file_mods: List of strings. Files modified by this changeset. |
|
298 | - file_mods: List of strings. Files modified by this changeset. | |
295 | - file_dels: List of strings. Files removed by this changeset. |
|
299 | - file_dels: List of strings. Files removed by this changeset. | |
296 |
- node: String. The changeset identification hash, as a |
|
300 | - node: String. The changeset identification hash, as a | |
297 | hexadecimal string. |
|
301 | 40-character hexadecimal string. | |
298 | - parents: List of strings. The parents of the changeset. |
|
302 | - parents: List of strings. The parents of the changeset. | |
299 | - rev: Integer. The repository-local changeset revision number. |
|
303 | - rev: Integer. The repository-local changeset revision number. | |
300 | - tags: List of strings. Any tags associated with the changeset. |
|
304 | - tags: List of strings. Any tags associated with the changeset. | |
301 |
|
305 | |||
302 | The "date" keyword does not produce human-readable output. If you |
|
306 | The "date" keyword does not produce human-readable output. If you | |
303 |
want to use a date in your output, you can use a filter to process |
|
307 | want to use a date in your output, you can use a filter to process | |
304 |
Filters are functions which return a string based on the input |
|
308 | it. Filters are functions which return a string based on the input | |
305 |
You can also use a chain of filters to get the desired |
|
309 | variable. You can also use a chain of filters to get the desired | |
|
310 | output: | |||
306 |
|
311 | |||
307 | $ hg tip --template "{date|isodate}\n" |
|
312 | $ hg tip --template "{date|isodate}\n" | |
308 | 2008-08-21 18:22 +0000 |
|
313 | 2008-08-21 18:22 +0000 | |
@@ -319,11 +324,11 b' PYTHONPATH::' | |||||
319 | "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "bar". |
|
324 | "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "bar". | |
320 | - date: Date. Returns a date in a Unix date format, including |
|
325 | - date: Date. Returns a date in a Unix date format, including | |
321 | the timezone: "Mon Sep 04 15:13:13 2006 0700". |
|
326 | the timezone: "Mon Sep 04 15:13:13 2006 0700". | |
322 |
- domain: Any text. Finds the first string that looks like an |
|
327 | - domain: Any text. Finds the first string that looks like an | |
323 | address, and extracts just the domain component. |
|
328 | email address, and extracts just the domain component. | |
324 | Example: 'User <user@example.com>' becomes 'example.com'. |
|
329 | Example: 'User <user@example.com>' becomes 'example.com'. | |
325 |
- email: Any text. Extracts the first string that looks like an |
|
330 | - email: Any text. Extracts the first string that looks like an | |
326 | address. Example: 'User <user@example.com>' becomes |
|
331 | email address. Example: 'User <user@example.com>' becomes | |
327 | 'user@example.com'. |
|
332 | 'user@example.com'. | |
328 | - escape: Any text. Replaces the special XML/XHTML characters "&", |
|
333 | - escape: Any text. Replaces the special XML/XHTML characters "&", | |
329 | "<" and ">" with XML entities. |
|
334 | "<" and ">" with XML entities. | |
@@ -333,19 +338,19 b' PYTHONPATH::' | |||||
333 | - hgdate: Date. Returns the date as a pair of numbers: |
|
338 | - hgdate: Date. Returns the date as a pair of numbers: | |
334 | "1157407993 25200" (Unix timestamp, timezone offset). |
|
339 | "1157407993 25200" (Unix timestamp, timezone offset). | |
335 | - isodate: Date. Returns the date in ISO 8601 format. |
|
340 | - isodate: Date. Returns the date in ISO 8601 format. | |
336 |
- obfuscate: Any text. Returns the input text rendered as a |
|
341 | - obfuscate: Any text. Returns the input text rendered as a | |
337 | of XML entities. |
|
342 | sequence of XML entities. | |
338 | - person: Any text. Returns the text before an email address. |
|
343 | - person: Any text. Returns the text before an email address. | |
339 | - rfc822date: Date. Returns a date using the same format used |
|
344 | - rfc822date: Date. Returns a date using the same format used | |
340 | in email headers. |
|
345 | in email headers. | |
341 |
- short: Changeset hash. Returns the short form of a changeset |
|
346 | - short: Changeset hash. Returns the short form of a changeset | |
342 | i.e. a 12-byte hexadecimal string. |
|
347 | hash, i.e. a 12-byte hexadecimal string. | |
343 | - shortdate: Date. Returns a date like "2006-09-18". |
|
348 | - shortdate: Date. Returns a date like "2006-09-18". | |
344 | - strip: Any text. Strips all leading and trailing whitespace. |
|
349 | - strip: Any text. Strips all leading and trailing whitespace. | |
345 |
- tabindent: Any text. Returns the text, with every line except |
|
350 | - tabindent: Any text. Returns the text, with every line except | |
346 | first starting with a tab character. |
|
351 | the first starting with a tab character. | |
347 |
- urlescape: Any text. Escapes all "special" characters. For |
|
352 | - urlescape: Any text. Escapes all "special" characters. For | |
348 | "foo bar" becomes "foo%20bar". |
|
353 | example, "foo bar" becomes "foo%20bar". | |
349 | - user: Any text. Returns the user portion of an email address. |
|
354 | - user: Any text. Returns the user portion of an email address. | |
350 | ''')), |
|
355 | ''')), | |
351 |
|
356 | |||
@@ -366,42 +371,44 b' PYTHONPATH::' | |||||
366 | or changeset to use from the remote repository. |
|
371 | or changeset to use from the remote repository. | |
367 |
|
372 | |||
368 | Some features, such as pushing to http:// and https:// URLs are |
|
373 | Some features, such as pushing to http:// and https:// URLs are | |
369 | only possible if the feature is explicitly enabled on the |
|
374 | only possible if the feature is explicitly enabled on the remote | |
370 |
|
|
375 | Mercurial server. | |
371 |
|
376 | |||
372 | Some notes about using SSH with Mercurial: |
|
377 | Some notes about using SSH with Mercurial: | |
373 |
- SSH requires an accessible shell account on the destination |
|
378 | - SSH requires an accessible shell account on the destination | |
374 |
and a copy of hg in the remote path or specified with as |
|
379 | machine and a copy of hg in the remote path or specified with as | |
|
380 | remotecmd. | |||
375 | - path is relative to the remote user's home directory by default. |
|
381 | - path is relative to the remote user's home directory by default. | |
376 | Use an extra slash at the start of a path to specify an absolute path: |
|
382 | Use an extra slash at the start of a path to specify an absolute path: | |
377 | ssh://example.com//tmp/repository |
|
383 | ssh://example.com//tmp/repository | |
378 |
- Mercurial doesn't use its own compression via SSH; the right |
|
384 | - Mercurial doesn't use its own compression via SSH; the right | |
379 | to do is to configure it in your ~/.ssh/config, e.g.: |
|
385 | thing to do is to configure it in your ~/.ssh/config, e.g.: | |
380 | Host *.mylocalnetwork.example.com |
|
386 | Host *.mylocalnetwork.example.com | |
381 | Compression no |
|
387 | Compression no | |
382 | Host * |
|
388 | Host * | |
383 | Compression yes |
|
389 | Compression yes | |
384 |
Alternatively specify "ssh -C" as your ssh command in your hgrc |
|
390 | Alternatively specify "ssh -C" as your ssh command in your hgrc | |
385 | with the --ssh command line option. |
|
391 | or with the --ssh command line option. | |
386 |
|
392 | |||
387 |
These URLs can all be stored in your hgrc with path aliases under |
|
393 | These URLs can all be stored in your hgrc with path aliases under | |
388 | [paths] section like so: |
|
394 | the [paths] section like so: | |
389 | [paths] |
|
395 | [paths] | |
390 | alias1 = URL1 |
|
396 | alias1 = URL1 | |
391 | alias2 = URL2 |
|
397 | alias2 = URL2 | |
392 | ... |
|
398 | ... | |
393 |
|
399 | |||
394 |
You can then use the alias for any command that uses a URL (for |
|
400 | You can then use the alias for any command that uses a URL (for | |
395 | 'hg pull alias1' would pull from the 'alias1' path). |
|
401 | example 'hg pull alias1' would pull from the 'alias1' path). | |
396 |
|
402 | |||
397 | Two path aliases are special because they are used as defaults |
|
403 | Two path aliases are special because they are used as defaults | |
398 | when you do not provide the URL to a command: |
|
404 | when you do not provide the URL to a command: | |
399 |
|
405 | |||
400 | default: |
|
406 | default: | |
401 |
When you create a repository with hg clone, the clone command |
|
407 | When you create a repository with hg clone, the clone command | |
402 |
the location of the source repository as the new |
|
408 | saves the location of the source repository as the new | |
403 |
'default' path. This is then used when you omit |
|
409 | repository's 'default' path. This is then used when you omit | |
404 |
and pull-like commands (including incoming and |
|
410 | path from push- and pull-like commands (including incoming and | |
|
411 | outgoing). | |||
405 |
|
412 | |||
406 | default-push: |
|
413 | default-push: | |
407 | The push command will look for a path named 'default-push', and |
|
414 | The push command will look for a path named 'default-push', and |
General Comments 0
You need to be logged in to leave comments.
Login now