Show More
@@ -1,239 +1,176 b'' | |||||
1 | HG(1) |
|
1 | HG(1) | |
2 | ===== |
|
2 | ===== | |
3 | Matt Mackall <mpm@selenic.com> |
|
3 | Matt Mackall <mpm@selenic.com> | |
4 |
|
4 | |||
5 | NAME |
|
5 | NAME | |
6 | ---- |
|
6 | ---- | |
7 | hg - Mercurial source code management system |
|
7 | hg - Mercurial source code management system | |
8 |
|
8 | |||
9 | SYNOPSIS |
|
9 | SYNOPSIS | |
10 | -------- |
|
10 | -------- | |
11 | 'hg' [global option]... <command> [command/global option]... [argument]... |
|
11 | 'hg' [global option]... <command> [command/global option]... [argument]... | |
12 |
|
12 | |||
13 | DESCRIPTION |
|
13 | DESCRIPTION | |
14 | ----------- |
|
14 | ----------- | |
15 | The hg(1) command provides a command line interface to the Mercurial system. |
|
15 | The hg(1) command provides a command line interface to the Mercurial system. | |
16 |
|
16 | |||
17 | COMMAND ELEMENTS |
|
17 | COMMAND ELEMENTS | |
18 | ---------------- |
|
18 | ---------------- | |
19 |
|
19 | |||
20 | files ...:: |
|
20 | files ...:: | |
21 | indicates one or more filename or relative path filenames; see |
|
21 | indicates one or more filename or relative path filenames; see | |
22 | "FILE NAME PATTERNS" for information on pattern matching |
|
22 | "FILE NAME PATTERNS" for information on pattern matching | |
23 |
|
23 | |||
24 | path:: |
|
24 | path:: | |
25 | indicates a path on the local machine |
|
25 | indicates a path on the local machine | |
26 |
|
26 | |||
27 | revision:: |
|
27 | revision:: | |
28 | indicates a changeset which can be specified as a changeset revision |
|
28 | indicates a changeset which can be specified as a changeset revision | |
29 | number, a tag, or a unique substring of the changeset hash value |
|
29 | number, a tag, or a unique substring of the changeset hash value | |
30 |
|
30 | |||
31 | repository path:: |
|
31 | repository path:: | |
32 | either the pathname of a local repository or the URI of a remote |
|
32 | either the pathname of a local repository or the URI of a remote | |
33 | repository. There are two available URI protocols, http:// which is |
|
33 | repository. There are two available URI protocols, http:// which is | |
34 | fast and the static-http:// protocol which is much slower but does not |
|
34 | fast and the static-http:// protocol which is much slower but does not | |
35 | require a special server on the web host. |
|
35 | require a special server on the web host. | |
36 |
|
36 | |||
37 |
|
37 | |||
38 | include::hg.1.gendoc.txt[] |
|
38 | include::hg.1.gendoc.txt[] | |
39 |
|
39 | |||
40 | FILE NAME PATTERNS |
|
40 | FILE NAME PATTERNS | |
41 | ------------------ |
|
41 | ------------------ | |
42 |
|
42 | |||
43 | Mercurial accepts several notations for identifying one or more |
|
43 | Mercurial accepts several notations for identifying one or more | |
44 | files at a time. |
|
44 | files at a time. | |
45 |
|
45 | |||
46 | By default, Mercurial treats filenames as shell-style extended |
|
46 | By default, Mercurial treats filenames as shell-style extended | |
47 | glob patterns. |
|
47 | glob patterns. | |
48 |
|
48 | |||
49 | Alternate pattern notations must be specified explicitly. |
|
49 | Alternate pattern notations must be specified explicitly. | |
50 |
|
50 | |||
51 | To use a plain path name without any pattern matching, start a |
|
51 | To use a plain path name without any pattern matching, start a | |
52 | name with "path:". These path names must match completely, from |
|
52 | name with "path:". These path names must match completely, from | |
53 | the root of the current repository. |
|
53 | the root of the current repository. | |
54 |
|
54 | |||
55 | To use an extended glob, start a name with "glob:". Globs are |
|
55 | To use an extended glob, start a name with "glob:". Globs are | |
56 | rooted at the current directory; a glob such as "*.c" will match |
|
56 | rooted at the current directory; a glob such as "*.c" will match | |
57 | files ending in ".c" in the current directory only. |
|
57 | files ending in ".c" in the current directory only. | |
58 |
|
58 | |||
59 | The supported glob syntax extensions are "**" to match any string |
|
59 | The supported glob syntax extensions are "**" to match any string | |
60 | across path separators, and "{a,b}" to mean "a or b". |
|
60 | across path separators, and "{a,b}" to mean "a or b". | |
61 |
|
61 | |||
62 | To use a Perl/Python regular expression, start a name with "re:". |
|
62 | To use a Perl/Python regular expression, start a name with "re:". | |
63 | Regexp pattern matching is anchored at the root of the repository. |
|
63 | Regexp pattern matching is anchored at the root of the repository. | |
64 |
|
64 | |||
65 | Plain examples: |
|
65 | Plain examples: | |
66 |
|
66 | |||
67 | path:foo/bar a name bar in a directory named foo in the root of |
|
67 | path:foo/bar a name bar in a directory named foo in the root of | |
68 | the repository |
|
68 | the repository | |
69 | path:path:name a file or directory named "path:name" |
|
69 | path:path:name a file or directory named "path:name" | |
70 |
|
70 | |||
71 | Glob examples: |
|
71 | Glob examples: | |
72 |
|
72 | |||
73 | glob:*.c any name ending in ".c" in the current directory |
|
73 | glob:*.c any name ending in ".c" in the current directory | |
74 | *.c any name ending in ".c" in the current directory |
|
74 | *.c any name ending in ".c" in the current directory | |
75 | **.c any name ending in ".c" in the current directory, or |
|
75 | **.c any name ending in ".c" in the current directory, or | |
76 | any subdirectory |
|
76 | any subdirectory | |
77 | foo/*.c any name ending in ".c" in the directory foo |
|
77 | foo/*.c any name ending in ".c" in the directory foo | |
78 | foo/**.c any name ending in ".c" in the directory foo, or any |
|
78 | foo/**.c any name ending in ".c" in the directory foo, or any | |
79 | subdirectory |
|
79 | subdirectory | |
80 |
|
80 | |||
81 | Regexp examples: |
|
81 | Regexp examples: | |
82 |
|
82 | |||
83 | re:.*\.c$ any name ending in ".c", anywhere in the repository |
|
83 | re:.*\.c$ any name ending in ".c", anywhere in the repository | |
84 |
|
84 | |||
85 |
|
85 | |||
86 | SPECIFYING SINGLE REVISIONS |
|
86 | SPECIFYING SINGLE REVISIONS | |
87 | --------------------------- |
|
87 | --------------------------- | |
88 |
|
88 | |||
89 | Mercurial accepts several notations for identifying individual |
|
89 | Mercurial accepts several notations for identifying individual | |
90 | revisions. |
|
90 | revisions. | |
91 |
|
91 | |||
92 | A plain integer is treated as a revision number. Negative |
|
92 | A plain integer is treated as a revision number. Negative | |
93 | integers are treated as offsets from the tip, with -1 denoting the |
|
93 | integers are treated as offsets from the tip, with -1 denoting the | |
94 | tip. |
|
94 | tip. | |
95 |
|
95 | |||
96 | A 40-digit hexadecimal string is treated as a unique revision |
|
96 | A 40-digit hexadecimal string is treated as a unique revision | |
97 | identifier. |
|
97 | identifier. | |
98 |
|
98 | |||
99 | A hexadecimal string less than 40 characters long is treated as a |
|
99 | A hexadecimal string less than 40 characters long is treated as a | |
100 | unique revision identifier, and referred to as a short-form |
|
100 | unique revision identifier, and referred to as a short-form | |
101 | identifier. A short-form identifier is only valid if it is the |
|
101 | identifier. A short-form identifier is only valid if it is the | |
102 | prefix of one full-length identifier. |
|
102 | prefix of one full-length identifier. | |
103 |
|
103 | |||
104 | Any other string is treated as a tag name, which is a symbolic |
|
104 | Any other string is treated as a tag name, which is a symbolic | |
105 | name associated with a revision identifier. Tag names may not |
|
105 | name associated with a revision identifier. Tag names may not | |
106 | contain the ":" character. |
|
106 | contain the ":" character. | |
107 |
|
107 | |||
108 | The reserved name "tip" is a special tag that always identifies |
|
108 | The reserved name "tip" is a special tag that always identifies | |
109 | the most recent revision. |
|
109 | the most recent revision. | |
110 |
|
110 | |||
111 | SPECIFYING MULTIPLE REVISIONS |
|
111 | SPECIFYING MULTIPLE REVISIONS | |
112 | ----------------------------- |
|
112 | ----------------------------- | |
113 |
|
113 | |||
114 | When Mercurial accepts more than one revision, they may be |
|
114 | When Mercurial accepts more than one revision, they may be | |
115 | specified individually, or provided as a continuous range, |
|
115 | specified individually, or provided as a continuous range, | |
116 | separated by the ":" character. |
|
116 | separated by the ":" character. | |
117 |
|
117 | |||
118 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
|
118 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END | |
119 | are revision identifiers. Both BEGIN and END are optional. If |
|
119 | are revision identifiers. Both BEGIN and END are optional. If | |
120 | BEGIN is not specified, it defaults to revision number 0. If END |
|
120 | BEGIN is not specified, it defaults to revision number 0. If END | |
121 | is not specified, it defaults to the tip. The range ":" thus |
|
121 | is not specified, it defaults to the tip. The range ":" thus | |
122 | means "all revisions". |
|
122 | means "all revisions". | |
123 |
|
123 | |||
124 | If BEGIN is greater than END, revisions are treated in reverse |
|
124 | If BEGIN is greater than END, revisions are treated in reverse | |
125 | order. |
|
125 | order. | |
126 |
|
126 | |||
127 | A range acts as a closed interval. This means that a range of 3:5 |
|
127 | A range acts as a closed interval. This means that a range of 3:5 | |
128 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. |
|
128 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. | |
129 |
|
129 | |||
130 | ENVIRONMENT VARIABLES |
|
|||
131 | --------------------- |
|
|||
132 |
|
||||
133 | HGEDITOR:: |
|
|||
134 | This is the name of the editor to use when committing. Defaults to the |
|
|||
135 | value of EDITOR. |
|
|||
136 |
|
||||
137 | (deprecated, use .hgrc) |
|
|||
138 |
|
||||
139 | HGENCODING:: |
|
|||
140 | This overrides the default locale setting detected by Mercurial. |
|
|||
141 | This setting is used to convert data including usernames, |
|
|||
142 | changeset descriptions, tag names, and branches. This setting can |
|
|||
143 | be overridden with the --encoding command-line option. |
|
|||
144 |
|
||||
145 | HGENCODINGMODE:: |
|
|||
146 | This sets Mercurial's behavior for handling unknown characters |
|
|||
147 | while transcoding user inputs. The default is "strict", which |
|
|||
148 | causes Mercurial to abort if it can't translate a character. Other |
|
|||
149 | settings include "replace", which replaces unknown characters, and |
|
|||
150 | "ignore", which drops them. This setting can be overridden with |
|
|||
151 | the --encodingmode command-line option. |
|
|||
152 |
|
||||
153 | HGMERGE:: |
|
|||
154 | An executable to use for resolving merge conflicts. The program |
|
|||
155 | will be executed with three arguments: local file, remote file, |
|
|||
156 | ancestor file. |
|
|||
157 |
|
||||
158 | The default program is "hgmerge", which is a shell script provided |
|
|||
159 | by Mercurial with some sensible defaults. |
|
|||
160 |
|
||||
161 | (deprecated, use .hgrc) |
|
|||
162 |
|
||||
163 | HGRCPATH:: |
|
|||
164 | A list of files or directories to search for hgrc files. Item |
|
|||
165 | separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, |
|
|||
166 | platform default search path is used. If empty, only .hg/hgrc of |
|
|||
167 | current repository is read. |
|
|||
168 |
|
||||
169 | For each element in path, if a directory, all entries in directory |
|
|||
170 | ending with ".rc" are added to path. Else, element itself is |
|
|||
171 | added to path. |
|
|||
172 |
|
||||
173 | HGUSER:: |
|
|||
174 | This is the string used for the author of a commit. |
|
|||
175 |
|
||||
176 | (deprecated, use .hgrc) |
|
|||
177 |
|
||||
178 | EMAIL:: |
|
|||
179 | If HGUSER is not set, this will be used as the author for a commit. |
|
|||
180 |
|
||||
181 | LOGNAME:: |
|
|||
182 | If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
|
|||
183 | '@hostname' appended) as the author value for a commit. |
|
|||
184 |
|
||||
185 | EDITOR:: |
|
|||
186 | This is the name of the editor used in the hgmerge script. It will be |
|
|||
187 | used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. |
|
|||
188 |
|
||||
189 | PYTHONPATH:: |
|
|||
190 | This is used by Python to find imported modules and may need to be set |
|
|||
191 | appropriately if Mercurial is not installed system-wide. |
|
|||
192 |
|
||||
193 | FILES |
|
130 | FILES | |
194 | ----- |
|
131 | ----- | |
195 | .hgignore:: |
|
132 | .hgignore:: | |
196 | This file contains regular expressions (one per line) that describe file |
|
133 | This file contains regular expressions (one per line) that describe file | |
197 | names that should be ignored by hg. For details, see hgignore(5). |
|
134 | names that should be ignored by hg. For details, see hgignore(5). | |
198 |
|
135 | |||
199 | .hgtags:: |
|
136 | .hgtags:: | |
200 | This file contains changeset hash values and text tag names (one of each |
|
137 | This file contains changeset hash values and text tag names (one of each | |
201 | separated by spaces) that correspond to tagged versions of the repository |
|
138 | separated by spaces) that correspond to tagged versions of the repository | |
202 | contents. |
|
139 | contents. | |
203 |
|
140 | |||
204 | /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc:: |
|
141 | /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc:: | |
205 | This file contains defaults and configuration. Values in .hg/hgrc |
|
142 | This file contains defaults and configuration. Values in .hg/hgrc | |
206 | override those in $HOME/.hgrc, and these override settings made in the |
|
143 | override those in $HOME/.hgrc, and these override settings made in the | |
207 | global /etc/mercurial/hgrc configuration. See hgrc(5) for details of |
|
144 | global /etc/mercurial/hgrc configuration. See hgrc(5) for details of | |
208 | the contents and format of these files. |
|
145 | the contents and format of these files. | |
209 |
|
146 | |||
210 | Some commands (e.g. revert) produce backup files ending in .orig, if |
|
147 | Some commands (e.g. revert) produce backup files ending in .orig, if | |
211 | the .orig file already exists and is not tracked by Mercurial, it |
|
148 | the .orig file already exists and is not tracked by Mercurial, it | |
212 | will be overwritten. |
|
149 | will be overwritten. | |
213 |
|
150 | |||
214 | BUGS |
|
151 | BUGS | |
215 | ---- |
|
152 | ---- | |
216 | Probably lots, please post them to the mailing list (See Resources below) |
|
153 | Probably lots, please post them to the mailing list (See Resources below) | |
217 | when you find them. |
|
154 | when you find them. | |
218 |
|
155 | |||
219 | SEE ALSO |
|
156 | SEE ALSO | |
220 | -------- |
|
157 | -------- | |
221 | hgignore(5), hgrc(5) |
|
158 | hgignore(5), hgrc(5) | |
222 |
|
159 | |||
223 | AUTHOR |
|
160 | AUTHOR | |
224 | ------ |
|
161 | ------ | |
225 | Written by Matt Mackall <mpm@selenic.com> |
|
162 | Written by Matt Mackall <mpm@selenic.com> | |
226 |
|
163 | |||
227 | RESOURCES |
|
164 | RESOURCES | |
228 | --------- |
|
165 | --------- | |
229 | http://selenic.com/mercurial[Main Web Site] |
|
166 | http://selenic.com/mercurial[Main Web Site] | |
230 |
|
167 | |||
231 | http://selenic.com/hg[Source code repository] |
|
168 | http://selenic.com/hg[Source code repository] | |
232 |
|
169 | |||
233 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] |
|
170 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] | |
234 |
|
171 | |||
235 | COPYING |
|
172 | COPYING | |
236 | ------- |
|
173 | ------- | |
237 | Copyright \(C) 2005, 2006 Matt Mackall. |
|
174 | Copyright \(C) 2005, 2006 Matt Mackall. | |
238 | Free use of this software is granted under the terms of the GNU General |
|
175 | Free use of this software is granted under the terms of the GNU General | |
239 | Public License (GPL). |
|
176 | Public License (GPL). |
@@ -1,45 +1,107 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 | helptable = { |
|
8 | helptable = { | |
9 | "dates|Date Formats": |
|
9 | "dates|Date Formats": | |
10 | r''' |
|
10 | r''' | |
11 | Some commands (backout, commit, tag) allow the user to specify a date. |
|
11 | Some commands (backout, commit, tag) allow the user to specify a date. | |
12 | Possible formats for dates are: |
|
12 | Possible formats for dates are: | |
13 |
|
13 | |||
14 | YYYY-mm-dd \HH:MM[:SS] [(+|-)NNNN]:: |
|
14 | YYYY-mm-dd \HH:MM[:SS] [(+|-)NNNN]:: | |
15 | This is a subset of ISO 8601, allowing just the recommended notations |
|
15 | This is a subset of ISO 8601, allowing just the recommended notations | |
16 | for date and time. The last part represents the timezone; if omitted, |
|
16 | for date and time. The last part represents the timezone; if omitted, | |
17 | local time is assumed. Examples: |
|
17 | local time is assumed. Examples: | |
18 |
|
18 | |||
19 | "2005-08-22 03:27 -0700" |
|
19 | "2005-08-22 03:27 -0700" | |
20 |
|
20 | |||
21 | "2006-04-19 21:39:51" |
|
21 | "2006-04-19 21:39:51" | |
22 |
|
22 | |||
23 | aaa bbb dd HH:MM:SS YYYY [(+|-)NNNN]:: |
|
23 | aaa bbb dd HH:MM:SS YYYY [(+|-)NNNN]:: | |
24 | This is the date format used by the C library. Here, aaa stands for |
|
24 | This is the date format used by the C library. Here, aaa stands for | |
25 | abbreviated weekday name and bbb for abbreviated month name. The last |
|
25 | abbreviated weekday name and bbb for abbreviated month name. The last | |
26 | part represents the timezone; if omitted, local time is assumed. |
|
26 | part represents the timezone; if omitted, local time is assumed. | |
27 | Examples: |
|
27 | Examples: | |
28 |
|
28 | |||
29 | "Mon Aug 22 03:27:00 2005 -0700" |
|
29 | "Mon Aug 22 03:27:00 2005 -0700" | |
30 |
|
30 | |||
31 | "Wed Apr 19 21:39:51 2006" |
|
31 | "Wed Apr 19 21:39:51 2006" | |
32 |
|
32 | |||
33 | unixtime offset:: |
|
33 | unixtime offset:: | |
34 | This is the internal representation format for dates. unixtime is |
|
34 | This is the internal representation format for dates. unixtime is | |
35 | the number of seconds since the epoch (1970-01-01 00:00 UTC). offset |
|
35 | the number of seconds since the epoch (1970-01-01 00:00 UTC). offset | |
36 | is the offset of the local timezone, in seconds west of UTC (negative |
|
36 | is the offset of the local timezone, in seconds west of UTC (negative | |
37 | if the timezone is east of UTC). |
|
37 | if the timezone is east of UTC). | |
38 | Examples: |
|
38 | Examples: | |
39 |
|
39 | |||
40 | "1124706420 25200" (2005-08-22 03:27:00 -0700) |
|
40 | "1124706420 25200" (2005-08-22 03:27:00 -0700) | |
41 |
|
41 | |||
42 | "1145475591 -7200" (2006-04-19 21:39:51 +0200) |
|
42 | "1145475591 -7200" (2006-04-19 21:39:51 +0200) | |
43 | ''', |
|
43 | ''', | |
|
44 | 'environment|env|Environment Variables': | |||
|
45 | r''' | |||
|
46 | HGEDITOR:: | |||
|
47 | This is the name of the editor to use when committing. Defaults to the | |||
|
48 | value of EDITOR. | |||
|
49 | ||||
|
50 | (deprecated, use .hgrc) | |||
|
51 | ||||
|
52 | HGENCODING:: | |||
|
53 | This overrides the default locale setting detected by Mercurial. | |||
|
54 | This setting is used to convert data including usernames, | |||
|
55 | changeset descriptions, tag names, and branches. This setting can | |||
|
56 | be overridden with the --encoding command-line option. | |||
|
57 | ||||
|
58 | HGENCODINGMODE:: | |||
|
59 | This sets Mercurial's behavior for handling unknown characters | |||
|
60 | while transcoding user inputs. The default is "strict", which | |||
|
61 | causes Mercurial to abort if it can't translate a character. Other | |||
|
62 | settings include "replace", which replaces unknown characters, and | |||
|
63 | "ignore", which drops them. This setting can be overridden with | |||
|
64 | the --encodingmode command-line option. | |||
|
65 | ||||
|
66 | HGMERGE:: | |||
|
67 | An executable to use for resolving merge conflicts. The program | |||
|
68 | will be executed with three arguments: local file, remote file, | |||
|
69 | ancestor file. | |||
|
70 | ||||
|
71 | The default program is "hgmerge", which is a shell script provided | |||
|
72 | by Mercurial with some sensible defaults. | |||
|
73 | ||||
|
74 | (deprecated, use .hgrc) | |||
|
75 | ||||
|
76 | HGRCPATH:: | |||
|
77 | A list of files or directories to search for hgrc files. Item | |||
|
78 | separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, | |||
|
79 | platform default search path is used. If empty, only .hg/hgrc of | |||
|
80 | current repository is read. | |||
|
81 | ||||
|
82 | For each element in path, if a directory, all entries in directory | |||
|
83 | ending with ".rc" are added to path. Else, element itself is | |||
|
84 | added to path. | |||
|
85 | ||||
|
86 | HGUSER:: | |||
|
87 | This is the string used for the author of a commit. | |||
|
88 | ||||
|
89 | (deprecated, use .hgrc) | |||
|
90 | ||||
|
91 | EMAIL:: | |||
|
92 | If HGUSER is not set, this will be used as the author for a commit. | |||
|
93 | ||||
|
94 | LOGNAME:: | |||
|
95 | If neither HGUSER nor EMAIL is set, LOGNAME will be used (with | |||
|
96 | '@hostname' appended) as the author value for a commit. | |||
|
97 | ||||
|
98 | EDITOR:: | |||
|
99 | This is the name of the editor used in the hgmerge script. It will be | |||
|
100 | used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. | |||
|
101 | ||||
|
102 | PYTHONPATH:: | |||
|
103 | This is used by Python to find imported modules and may need to be set | |||
|
104 | appropriately if Mercurial is not installed system-wide. | |||
|
105 | ''' | |||
44 | } |
|
106 | } | |
45 |
|
107 |
General Comments 0
You need to be logged in to leave comments.
Login now