Mercurial > public > mercurial-scm > hg-stable
annotate mercurial/help.py @ 3799:eb66d76c7746
move patterns topics
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 05 Dec 2006 16:36:06 -0600 |
parents | 6f0c42d50394 |
children | 6fa11a9d7cac |
rev | line source |
---|---|
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 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
8 helptable = { |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
9 "dates|Date Formats": |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
10 r''' |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
11 Some commands (backout, commit, tag) allow the user to specify a date. |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
12 Possible formats for dates are: |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
13 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
14 YYYY-mm-dd \HH:MM[:SS] [(+|-)NNNN]:: |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
15 This is a subset of ISO 8601, allowing just the recommended notations |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
16 for date and time. The last part represents the timezone; if omitted, |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
17 local time is assumed. Examples: |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
18 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
19 "2005-08-22 03:27 -0700" |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
20 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
21 "2006-04-19 21:39:51" |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
22 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
23 aaa bbb dd HH:MM:SS YYYY [(+|-)NNNN]:: |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
24 This is the date format used by the C library. Here, aaa stands for |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
25 abbreviated weekday name and bbb for abbreviated month name. The last |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
26 part represents the timezone; if omitted, local time is assumed. |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
27 Examples: |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
28 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
29 "Mon Aug 22 03:27:00 2005 -0700" |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
30 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
31 "Wed Apr 19 21:39:51 2006" |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
32 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
33 unixtime offset:: |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
34 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
|
35 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
|
36 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
|
37 if the timezone is east of UTC). |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
38 Examples: |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
39 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
40 "1124706420 25200" (2005-08-22 03:27:00 -0700) |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
41 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
42 "1145475591 -7200" (2006-04-19 21:39:51 +0200) |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
43 ''', |
3799 | 44 |
3798 | 45 'environment|env|Environment Variables': |
46 r''' | |
47 HGEDITOR:: | |
48 This is the name of the editor to use when committing. Defaults to the | |
49 value of EDITOR. | |
50 | |
51 (deprecated, use .hgrc) | |
52 | |
53 HGENCODING:: | |
54 This overrides the default locale setting detected by Mercurial. | |
55 This setting is used to convert data including usernames, | |
56 changeset descriptions, tag names, and branches. This setting can | |
57 be overridden with the --encoding command-line option. | |
58 | |
59 HGENCODINGMODE:: | |
60 This sets Mercurial's behavior for handling unknown characters | |
61 while transcoding user inputs. The default is "strict", which | |
62 causes Mercurial to abort if it can't translate a character. Other | |
63 settings include "replace", which replaces unknown characters, and | |
64 "ignore", which drops them. This setting can be overridden with | |
65 the --encodingmode command-line option. | |
66 | |
67 HGMERGE:: | |
68 An executable to use for resolving merge conflicts. The program | |
69 will be executed with three arguments: local file, remote file, | |
70 ancestor file. | |
71 | |
72 The default program is "hgmerge", which is a shell script provided | |
73 by Mercurial with some sensible defaults. | |
74 | |
75 (deprecated, use .hgrc) | |
76 | |
77 HGRCPATH:: | |
78 A list of files or directories to search for hgrc files. Item | |
79 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, | |
80 platform default search path is used. If empty, only .hg/hgrc of | |
81 current repository is read. | |
82 | |
83 For each element in path, if a directory, all entries in directory | |
84 ending with ".rc" are added to path. Else, element itself is | |
85 added to path. | |
86 | |
87 HGUSER:: | |
88 This is the string used for the author of a commit. | |
89 | |
90 (deprecated, use .hgrc) | |
91 | |
92 EMAIL:: | |
93 If HGUSER is not set, this will be used as the author for a commit. | |
94 | |
95 LOGNAME:: | |
96 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with | |
97 '@hostname' appended) as the author value for a commit. | |
98 | |
99 EDITOR:: | |
100 This is the name of the editor used in the hgmerge script. It will be | |
101 used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. | |
102 | |
103 PYTHONPATH:: | |
104 This is used by Python to find imported modules and may need to be set | |
105 appropriately if Mercurial is not installed system-wide. | |
3799 | 106 ''', |
107 | |
108 "patterns|File Name Patterns": r''' | |
109 Mercurial accepts several notations for identifying one or more | |
110 files at a time. | |
111 | |
112 By default, Mercurial treats filenames as shell-style extended | |
113 glob patterns. | |
114 | |
115 Alternate pattern notations must be specified explicitly. | |
116 | |
117 To use a plain path name without any pattern matching, start a | |
118 name with "path:". These path names must match completely, from | |
119 the root of the current repository. | |
120 | |
121 To use an extended glob, start a name with "glob:". Globs are | |
122 rooted at the current directory; a glob such as "*.c" will match | |
123 files ending in ".c" in the current directory only. | |
124 | |
125 The supported glob syntax extensions are "**" to match any string | |
126 across path separators, and "{a,b}" to mean "a or b". | |
127 | |
128 To use a Perl/Python regular expression, start a name with "re:". | |
129 Regexp pattern matching is anchored at the root of the repository. | |
130 | |
131 Plain examples: | |
132 | |
133 path:foo/bar a name bar in a directory named foo in the root of | |
134 the repository | |
135 path:path:name a file or directory named "path:name" | |
136 | |
137 Glob examples: | |
138 | |
139 glob:*.c any name ending in ".c" in the current directory | |
140 *.c any name ending in ".c" in the current directory | |
141 **.c any name ending in ".c" in the current directory, or | |
142 any subdirectory | |
143 foo/*.c any name ending in ".c" in the directory foo | |
144 foo/**.c any name ending in ".c" in the directory foo, or any | |
145 subdirectory | |
146 | |
147 Regexp examples: | |
148 | |
149 re:.*\.c$ any name ending in ".c", anywhere in the repository | |
150 | |
151 ''', | |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
152 } |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
153 |