Show More
@@ -1,450 +1,450 b'' | |||||
1 | # convert.py Foreign SCM converter |
|
1 | # convert.py Foreign SCM converter | |
2 | # |
|
2 | # | |
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | '''import revisions from foreign VCS repositories into Mercurial''' |
|
8 | '''import revisions from foreign VCS repositories into Mercurial''' | |
9 |
|
9 | |||
10 | import convcmd |
|
10 | import convcmd | |
11 | import cvsps |
|
11 | import cvsps | |
12 | import subversion |
|
12 | import subversion | |
13 | from mercurial import cmdutil, templatekw |
|
13 | from mercurial import cmdutil, templatekw | |
14 | from mercurial.i18n import _ |
|
14 | from mercurial.i18n import _ | |
15 |
|
15 | |||
16 | cmdtable = {} |
|
16 | cmdtable = {} | |
17 | command = cmdutil.command(cmdtable) |
|
17 | command = cmdutil.command(cmdtable) | |
18 | # Note for extension authors: ONLY specify testedwith = 'internal' for |
|
18 | # Note for extension authors: ONLY specify testedwith = 'internal' for | |
19 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
|
19 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | |
20 | # be specifying the version(s) of Mercurial they are tested with, or |
|
20 | # be specifying the version(s) of Mercurial they are tested with, or | |
21 | # leave the attribute unspecified. |
|
21 | # leave the attribute unspecified. | |
22 | testedwith = 'internal' |
|
22 | testedwith = 'internal' | |
23 |
|
23 | |||
24 | # Commands definition was moved elsewhere to ease demandload job. |
|
24 | # Commands definition was moved elsewhere to ease demandload job. | |
25 |
|
25 | |||
26 | @command('convert', |
|
26 | @command('convert', | |
27 | [('', 'authors', '', |
|
27 | [('', 'authors', '', | |
28 |
_('username mapping filename (DEPRECATED |
|
28 | _('username mapping filename (DEPRECATED) (use --authormap instead)'), | |
29 | _('FILE')), |
|
29 | _('FILE')), | |
30 | ('s', 'source-type', '', _('source repository type'), _('TYPE')), |
|
30 | ('s', 'source-type', '', _('source repository type'), _('TYPE')), | |
31 | ('d', 'dest-type', '', _('destination repository type'), _('TYPE')), |
|
31 | ('d', 'dest-type', '', _('destination repository type'), _('TYPE')), | |
32 | ('r', 'rev', [], _('import up to source revision REV'), _('REV')), |
|
32 | ('r', 'rev', [], _('import up to source revision REV'), _('REV')), | |
33 | ('A', 'authormap', '', _('remap usernames using this file'), _('FILE')), |
|
33 | ('A', 'authormap', '', _('remap usernames using this file'), _('FILE')), | |
34 | ('', 'filemap', '', _('remap file names using contents of file'), |
|
34 | ('', 'filemap', '', _('remap file names using contents of file'), | |
35 | _('FILE')), |
|
35 | _('FILE')), | |
36 | ('', 'full', None, |
|
36 | ('', 'full', None, | |
37 | _('apply filemap changes by converting all files again')), |
|
37 | _('apply filemap changes by converting all files again')), | |
38 | ('', 'splicemap', '', _('splice synthesized history into place'), |
|
38 | ('', 'splicemap', '', _('splice synthesized history into place'), | |
39 | _('FILE')), |
|
39 | _('FILE')), | |
40 | ('', 'branchmap', '', _('change branch names while converting'), |
|
40 | ('', 'branchmap', '', _('change branch names while converting'), | |
41 | _('FILE')), |
|
41 | _('FILE')), | |
42 | ('', 'branchsort', None, _('try to sort changesets by branches')), |
|
42 | ('', 'branchsort', None, _('try to sort changesets by branches')), | |
43 | ('', 'datesort', None, _('try to sort changesets by date')), |
|
43 | ('', 'datesort', None, _('try to sort changesets by date')), | |
44 | ('', 'sourcesort', None, _('preserve source changesets order')), |
|
44 | ('', 'sourcesort', None, _('preserve source changesets order')), | |
45 | ('', 'closesort', None, _('try to reorder closed revisions'))], |
|
45 | ('', 'closesort', None, _('try to reorder closed revisions'))], | |
46 | _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]'), |
|
46 | _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]'), | |
47 | norepo=True) |
|
47 | norepo=True) | |
48 | def convert(ui, src, dest=None, revmapfile=None, **opts): |
|
48 | def convert(ui, src, dest=None, revmapfile=None, **opts): | |
49 | """convert a foreign SCM repository to a Mercurial one. |
|
49 | """convert a foreign SCM repository to a Mercurial one. | |
50 |
|
50 | |||
51 | Accepted source formats [identifiers]: |
|
51 | Accepted source formats [identifiers]: | |
52 |
|
52 | |||
53 | - Mercurial [hg] |
|
53 | - Mercurial [hg] | |
54 | - CVS [cvs] |
|
54 | - CVS [cvs] | |
55 | - Darcs [darcs] |
|
55 | - Darcs [darcs] | |
56 | - git [git] |
|
56 | - git [git] | |
57 | - Subversion [svn] |
|
57 | - Subversion [svn] | |
58 | - Monotone [mtn] |
|
58 | - Monotone [mtn] | |
59 | - GNU Arch [gnuarch] |
|
59 | - GNU Arch [gnuarch] | |
60 | - Bazaar [bzr] |
|
60 | - Bazaar [bzr] | |
61 | - Perforce [p4] |
|
61 | - Perforce [p4] | |
62 |
|
62 | |||
63 | Accepted destination formats [identifiers]: |
|
63 | Accepted destination formats [identifiers]: | |
64 |
|
64 | |||
65 | - Mercurial [hg] |
|
65 | - Mercurial [hg] | |
66 | - Subversion [svn] (history on branches is not preserved) |
|
66 | - Subversion [svn] (history on branches is not preserved) | |
67 |
|
67 | |||
68 | If no revision is given, all revisions will be converted. |
|
68 | If no revision is given, all revisions will be converted. | |
69 | Otherwise, convert will only import up to the named revision |
|
69 | Otherwise, convert will only import up to the named revision | |
70 | (given in a format understood by the source). |
|
70 | (given in a format understood by the source). | |
71 |
|
71 | |||
72 | If no destination directory name is specified, it defaults to the |
|
72 | If no destination directory name is specified, it defaults to the | |
73 | basename of the source with ``-hg`` appended. If the destination |
|
73 | basename of the source with ``-hg`` appended. If the destination | |
74 | repository doesn't exist, it will be created. |
|
74 | repository doesn't exist, it will be created. | |
75 |
|
75 | |||
76 | By default, all sources except Mercurial will use --branchsort. |
|
76 | By default, all sources except Mercurial will use --branchsort. | |
77 | Mercurial uses --sourcesort to preserve original revision numbers |
|
77 | Mercurial uses --sourcesort to preserve original revision numbers | |
78 | order. Sort modes have the following effects: |
|
78 | order. Sort modes have the following effects: | |
79 |
|
79 | |||
80 | --branchsort convert from parent to child revision when possible, |
|
80 | --branchsort convert from parent to child revision when possible, | |
81 | which means branches are usually converted one after |
|
81 | which means branches are usually converted one after | |
82 | the other. It generates more compact repositories. |
|
82 | the other. It generates more compact repositories. | |
83 |
|
83 | |||
84 | --datesort sort revisions by date. Converted repositories have |
|
84 | --datesort sort revisions by date. Converted repositories have | |
85 | good-looking changelogs but are often an order of |
|
85 | good-looking changelogs but are often an order of | |
86 | magnitude larger than the same ones generated by |
|
86 | magnitude larger than the same ones generated by | |
87 | --branchsort. |
|
87 | --branchsort. | |
88 |
|
88 | |||
89 | --sourcesort try to preserve source revisions order, only |
|
89 | --sourcesort try to preserve source revisions order, only | |
90 | supported by Mercurial sources. |
|
90 | supported by Mercurial sources. | |
91 |
|
91 | |||
92 | --closesort try to move closed revisions as close as possible |
|
92 | --closesort try to move closed revisions as close as possible | |
93 | to parent branches, only supported by Mercurial |
|
93 | to parent branches, only supported by Mercurial | |
94 | sources. |
|
94 | sources. | |
95 |
|
95 | |||
96 | If ``REVMAP`` isn't given, it will be put in a default location |
|
96 | If ``REVMAP`` isn't given, it will be put in a default location | |
97 | (``<dest>/.hg/shamap`` by default). The ``REVMAP`` is a simple |
|
97 | (``<dest>/.hg/shamap`` by default). The ``REVMAP`` is a simple | |
98 | text file that maps each source commit ID to the destination ID |
|
98 | text file that maps each source commit ID to the destination ID | |
99 | for that revision, like so:: |
|
99 | for that revision, like so:: | |
100 |
|
100 | |||
101 | <source ID> <destination ID> |
|
101 | <source ID> <destination ID> | |
102 |
|
102 | |||
103 | If the file doesn't exist, it's automatically created. It's |
|
103 | If the file doesn't exist, it's automatically created. It's | |
104 | updated on each commit copied, so :hg:`convert` can be interrupted |
|
104 | updated on each commit copied, so :hg:`convert` can be interrupted | |
105 | and can be run repeatedly to copy new commits. |
|
105 | and can be run repeatedly to copy new commits. | |
106 |
|
106 | |||
107 | The authormap is a simple text file that maps each source commit |
|
107 | The authormap is a simple text file that maps each source commit | |
108 | author to a destination commit author. It is handy for source SCMs |
|
108 | author to a destination commit author. It is handy for source SCMs | |
109 | that use unix logins to identify authors (e.g.: CVS). One line per |
|
109 | that use unix logins to identify authors (e.g.: CVS). One line per | |
110 | author mapping and the line format is:: |
|
110 | author mapping and the line format is:: | |
111 |
|
111 | |||
112 | source author = destination author |
|
112 | source author = destination author | |
113 |
|
113 | |||
114 | Empty lines and lines starting with a ``#`` are ignored. |
|
114 | Empty lines and lines starting with a ``#`` are ignored. | |
115 |
|
115 | |||
116 | The filemap is a file that allows filtering and remapping of files |
|
116 | The filemap is a file that allows filtering and remapping of files | |
117 | and directories. Each line can contain one of the following |
|
117 | and directories. Each line can contain one of the following | |
118 | directives:: |
|
118 | directives:: | |
119 |
|
119 | |||
120 | include path/to/file-or-dir |
|
120 | include path/to/file-or-dir | |
121 |
|
121 | |||
122 | exclude path/to/file-or-dir |
|
122 | exclude path/to/file-or-dir | |
123 |
|
123 | |||
124 | rename path/to/source path/to/destination |
|
124 | rename path/to/source path/to/destination | |
125 |
|
125 | |||
126 | Comment lines start with ``#``. A specified path matches if it |
|
126 | Comment lines start with ``#``. A specified path matches if it | |
127 | equals the full relative name of a file or one of its parent |
|
127 | equals the full relative name of a file or one of its parent | |
128 | directories. The ``include`` or ``exclude`` directive with the |
|
128 | directories. The ``include`` or ``exclude`` directive with the | |
129 | longest matching path applies, so line order does not matter. |
|
129 | longest matching path applies, so line order does not matter. | |
130 |
|
130 | |||
131 | The ``include`` directive causes a file, or all files under a |
|
131 | The ``include`` directive causes a file, or all files under a | |
132 | directory, to be included in the destination repository. The default |
|
132 | directory, to be included in the destination repository. The default | |
133 | if there are no ``include`` statements is to include everything. |
|
133 | if there are no ``include`` statements is to include everything. | |
134 | If there are any ``include`` statements, nothing else is included. |
|
134 | If there are any ``include`` statements, nothing else is included. | |
135 | The ``exclude`` directive causes files or directories to |
|
135 | The ``exclude`` directive causes files or directories to | |
136 | be omitted. The ``rename`` directive renames a file or directory if |
|
136 | be omitted. The ``rename`` directive renames a file or directory if | |
137 | it is converted. To rename from a subdirectory into the root of |
|
137 | it is converted. To rename from a subdirectory into the root of | |
138 | the repository, use ``.`` as the path to rename to. |
|
138 | the repository, use ``.`` as the path to rename to. | |
139 |
|
139 | |||
140 | ``--full`` will make sure the converted changesets contain exactly |
|
140 | ``--full`` will make sure the converted changesets contain exactly | |
141 | the right files with the right content. It will make a full |
|
141 | the right files with the right content. It will make a full | |
142 | conversion of all files, not just the ones that have |
|
142 | conversion of all files, not just the ones that have | |
143 | changed. Files that already are correct will not be changed. This |
|
143 | changed. Files that already are correct will not be changed. This | |
144 | can be used to apply filemap changes when converting |
|
144 | can be used to apply filemap changes when converting | |
145 | incrementally. This is currently only supported for Mercurial and |
|
145 | incrementally. This is currently only supported for Mercurial and | |
146 | Subversion. |
|
146 | Subversion. | |
147 |
|
147 | |||
148 | The splicemap is a file that allows insertion of synthetic |
|
148 | The splicemap is a file that allows insertion of synthetic | |
149 | history, letting you specify the parents of a revision. This is |
|
149 | history, letting you specify the parents of a revision. This is | |
150 | useful if you want to e.g. give a Subversion merge two parents, or |
|
150 | useful if you want to e.g. give a Subversion merge two parents, or | |
151 | graft two disconnected series of history together. Each entry |
|
151 | graft two disconnected series of history together. Each entry | |
152 | contains a key, followed by a space, followed by one or two |
|
152 | contains a key, followed by a space, followed by one or two | |
153 | comma-separated values:: |
|
153 | comma-separated values:: | |
154 |
|
154 | |||
155 | key parent1, parent2 |
|
155 | key parent1, parent2 | |
156 |
|
156 | |||
157 | The key is the revision ID in the source |
|
157 | The key is the revision ID in the source | |
158 | revision control system whose parents should be modified (same |
|
158 | revision control system whose parents should be modified (same | |
159 | format as a key in .hg/shamap). The values are the revision IDs |
|
159 | format as a key in .hg/shamap). The values are the revision IDs | |
160 | (in either the source or destination revision control system) that |
|
160 | (in either the source or destination revision control system) that | |
161 | should be used as the new parents for that node. For example, if |
|
161 | should be used as the new parents for that node. For example, if | |
162 | you have merged "release-1.0" into "trunk", then you should |
|
162 | you have merged "release-1.0" into "trunk", then you should | |
163 | specify the revision on "trunk" as the first parent and the one on |
|
163 | specify the revision on "trunk" as the first parent and the one on | |
164 | the "release-1.0" branch as the second. |
|
164 | the "release-1.0" branch as the second. | |
165 |
|
165 | |||
166 | The branchmap is a file that allows you to rename a branch when it is |
|
166 | The branchmap is a file that allows you to rename a branch when it is | |
167 | being brought in from whatever external repository. When used in |
|
167 | being brought in from whatever external repository. When used in | |
168 | conjunction with a splicemap, it allows for a powerful combination |
|
168 | conjunction with a splicemap, it allows for a powerful combination | |
169 | to help fix even the most badly mismanaged repositories and turn them |
|
169 | to help fix even the most badly mismanaged repositories and turn them | |
170 | into nicely structured Mercurial repositories. The branchmap contains |
|
170 | into nicely structured Mercurial repositories. The branchmap contains | |
171 | lines of the form:: |
|
171 | lines of the form:: | |
172 |
|
172 | |||
173 | original_branch_name new_branch_name |
|
173 | original_branch_name new_branch_name | |
174 |
|
174 | |||
175 | where "original_branch_name" is the name of the branch in the |
|
175 | where "original_branch_name" is the name of the branch in the | |
176 | source repository, and "new_branch_name" is the name of the branch |
|
176 | source repository, and "new_branch_name" is the name of the branch | |
177 | is the destination repository. No whitespace is allowed in the |
|
177 | is the destination repository. No whitespace is allowed in the | |
178 | branch names. This can be used to (for instance) move code in one |
|
178 | branch names. This can be used to (for instance) move code in one | |
179 | repository from "default" to a named branch. |
|
179 | repository from "default" to a named branch. | |
180 |
|
180 | |||
181 | Mercurial Source |
|
181 | Mercurial Source | |
182 | ################ |
|
182 | ################ | |
183 |
|
183 | |||
184 | The Mercurial source recognizes the following configuration |
|
184 | The Mercurial source recognizes the following configuration | |
185 | options, which you can set on the command line with ``--config``: |
|
185 | options, which you can set on the command line with ``--config``: | |
186 |
|
186 | |||
187 | :convert.hg.ignoreerrors: ignore integrity errors when reading. |
|
187 | :convert.hg.ignoreerrors: ignore integrity errors when reading. | |
188 | Use it to fix Mercurial repositories with missing revlogs, by |
|
188 | Use it to fix Mercurial repositories with missing revlogs, by | |
189 | converting from and to Mercurial. Default is False. |
|
189 | converting from and to Mercurial. Default is False. | |
190 |
|
190 | |||
191 | :convert.hg.saverev: store original revision ID in changeset |
|
191 | :convert.hg.saverev: store original revision ID in changeset | |
192 | (forces target IDs to change). It takes a boolean argument and |
|
192 | (forces target IDs to change). It takes a boolean argument and | |
193 | defaults to False. |
|
193 | defaults to False. | |
194 |
|
194 | |||
195 | :convert.hg.startrev: specify the initial Mercurial revision. |
|
195 | :convert.hg.startrev: specify the initial Mercurial revision. | |
196 | The default is 0. |
|
196 | The default is 0. | |
197 |
|
197 | |||
198 | :convert.hg.revs: revset specifying the source revisions to convert. |
|
198 | :convert.hg.revs: revset specifying the source revisions to convert. | |
199 |
|
199 | |||
200 | CVS Source |
|
200 | CVS Source | |
201 | ########## |
|
201 | ########## | |
202 |
|
202 | |||
203 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS |
|
203 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS | |
204 | to indicate the starting point of what will be converted. Direct |
|
204 | to indicate the starting point of what will be converted. Direct | |
205 | access to the repository files is not needed, unless of course the |
|
205 | access to the repository files is not needed, unless of course the | |
206 | repository is ``:local:``. The conversion uses the top level |
|
206 | repository is ``:local:``. The conversion uses the top level | |
207 | directory in the sandbox to find the CVS repository, and then uses |
|
207 | directory in the sandbox to find the CVS repository, and then uses | |
208 | CVS rlog commands to find files to convert. This means that unless |
|
208 | CVS rlog commands to find files to convert. This means that unless | |
209 | a filemap is given, all files under the starting directory will be |
|
209 | a filemap is given, all files under the starting directory will be | |
210 | converted, and that any directory reorganization in the CVS |
|
210 | converted, and that any directory reorganization in the CVS | |
211 | sandbox is ignored. |
|
211 | sandbox is ignored. | |
212 |
|
212 | |||
213 | The following options can be used with ``--config``: |
|
213 | The following options can be used with ``--config``: | |
214 |
|
214 | |||
215 | :convert.cvsps.cache: Set to False to disable remote log caching, |
|
215 | :convert.cvsps.cache: Set to False to disable remote log caching, | |
216 | for testing and debugging purposes. Default is True. |
|
216 | for testing and debugging purposes. Default is True. | |
217 |
|
217 | |||
218 | :convert.cvsps.fuzz: Specify the maximum time (in seconds) that is |
|
218 | :convert.cvsps.fuzz: Specify the maximum time (in seconds) that is | |
219 | allowed between commits with identical user and log message in |
|
219 | allowed between commits with identical user and log message in | |
220 | a single changeset. When very large files were checked in as |
|
220 | a single changeset. When very large files were checked in as | |
221 | part of a changeset then the default may not be long enough. |
|
221 | part of a changeset then the default may not be long enough. | |
222 | The default is 60. |
|
222 | The default is 60. | |
223 |
|
223 | |||
224 | :convert.cvsps.mergeto: Specify a regular expression to which |
|
224 | :convert.cvsps.mergeto: Specify a regular expression to which | |
225 | commit log messages are matched. If a match occurs, then the |
|
225 | commit log messages are matched. If a match occurs, then the | |
226 | conversion process will insert a dummy revision merging the |
|
226 | conversion process will insert a dummy revision merging the | |
227 | branch on which this log message occurs to the branch |
|
227 | branch on which this log message occurs to the branch | |
228 | indicated in the regex. Default is ``{{mergetobranch |
|
228 | indicated in the regex. Default is ``{{mergetobranch | |
229 | ([-\\w]+)}}`` |
|
229 | ([-\\w]+)}}`` | |
230 |
|
230 | |||
231 | :convert.cvsps.mergefrom: Specify a regular expression to which |
|
231 | :convert.cvsps.mergefrom: Specify a regular expression to which | |
232 | commit log messages are matched. If a match occurs, then the |
|
232 | commit log messages are matched. If a match occurs, then the | |
233 | conversion process will add the most recent revision on the |
|
233 | conversion process will add the most recent revision on the | |
234 | branch indicated in the regex as the second parent of the |
|
234 | branch indicated in the regex as the second parent of the | |
235 | changeset. Default is ``{{mergefrombranch ([-\\w]+)}}`` |
|
235 | changeset. Default is ``{{mergefrombranch ([-\\w]+)}}`` | |
236 |
|
236 | |||
237 | :convert.localtimezone: use local time (as determined by the TZ |
|
237 | :convert.localtimezone: use local time (as determined by the TZ | |
238 | environment variable) for changeset date/times. The default |
|
238 | environment variable) for changeset date/times. The default | |
239 | is False (use UTC). |
|
239 | is False (use UTC). | |
240 |
|
240 | |||
241 | :hooks.cvslog: Specify a Python function to be called at the end of |
|
241 | :hooks.cvslog: Specify a Python function to be called at the end of | |
242 | gathering the CVS log. The function is passed a list with the |
|
242 | gathering the CVS log. The function is passed a list with the | |
243 | log entries, and can modify the entries in-place, or add or |
|
243 | log entries, and can modify the entries in-place, or add or | |
244 | delete them. |
|
244 | delete them. | |
245 |
|
245 | |||
246 | :hooks.cvschangesets: Specify a Python function to be called after |
|
246 | :hooks.cvschangesets: Specify a Python function to be called after | |
247 | the changesets are calculated from the CVS log. The |
|
247 | the changesets are calculated from the CVS log. The | |
248 | function is passed a list with the changeset entries, and can |
|
248 | function is passed a list with the changeset entries, and can | |
249 | modify the changesets in-place, or add or delete them. |
|
249 | modify the changesets in-place, or add or delete them. | |
250 |
|
250 | |||
251 | An additional "debugcvsps" Mercurial command allows the builtin |
|
251 | An additional "debugcvsps" Mercurial command allows the builtin | |
252 | changeset merging code to be run without doing a conversion. Its |
|
252 | changeset merging code to be run without doing a conversion. Its | |
253 | parameters and output are similar to that of cvsps 2.1. Please see |
|
253 | parameters and output are similar to that of cvsps 2.1. Please see | |
254 | the command help for more details. |
|
254 | the command help for more details. | |
255 |
|
255 | |||
256 | Subversion Source |
|
256 | Subversion Source | |
257 | ################# |
|
257 | ################# | |
258 |
|
258 | |||
259 | Subversion source detects classical trunk/branches/tags layouts. |
|
259 | Subversion source detects classical trunk/branches/tags layouts. | |
260 | By default, the supplied ``svn://repo/path/`` source URL is |
|
260 | By default, the supplied ``svn://repo/path/`` source URL is | |
261 | converted as a single branch. If ``svn://repo/path/trunk`` exists |
|
261 | converted as a single branch. If ``svn://repo/path/trunk`` exists | |
262 | it replaces the default branch. If ``svn://repo/path/branches`` |
|
262 | it replaces the default branch. If ``svn://repo/path/branches`` | |
263 | exists, its subdirectories are listed as possible branches. If |
|
263 | exists, its subdirectories are listed as possible branches. If | |
264 | ``svn://repo/path/tags`` exists, it is looked for tags referencing |
|
264 | ``svn://repo/path/tags`` exists, it is looked for tags referencing | |
265 | converted branches. Default ``trunk``, ``branches`` and ``tags`` |
|
265 | converted branches. Default ``trunk``, ``branches`` and ``tags`` | |
266 | values can be overridden with following options. Set them to paths |
|
266 | values can be overridden with following options. Set them to paths | |
267 | relative to the source URL, or leave them blank to disable auto |
|
267 | relative to the source URL, or leave them blank to disable auto | |
268 | detection. |
|
268 | detection. | |
269 |
|
269 | |||
270 | The following options can be set with ``--config``: |
|
270 | The following options can be set with ``--config``: | |
271 |
|
271 | |||
272 | :convert.svn.branches: specify the directory containing branches. |
|
272 | :convert.svn.branches: specify the directory containing branches. | |
273 | The default is ``branches``. |
|
273 | The default is ``branches``. | |
274 |
|
274 | |||
275 | :convert.svn.tags: specify the directory containing tags. The |
|
275 | :convert.svn.tags: specify the directory containing tags. The | |
276 | default is ``tags``. |
|
276 | default is ``tags``. | |
277 |
|
277 | |||
278 | :convert.svn.trunk: specify the name of the trunk branch. The |
|
278 | :convert.svn.trunk: specify the name of the trunk branch. The | |
279 | default is ``trunk``. |
|
279 | default is ``trunk``. | |
280 |
|
280 | |||
281 | :convert.localtimezone: use local time (as determined by the TZ |
|
281 | :convert.localtimezone: use local time (as determined by the TZ | |
282 | environment variable) for changeset date/times. The default |
|
282 | environment variable) for changeset date/times. The default | |
283 | is False (use UTC). |
|
283 | is False (use UTC). | |
284 |
|
284 | |||
285 | Source history can be retrieved starting at a specific revision, |
|
285 | Source history can be retrieved starting at a specific revision, | |
286 | instead of being integrally converted. Only single branch |
|
286 | instead of being integrally converted. Only single branch | |
287 | conversions are supported. |
|
287 | conversions are supported. | |
288 |
|
288 | |||
289 | :convert.svn.startrev: specify start Subversion revision number. |
|
289 | :convert.svn.startrev: specify start Subversion revision number. | |
290 | The default is 0. |
|
290 | The default is 0. | |
291 |
|
291 | |||
292 | Git Source |
|
292 | Git Source | |
293 | ########## |
|
293 | ########## | |
294 |
|
294 | |||
295 | The Git importer converts commits from all reachable branches (refs |
|
295 | The Git importer converts commits from all reachable branches (refs | |
296 | in refs/heads) and remotes (refs in refs/remotes) to Mercurial. |
|
296 | in refs/heads) and remotes (refs in refs/remotes) to Mercurial. | |
297 | Branches are converted to bookmarks with the same name, with the |
|
297 | Branches are converted to bookmarks with the same name, with the | |
298 | leading 'refs/heads' stripped. Git submodules are converted to Git |
|
298 | leading 'refs/heads' stripped. Git submodules are converted to Git | |
299 | subrepos in Mercurial. |
|
299 | subrepos in Mercurial. | |
300 |
|
300 | |||
301 | The following options can be set with ``--config``: |
|
301 | The following options can be set with ``--config``: | |
302 |
|
302 | |||
303 | :convert.git.similarity: specify how similar files modified in a |
|
303 | :convert.git.similarity: specify how similar files modified in a | |
304 | commit must be to be imported as renames or copies, as a |
|
304 | commit must be to be imported as renames or copies, as a | |
305 | percentage between ``0`` (disabled) and ``100`` (files must be |
|
305 | percentage between ``0`` (disabled) and ``100`` (files must be | |
306 | identical). For example, ``90`` means that a delete/add pair will |
|
306 | identical). For example, ``90`` means that a delete/add pair will | |
307 | be imported as a rename if more than 90% of the file hasn't |
|
307 | be imported as a rename if more than 90% of the file hasn't | |
308 | changed. The default is ``50``. |
|
308 | changed. The default is ``50``. | |
309 |
|
309 | |||
310 | :convert.git.findcopiesharder: while detecting copies, look at all |
|
310 | :convert.git.findcopiesharder: while detecting copies, look at all | |
311 | files in the working copy instead of just changed ones. This |
|
311 | files in the working copy instead of just changed ones. This | |
312 | is very expensive for large projects, and is only effective when |
|
312 | is very expensive for large projects, and is only effective when | |
313 | ``convert.git.similarity`` is greater than 0. The default is False. |
|
313 | ``convert.git.similarity`` is greater than 0. The default is False. | |
314 |
|
314 | |||
315 | :convert.git.remoteprefix: remote refs are converted as bookmarks with |
|
315 | :convert.git.remoteprefix: remote refs are converted as bookmarks with | |
316 | ``convert.git.remoteprefix`` as a prefix followed by a /. The default |
|
316 | ``convert.git.remoteprefix`` as a prefix followed by a /. The default | |
317 | is 'remote'. |
|
317 | is 'remote'. | |
318 |
|
318 | |||
319 | :convert.git.skipsubmodules: does not convert root level .gitmodules files |
|
319 | :convert.git.skipsubmodules: does not convert root level .gitmodules files | |
320 | or files with 160000 mode indicating a submodule. Default is False. |
|
320 | or files with 160000 mode indicating a submodule. Default is False. | |
321 |
|
321 | |||
322 | Perforce Source |
|
322 | Perforce Source | |
323 | ############### |
|
323 | ############### | |
324 |
|
324 | |||
325 | The Perforce (P4) importer can be given a p4 depot path or a |
|
325 | The Perforce (P4) importer can be given a p4 depot path or a | |
326 | client specification as source. It will convert all files in the |
|
326 | client specification as source. It will convert all files in the | |
327 | source to a flat Mercurial repository, ignoring labels, branches |
|
327 | source to a flat Mercurial repository, ignoring labels, branches | |
328 | and integrations. Note that when a depot path is given you then |
|
328 | and integrations. Note that when a depot path is given you then | |
329 | usually should specify a target directory, because otherwise the |
|
329 | usually should specify a target directory, because otherwise the | |
330 | target may be named ``...-hg``. |
|
330 | target may be named ``...-hg``. | |
331 |
|
331 | |||
332 | The following options can be set with ``--config``: |
|
332 | The following options can be set with ``--config``: | |
333 |
|
333 | |||
334 | :convert.p4.encoding: specify the encoding to use when decoding standard |
|
334 | :convert.p4.encoding: specify the encoding to use when decoding standard | |
335 | output of the Perforce command line tool. The default is default system |
|
335 | output of the Perforce command line tool. The default is default system | |
336 | encoding. |
|
336 | encoding. | |
337 |
|
337 | |||
338 | :convert.p4.startrev: specify initial Perforce revision (a |
|
338 | :convert.p4.startrev: specify initial Perforce revision (a | |
339 | Perforce changelist number). |
|
339 | Perforce changelist number). | |
340 |
|
340 | |||
341 | Mercurial Destination |
|
341 | Mercurial Destination | |
342 | ##################### |
|
342 | ##################### | |
343 |
|
343 | |||
344 | The Mercurial destination will recognize Mercurial subrepositories in the |
|
344 | The Mercurial destination will recognize Mercurial subrepositories in the | |
345 | destination directory, and update the .hgsubstate file automatically if the |
|
345 | destination directory, and update the .hgsubstate file automatically if the | |
346 | destination subrepositories contain the <dest>/<sub>/.hg/shamap file. |
|
346 | destination subrepositories contain the <dest>/<sub>/.hg/shamap file. | |
347 | Converting a repository with subrepositories requires converting a single |
|
347 | Converting a repository with subrepositories requires converting a single | |
348 | repository at a time, from the bottom up. |
|
348 | repository at a time, from the bottom up. | |
349 |
|
349 | |||
350 | .. container:: verbose |
|
350 | .. container:: verbose | |
351 |
|
351 | |||
352 | An example showing how to convert a repository with subrepositories:: |
|
352 | An example showing how to convert a repository with subrepositories:: | |
353 |
|
353 | |||
354 | # so convert knows the type when it sees a non empty destination |
|
354 | # so convert knows the type when it sees a non empty destination | |
355 | $ hg init converted |
|
355 | $ hg init converted | |
356 |
|
356 | |||
357 | $ hg convert orig/sub1 converted/sub1 |
|
357 | $ hg convert orig/sub1 converted/sub1 | |
358 | $ hg convert orig/sub2 converted/sub2 |
|
358 | $ hg convert orig/sub2 converted/sub2 | |
359 | $ hg convert orig converted |
|
359 | $ hg convert orig converted | |
360 |
|
360 | |||
361 | The following options are supported: |
|
361 | The following options are supported: | |
362 |
|
362 | |||
363 | :convert.hg.clonebranches: dispatch source branches in separate |
|
363 | :convert.hg.clonebranches: dispatch source branches in separate | |
364 | clones. The default is False. |
|
364 | clones. The default is False. | |
365 |
|
365 | |||
366 | :convert.hg.tagsbranch: branch name for tag revisions, defaults to |
|
366 | :convert.hg.tagsbranch: branch name for tag revisions, defaults to | |
367 | ``default``. |
|
367 | ``default``. | |
368 |
|
368 | |||
369 | :convert.hg.usebranchnames: preserve branch names. The default is |
|
369 | :convert.hg.usebranchnames: preserve branch names. The default is | |
370 | True. |
|
370 | True. | |
371 |
|
371 | |||
372 | :convert.hg.sourcename: records the given string as a 'convert_source' extra |
|
372 | :convert.hg.sourcename: records the given string as a 'convert_source' extra | |
373 | value on each commit made in the target repository. The default is None. |
|
373 | value on each commit made in the target repository. The default is None. | |
374 |
|
374 | |||
375 | All Destinations |
|
375 | All Destinations | |
376 | ################ |
|
376 | ################ | |
377 |
|
377 | |||
378 | All destination types accept the following options: |
|
378 | All destination types accept the following options: | |
379 |
|
379 | |||
380 | :convert.skiptags: does not convert tags from the source repo to the target |
|
380 | :convert.skiptags: does not convert tags from the source repo to the target | |
381 | repo. The default is False. |
|
381 | repo. The default is False. | |
382 | """ |
|
382 | """ | |
383 | return convcmd.convert(ui, src, dest, revmapfile, **opts) |
|
383 | return convcmd.convert(ui, src, dest, revmapfile, **opts) | |
384 |
|
384 | |||
385 | @command('debugsvnlog', [], 'hg debugsvnlog', norepo=True) |
|
385 | @command('debugsvnlog', [], 'hg debugsvnlog', norepo=True) | |
386 | def debugsvnlog(ui, **opts): |
|
386 | def debugsvnlog(ui, **opts): | |
387 | return subversion.debugsvnlog(ui, **opts) |
|
387 | return subversion.debugsvnlog(ui, **opts) | |
388 |
|
388 | |||
389 | @command('debugcvsps', |
|
389 | @command('debugcvsps', | |
390 | [ |
|
390 | [ | |
391 | # Main options shared with cvsps-2.1 |
|
391 | # Main options shared with cvsps-2.1 | |
392 | ('b', 'branches', [], _('only return changes on specified branches')), |
|
392 | ('b', 'branches', [], _('only return changes on specified branches')), | |
393 | ('p', 'prefix', '', _('prefix to remove from file names')), |
|
393 | ('p', 'prefix', '', _('prefix to remove from file names')), | |
394 | ('r', 'revisions', [], |
|
394 | ('r', 'revisions', [], | |
395 | _('only return changes after or between specified tags')), |
|
395 | _('only return changes after or between specified tags')), | |
396 | ('u', 'update-cache', None, _("update cvs log cache")), |
|
396 | ('u', 'update-cache', None, _("update cvs log cache")), | |
397 | ('x', 'new-cache', None, _("create new cvs log cache")), |
|
397 | ('x', 'new-cache', None, _("create new cvs log cache")), | |
398 | ('z', 'fuzz', 60, _('set commit time fuzz in seconds')), |
|
398 | ('z', 'fuzz', 60, _('set commit time fuzz in seconds')), | |
399 | ('', 'root', '', _('specify cvsroot')), |
|
399 | ('', 'root', '', _('specify cvsroot')), | |
400 | # Options specific to builtin cvsps |
|
400 | # Options specific to builtin cvsps | |
401 | ('', 'parents', '', _('show parent changesets')), |
|
401 | ('', 'parents', '', _('show parent changesets')), | |
402 | ('', 'ancestors', '', _('show current changeset in ancestor branches')), |
|
402 | ('', 'ancestors', '', _('show current changeset in ancestor branches')), | |
403 | # Options that are ignored for compatibility with cvsps-2.1 |
|
403 | # Options that are ignored for compatibility with cvsps-2.1 | |
404 | ('A', 'cvs-direct', None, _('ignored for compatibility')), |
|
404 | ('A', 'cvs-direct', None, _('ignored for compatibility')), | |
405 | ], |
|
405 | ], | |
406 | _('hg debugcvsps [OPTION]... [PATH]...'), |
|
406 | _('hg debugcvsps [OPTION]... [PATH]...'), | |
407 | norepo=True) |
|
407 | norepo=True) | |
408 | def debugcvsps(ui, *args, **opts): |
|
408 | def debugcvsps(ui, *args, **opts): | |
409 | '''create changeset information from CVS |
|
409 | '''create changeset information from CVS | |
410 |
|
410 | |||
411 | This command is intended as a debugging tool for the CVS to |
|
411 | This command is intended as a debugging tool for the CVS to | |
412 | Mercurial converter, and can be used as a direct replacement for |
|
412 | Mercurial converter, and can be used as a direct replacement for | |
413 | cvsps. |
|
413 | cvsps. | |
414 |
|
414 | |||
415 | Hg debugcvsps reads the CVS rlog for current directory (or any |
|
415 | Hg debugcvsps reads the CVS rlog for current directory (or any | |
416 | named directory) in the CVS repository, and converts the log to a |
|
416 | named directory) in the CVS repository, and converts the log to a | |
417 | series of changesets based on matching commit log entries and |
|
417 | series of changesets based on matching commit log entries and | |
418 | dates.''' |
|
418 | dates.''' | |
419 | return cvsps.debugcvsps(ui, *args, **opts) |
|
419 | return cvsps.debugcvsps(ui, *args, **opts) | |
420 |
|
420 | |||
421 | def kwconverted(ctx, name): |
|
421 | def kwconverted(ctx, name): | |
422 | rev = ctx.extra().get('convert_revision', '') |
|
422 | rev = ctx.extra().get('convert_revision', '') | |
423 | if rev.startswith('svn:'): |
|
423 | if rev.startswith('svn:'): | |
424 | if name == 'svnrev': |
|
424 | if name == 'svnrev': | |
425 | return str(subversion.revsplit(rev)[2]) |
|
425 | return str(subversion.revsplit(rev)[2]) | |
426 | elif name == 'svnpath': |
|
426 | elif name == 'svnpath': | |
427 | return subversion.revsplit(rev)[1] |
|
427 | return subversion.revsplit(rev)[1] | |
428 | elif name == 'svnuuid': |
|
428 | elif name == 'svnuuid': | |
429 | return subversion.revsplit(rev)[0] |
|
429 | return subversion.revsplit(rev)[0] | |
430 | return rev |
|
430 | return rev | |
431 |
|
431 | |||
432 | def kwsvnrev(repo, ctx, **args): |
|
432 | def kwsvnrev(repo, ctx, **args): | |
433 | """:svnrev: String. Converted subversion revision number.""" |
|
433 | """:svnrev: String. Converted subversion revision number.""" | |
434 | return kwconverted(ctx, 'svnrev') |
|
434 | return kwconverted(ctx, 'svnrev') | |
435 |
|
435 | |||
436 | def kwsvnpath(repo, ctx, **args): |
|
436 | def kwsvnpath(repo, ctx, **args): | |
437 | """:svnpath: String. Converted subversion revision project path.""" |
|
437 | """:svnpath: String. Converted subversion revision project path.""" | |
438 | return kwconverted(ctx, 'svnpath') |
|
438 | return kwconverted(ctx, 'svnpath') | |
439 |
|
439 | |||
440 | def kwsvnuuid(repo, ctx, **args): |
|
440 | def kwsvnuuid(repo, ctx, **args): | |
441 | """:svnuuid: String. Converted subversion revision repository identifier.""" |
|
441 | """:svnuuid: String. Converted subversion revision repository identifier.""" | |
442 | return kwconverted(ctx, 'svnuuid') |
|
442 | return kwconverted(ctx, 'svnuuid') | |
443 |
|
443 | |||
444 | def extsetup(ui): |
|
444 | def extsetup(ui): | |
445 | templatekw.keywords['svnrev'] = kwsvnrev |
|
445 | templatekw.keywords['svnrev'] = kwsvnrev | |
446 | templatekw.keywords['svnpath'] = kwsvnpath |
|
446 | templatekw.keywords['svnpath'] = kwsvnpath | |
447 | templatekw.keywords['svnuuid'] = kwsvnuuid |
|
447 | templatekw.keywords['svnuuid'] = kwsvnuuid | |
448 |
|
448 | |||
449 | # tell hggettext to extract docstrings from these functions: |
|
449 | # tell hggettext to extract docstrings from these functions: | |
450 | i18nfunctions = [kwsvnrev, kwsvnpath, kwsvnuuid] |
|
450 | i18nfunctions = [kwsvnrev, kwsvnpath, kwsvnuuid] |
@@ -1,532 +1,534 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 of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from i18n import gettext, _ |
|
8 | from i18n import gettext, _ | |
9 | import itertools, os, textwrap |
|
9 | import itertools, os, textwrap | |
10 | import error |
|
10 | import error | |
11 | import extensions, revset, fileset, templatekw, templatefilters, filemerge |
|
11 | import extensions, revset, fileset, templatekw, templatefilters, filemerge | |
12 | import templater |
|
12 | import templater | |
13 | import encoding, util, minirst |
|
13 | import encoding, util, minirst | |
14 | import cmdutil |
|
14 | import cmdutil | |
15 | import hgweb.webcommands as webcommands |
|
15 | import hgweb.webcommands as webcommands | |
16 |
|
16 | |||
17 | _exclkeywords = [ |
|
17 | _exclkeywords = [ | |
18 | "DEPRECATED", |
|
18 | "(DEPRECATED)", | |
19 | "EXPERIMENTAL", |
|
19 | "(EXPERIMENTAL)", | |
20 | _("DEPRECATED"), |
|
20 | # i18n: "(DEPRECATED)" is a keyword, must be translated consistently | |
21 |
_(" |
|
21 | _("(DEPRECATED)"), | |
|
22 | # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently | |||
|
23 | _("(EXPERIMENTAL)"), | |||
22 | ] |
|
24 | ] | |
23 |
|
25 | |||
24 | def listexts(header, exts, indent=1, showdeprecated=False): |
|
26 | def listexts(header, exts, indent=1, showdeprecated=False): | |
25 | '''return a text listing of the given extensions''' |
|
27 | '''return a text listing of the given extensions''' | |
26 | rst = [] |
|
28 | rst = [] | |
27 | if exts: |
|
29 | if exts: | |
28 | rst.append('\n%s\n\n' % header) |
|
30 | rst.append('\n%s\n\n' % header) | |
29 | for name, desc in sorted(exts.iteritems()): |
|
31 | for name, desc in sorted(exts.iteritems()): | |
30 | if '(DEPRECATED)' in desc and not showdeprecated: |
|
32 | if '(DEPRECATED)' in desc and not showdeprecated: | |
31 | continue |
|
33 | continue | |
32 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) |
|
34 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) | |
33 | return rst |
|
35 | return rst | |
34 |
|
36 | |||
35 | def extshelp(): |
|
37 | def extshelp(): | |
36 | rst = loaddoc('extensions')().splitlines(True) |
|
38 | rst = loaddoc('extensions')().splitlines(True) | |
37 | rst.extend(listexts( |
|
39 | rst.extend(listexts( | |
38 | _('enabled extensions:'), extensions.enabled(), showdeprecated=True)) |
|
40 | _('enabled extensions:'), extensions.enabled(), showdeprecated=True)) | |
39 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) |
|
41 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) | |
40 | doc = ''.join(rst) |
|
42 | doc = ''.join(rst) | |
41 | return doc |
|
43 | return doc | |
42 |
|
44 | |||
43 | def optrst(header, options, verbose): |
|
45 | def optrst(header, options, verbose): | |
44 | data = [] |
|
46 | data = [] | |
45 | multioccur = False |
|
47 | multioccur = False | |
46 | for option in options: |
|
48 | for option in options: | |
47 | if len(option) == 5: |
|
49 | if len(option) == 5: | |
48 | shortopt, longopt, default, desc, optlabel = option |
|
50 | shortopt, longopt, default, desc, optlabel = option | |
49 | else: |
|
51 | else: | |
50 | shortopt, longopt, default, desc = option |
|
52 | shortopt, longopt, default, desc = option | |
51 | optlabel = _("VALUE") # default label |
|
53 | optlabel = _("VALUE") # default label | |
52 |
|
54 | |||
53 | if not verbose and any(w in desc for w in _exclkeywords): |
|
55 | if not verbose and any(w in desc for w in _exclkeywords): | |
54 | continue |
|
56 | continue | |
55 |
|
57 | |||
56 | so = '' |
|
58 | so = '' | |
57 | if shortopt: |
|
59 | if shortopt: | |
58 | so = '-' + shortopt |
|
60 | so = '-' + shortopt | |
59 | lo = '--' + longopt |
|
61 | lo = '--' + longopt | |
60 | if default: |
|
62 | if default: | |
61 | desc += _(" (default: %s)") % default |
|
63 | desc += _(" (default: %s)") % default | |
62 |
|
64 | |||
63 | if isinstance(default, list): |
|
65 | if isinstance(default, list): | |
64 | lo += " %s [+]" % optlabel |
|
66 | lo += " %s [+]" % optlabel | |
65 | multioccur = True |
|
67 | multioccur = True | |
66 | elif (default is not None) and not isinstance(default, bool): |
|
68 | elif (default is not None) and not isinstance(default, bool): | |
67 | lo += " %s" % optlabel |
|
69 | lo += " %s" % optlabel | |
68 |
|
70 | |||
69 | data.append((so, lo, desc)) |
|
71 | data.append((so, lo, desc)) | |
70 |
|
72 | |||
71 | if multioccur: |
|
73 | if multioccur: | |
72 | header += (_(" ([+] can be repeated)")) |
|
74 | header += (_(" ([+] can be repeated)")) | |
73 |
|
75 | |||
74 | rst = ['\n%s:\n\n' % header] |
|
76 | rst = ['\n%s:\n\n' % header] | |
75 | rst.extend(minirst.maketable(data, 1)) |
|
77 | rst.extend(minirst.maketable(data, 1)) | |
76 |
|
78 | |||
77 | return ''.join(rst) |
|
79 | return ''.join(rst) | |
78 |
|
80 | |||
79 | def indicateomitted(rst, omitted, notomitted=None): |
|
81 | def indicateomitted(rst, omitted, notomitted=None): | |
80 | rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) |
|
82 | rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) | |
81 | if notomitted: |
|
83 | if notomitted: | |
82 | rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) |
|
84 | rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) | |
83 |
|
85 | |||
84 | def topicmatch(kw): |
|
86 | def topicmatch(kw): | |
85 | """Return help topics matching kw. |
|
87 | """Return help topics matching kw. | |
86 |
|
88 | |||
87 | Returns {'section': [(name, summary), ...], ...} where section is |
|
89 | Returns {'section': [(name, summary), ...], ...} where section is | |
88 | one of topics, commands, extensions, or extensioncommands. |
|
90 | one of topics, commands, extensions, or extensioncommands. | |
89 | """ |
|
91 | """ | |
90 | kw = encoding.lower(kw) |
|
92 | kw = encoding.lower(kw) | |
91 | def lowercontains(container): |
|
93 | def lowercontains(container): | |
92 | return kw in encoding.lower(container) # translated in helptable |
|
94 | return kw in encoding.lower(container) # translated in helptable | |
93 | results = {'topics': [], |
|
95 | results = {'topics': [], | |
94 | 'commands': [], |
|
96 | 'commands': [], | |
95 | 'extensions': [], |
|
97 | 'extensions': [], | |
96 | 'extensioncommands': [], |
|
98 | 'extensioncommands': [], | |
97 | } |
|
99 | } | |
98 | for names, header, doc in helptable: |
|
100 | for names, header, doc in helptable: | |
99 | # Old extensions may use a str as doc. |
|
101 | # Old extensions may use a str as doc. | |
100 | if (sum(map(lowercontains, names)) |
|
102 | if (sum(map(lowercontains, names)) | |
101 | or lowercontains(header) |
|
103 | or lowercontains(header) | |
102 | or (callable(doc) and lowercontains(doc()))): |
|
104 | or (callable(doc) and lowercontains(doc()))): | |
103 | results['topics'].append((names[0], header)) |
|
105 | results['topics'].append((names[0], header)) | |
104 | import commands # avoid cycle |
|
106 | import commands # avoid cycle | |
105 | for cmd, entry in commands.table.iteritems(): |
|
107 | for cmd, entry in commands.table.iteritems(): | |
106 | if len(entry) == 3: |
|
108 | if len(entry) == 3: | |
107 | summary = entry[2] |
|
109 | summary = entry[2] | |
108 | else: |
|
110 | else: | |
109 | summary = '' |
|
111 | summary = '' | |
110 | # translate docs *before* searching there |
|
112 | # translate docs *before* searching there | |
111 | docs = _(getattr(entry[0], '__doc__', None)) or '' |
|
113 | docs = _(getattr(entry[0], '__doc__', None)) or '' | |
112 | if kw in cmd or lowercontains(summary) or lowercontains(docs): |
|
114 | if kw in cmd or lowercontains(summary) or lowercontains(docs): | |
113 | doclines = docs.splitlines() |
|
115 | doclines = docs.splitlines() | |
114 | if doclines: |
|
116 | if doclines: | |
115 | summary = doclines[0] |
|
117 | summary = doclines[0] | |
116 | cmdname = cmd.split('|')[0].lstrip('^') |
|
118 | cmdname = cmd.split('|')[0].lstrip('^') | |
117 | results['commands'].append((cmdname, summary)) |
|
119 | results['commands'].append((cmdname, summary)) | |
118 | for name, docs in itertools.chain( |
|
120 | for name, docs in itertools.chain( | |
119 | extensions.enabled(False).iteritems(), |
|
121 | extensions.enabled(False).iteritems(), | |
120 | extensions.disabled().iteritems()): |
|
122 | extensions.disabled().iteritems()): | |
121 | # extensions.load ignores the UI argument |
|
123 | # extensions.load ignores the UI argument | |
122 | mod = extensions.load(None, name, '') |
|
124 | mod = extensions.load(None, name, '') | |
123 | name = name.split('.')[-1] |
|
125 | name = name.split('.')[-1] | |
124 | if lowercontains(name) or lowercontains(docs): |
|
126 | if lowercontains(name) or lowercontains(docs): | |
125 | # extension docs are already translated |
|
127 | # extension docs are already translated | |
126 | results['extensions'].append((name, docs.splitlines()[0])) |
|
128 | results['extensions'].append((name, docs.splitlines()[0])) | |
127 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): |
|
129 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): | |
128 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
|
130 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): | |
129 | cmdname = cmd.split('|')[0].lstrip('^') |
|
131 | cmdname = cmd.split('|')[0].lstrip('^') | |
130 | if entry[0].__doc__: |
|
132 | if entry[0].__doc__: | |
131 | cmddoc = gettext(entry[0].__doc__).splitlines()[0] |
|
133 | cmddoc = gettext(entry[0].__doc__).splitlines()[0] | |
132 | else: |
|
134 | else: | |
133 | cmddoc = _('(no help text available)') |
|
135 | cmddoc = _('(no help text available)') | |
134 | results['extensioncommands'].append((cmdname, cmddoc)) |
|
136 | results['extensioncommands'].append((cmdname, cmddoc)) | |
135 | return results |
|
137 | return results | |
136 |
|
138 | |||
137 | def loaddoc(topic): |
|
139 | def loaddoc(topic): | |
138 | """Return a delayed loader for help/topic.txt.""" |
|
140 | """Return a delayed loader for help/topic.txt.""" | |
139 |
|
141 | |||
140 | def loader(): |
|
142 | def loader(): | |
141 | docdir = os.path.join(util.datapath, 'help') |
|
143 | docdir = os.path.join(util.datapath, 'help') | |
142 | path = os.path.join(docdir, topic + ".txt") |
|
144 | path = os.path.join(docdir, topic + ".txt") | |
143 | doc = gettext(util.readfile(path)) |
|
145 | doc = gettext(util.readfile(path)) | |
144 | for rewriter in helphooks.get(topic, []): |
|
146 | for rewriter in helphooks.get(topic, []): | |
145 | doc = rewriter(topic, doc) |
|
147 | doc = rewriter(topic, doc) | |
146 | return doc |
|
148 | return doc | |
147 |
|
149 | |||
148 | return loader |
|
150 | return loader | |
149 |
|
151 | |||
150 | helptable = sorted([ |
|
152 | helptable = sorted([ | |
151 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), |
|
153 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), | |
152 | (["dates"], _("Date Formats"), loaddoc('dates')), |
|
154 | (["dates"], _("Date Formats"), loaddoc('dates')), | |
153 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), |
|
155 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), | |
154 | (['environment', 'env'], _('Environment Variables'), |
|
156 | (['environment', 'env'], _('Environment Variables'), | |
155 | loaddoc('environment')), |
|
157 | loaddoc('environment')), | |
156 | (['revisions', 'revs'], _('Specifying Single Revisions'), |
|
158 | (['revisions', 'revs'], _('Specifying Single Revisions'), | |
157 | loaddoc('revisions')), |
|
159 | loaddoc('revisions')), | |
158 | (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'), |
|
160 | (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'), | |
159 | loaddoc('multirevs')), |
|
161 | loaddoc('multirevs')), | |
160 | (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')), |
|
162 | (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')), | |
161 | (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')), |
|
163 | (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')), | |
162 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), |
|
164 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), | |
163 | (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')), |
|
165 | (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')), | |
164 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), |
|
166 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), | |
165 | loaddoc('templates')), |
|
167 | loaddoc('templates')), | |
166 | (['urls'], _('URL Paths'), loaddoc('urls')), |
|
168 | (['urls'], _('URL Paths'), loaddoc('urls')), | |
167 | (["extensions"], _("Using Additional Features"), extshelp), |
|
169 | (["extensions"], _("Using Additional Features"), extshelp), | |
168 | (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')), |
|
170 | (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')), | |
169 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), |
|
171 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), | |
170 | (["glossary"], _("Glossary"), loaddoc('glossary')), |
|
172 | (["glossary"], _("Glossary"), loaddoc('glossary')), | |
171 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), |
|
173 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), | |
172 | loaddoc('hgignore')), |
|
174 | loaddoc('hgignore')), | |
173 | (["phases"], _("Working with Phases"), loaddoc('phases')), |
|
175 | (["phases"], _("Working with Phases"), loaddoc('phases')), | |
174 | (['scripting'], _('Using Mercurial from scripts and automation'), |
|
176 | (['scripting'], _('Using Mercurial from scripts and automation'), | |
175 | loaddoc('scripting')), |
|
177 | loaddoc('scripting')), | |
176 | ]) |
|
178 | ]) | |
177 |
|
179 | |||
178 | # Map topics to lists of callable taking the current topic help and |
|
180 | # Map topics to lists of callable taking the current topic help and | |
179 | # returning the updated version |
|
181 | # returning the updated version | |
180 | helphooks = {} |
|
182 | helphooks = {} | |
181 |
|
183 | |||
182 | def addtopichook(topic, rewriter): |
|
184 | def addtopichook(topic, rewriter): | |
183 | helphooks.setdefault(topic, []).append(rewriter) |
|
185 | helphooks.setdefault(topic, []).append(rewriter) | |
184 |
|
186 | |||
185 | def makeitemsdoc(topic, doc, marker, items, dedent=False): |
|
187 | def makeitemsdoc(topic, doc, marker, items, dedent=False): | |
186 | """Extract docstring from the items key to function mapping, build a |
|
188 | """Extract docstring from the items key to function mapping, build a | |
187 | single documentation block and use it to overwrite the marker in doc. |
|
189 | single documentation block and use it to overwrite the marker in doc. | |
188 | """ |
|
190 | """ | |
189 | entries = [] |
|
191 | entries = [] | |
190 | for name in sorted(items): |
|
192 | for name in sorted(items): | |
191 | text = (items[name].__doc__ or '').rstrip() |
|
193 | text = (items[name].__doc__ or '').rstrip() | |
192 | if not text: |
|
194 | if not text: | |
193 | continue |
|
195 | continue | |
194 | text = gettext(text) |
|
196 | text = gettext(text) | |
195 | if dedent: |
|
197 | if dedent: | |
196 | text = textwrap.dedent(text) |
|
198 | text = textwrap.dedent(text) | |
197 | lines = text.splitlines() |
|
199 | lines = text.splitlines() | |
198 | doclines = [(lines[0])] |
|
200 | doclines = [(lines[0])] | |
199 | for l in lines[1:]: |
|
201 | for l in lines[1:]: | |
200 | # Stop once we find some Python doctest |
|
202 | # Stop once we find some Python doctest | |
201 | if l.strip().startswith('>>>'): |
|
203 | if l.strip().startswith('>>>'): | |
202 | break |
|
204 | break | |
203 | if dedent: |
|
205 | if dedent: | |
204 | doclines.append(l.rstrip()) |
|
206 | doclines.append(l.rstrip()) | |
205 | else: |
|
207 | else: | |
206 | doclines.append(' ' + l.strip()) |
|
208 | doclines.append(' ' + l.strip()) | |
207 | entries.append('\n'.join(doclines)) |
|
209 | entries.append('\n'.join(doclines)) | |
208 | entries = '\n\n'.join(entries) |
|
210 | entries = '\n\n'.join(entries) | |
209 | return doc.replace(marker, entries) |
|
211 | return doc.replace(marker, entries) | |
210 |
|
212 | |||
211 | def addtopicsymbols(topic, marker, symbols, dedent=False): |
|
213 | def addtopicsymbols(topic, marker, symbols, dedent=False): | |
212 | def add(topic, doc): |
|
214 | def add(topic, doc): | |
213 | return makeitemsdoc(topic, doc, marker, symbols, dedent=dedent) |
|
215 | return makeitemsdoc(topic, doc, marker, symbols, dedent=dedent) | |
214 | addtopichook(topic, add) |
|
216 | addtopichook(topic, add) | |
215 |
|
217 | |||
216 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) |
|
218 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) | |
217 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', |
|
219 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', | |
218 | filemerge.internalsdoc) |
|
220 | filemerge.internalsdoc) | |
219 | addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) |
|
221 | addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) | |
220 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords) |
|
222 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords) | |
221 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) |
|
223 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) | |
222 | addtopicsymbols('templates', '.. functionsmarker', templater.funcs) |
|
224 | addtopicsymbols('templates', '.. functionsmarker', templater.funcs) | |
223 | addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, |
|
225 | addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, | |
224 | dedent=True) |
|
226 | dedent=True) | |
225 |
|
227 | |||
226 | def help_(ui, name, unknowncmd=False, full=True, **opts): |
|
228 | def help_(ui, name, unknowncmd=False, full=True, **opts): | |
227 | ''' |
|
229 | ''' | |
228 | Generate the help for 'name' as unformatted restructured text. If |
|
230 | Generate the help for 'name' as unformatted restructured text. If | |
229 | 'name' is None, describe the commands available. |
|
231 | 'name' is None, describe the commands available. | |
230 | ''' |
|
232 | ''' | |
231 |
|
233 | |||
232 | import commands # avoid cycle |
|
234 | import commands # avoid cycle | |
233 |
|
235 | |||
234 | def helpcmd(name): |
|
236 | def helpcmd(name): | |
235 | try: |
|
237 | try: | |
236 | aliases, entry = cmdutil.findcmd(name, commands.table, |
|
238 | aliases, entry = cmdutil.findcmd(name, commands.table, | |
237 | strict=unknowncmd) |
|
239 | strict=unknowncmd) | |
238 | except error.AmbiguousCommand as inst: |
|
240 | except error.AmbiguousCommand as inst: | |
239 | # py3k fix: except vars can't be used outside the scope of the |
|
241 | # py3k fix: except vars can't be used outside the scope of the | |
240 | # except block, nor can be used inside a lambda. python issue4617 |
|
242 | # except block, nor can be used inside a lambda. python issue4617 | |
241 | prefix = inst.args[0] |
|
243 | prefix = inst.args[0] | |
242 | select = lambda c: c.lstrip('^').startswith(prefix) |
|
244 | select = lambda c: c.lstrip('^').startswith(prefix) | |
243 | rst = helplist(select) |
|
245 | rst = helplist(select) | |
244 | return rst |
|
246 | return rst | |
245 |
|
247 | |||
246 | rst = [] |
|
248 | rst = [] | |
247 |
|
249 | |||
248 | # check if it's an invalid alias and display its error if it is |
|
250 | # check if it's an invalid alias and display its error if it is | |
249 | if getattr(entry[0], 'badalias', None): |
|
251 | if getattr(entry[0], 'badalias', None): | |
250 | rst.append(entry[0].badalias + '\n') |
|
252 | rst.append(entry[0].badalias + '\n') | |
251 | if entry[0].unknowncmd: |
|
253 | if entry[0].unknowncmd: | |
252 | try: |
|
254 | try: | |
253 | rst.extend(helpextcmd(entry[0].cmdname)) |
|
255 | rst.extend(helpextcmd(entry[0].cmdname)) | |
254 | except error.UnknownCommand: |
|
256 | except error.UnknownCommand: | |
255 | pass |
|
257 | pass | |
256 | return rst |
|
258 | return rst | |
257 |
|
259 | |||
258 | # synopsis |
|
260 | # synopsis | |
259 | if len(entry) > 2: |
|
261 | if len(entry) > 2: | |
260 | if entry[2].startswith('hg'): |
|
262 | if entry[2].startswith('hg'): | |
261 | rst.append("%s\n" % entry[2]) |
|
263 | rst.append("%s\n" % entry[2]) | |
262 | else: |
|
264 | else: | |
263 | rst.append('hg %s %s\n' % (aliases[0], entry[2])) |
|
265 | rst.append('hg %s %s\n' % (aliases[0], entry[2])) | |
264 | else: |
|
266 | else: | |
265 | rst.append('hg %s\n' % aliases[0]) |
|
267 | rst.append('hg %s\n' % aliases[0]) | |
266 | # aliases |
|
268 | # aliases | |
267 | if full and not ui.quiet and len(aliases) > 1: |
|
269 | if full and not ui.quiet and len(aliases) > 1: | |
268 | rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:])) |
|
270 | rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:])) | |
269 | rst.append('\n') |
|
271 | rst.append('\n') | |
270 |
|
272 | |||
271 | # description |
|
273 | # description | |
272 | doc = gettext(entry[0].__doc__) |
|
274 | doc = gettext(entry[0].__doc__) | |
273 | if not doc: |
|
275 | if not doc: | |
274 | doc = _("(no help text available)") |
|
276 | doc = _("(no help text available)") | |
275 | if util.safehasattr(entry[0], 'definition'): # aliased command |
|
277 | if util.safehasattr(entry[0], 'definition'): # aliased command | |
276 | if entry[0].definition.startswith('!'): # shell alias |
|
278 | if entry[0].definition.startswith('!'): # shell alias | |
277 | doc = _('shell alias for::\n\n %s') % entry[0].definition[1:] |
|
279 | doc = _('shell alias for::\n\n %s') % entry[0].definition[1:] | |
278 | else: |
|
280 | else: | |
279 | doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) |
|
281 | doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) | |
280 | doc = doc.splitlines(True) |
|
282 | doc = doc.splitlines(True) | |
281 | if ui.quiet or not full: |
|
283 | if ui.quiet or not full: | |
282 | rst.append(doc[0]) |
|
284 | rst.append(doc[0]) | |
283 | else: |
|
285 | else: | |
284 | rst.extend(doc) |
|
286 | rst.extend(doc) | |
285 | rst.append('\n') |
|
287 | rst.append('\n') | |
286 |
|
288 | |||
287 | # check if this command shadows a non-trivial (multi-line) |
|
289 | # check if this command shadows a non-trivial (multi-line) | |
288 | # extension help text |
|
290 | # extension help text | |
289 | try: |
|
291 | try: | |
290 | mod = extensions.find(name) |
|
292 | mod = extensions.find(name) | |
291 | doc = gettext(mod.__doc__) or '' |
|
293 | doc = gettext(mod.__doc__) or '' | |
292 | if '\n' in doc.strip(): |
|
294 | if '\n' in doc.strip(): | |
293 | msg = _('(use "hg help -e %s" to show help for ' |
|
295 | msg = _('(use "hg help -e %s" to show help for ' | |
294 | 'the %s extension)') % (name, name) |
|
296 | 'the %s extension)') % (name, name) | |
295 | rst.append('\n%s\n' % msg) |
|
297 | rst.append('\n%s\n' % msg) | |
296 | except KeyError: |
|
298 | except KeyError: | |
297 | pass |
|
299 | pass | |
298 |
|
300 | |||
299 | # options |
|
301 | # options | |
300 | if not ui.quiet and entry[1]: |
|
302 | if not ui.quiet and entry[1]: | |
301 | rst.append(optrst(_("options"), entry[1], ui.verbose)) |
|
303 | rst.append(optrst(_("options"), entry[1], ui.verbose)) | |
302 |
|
304 | |||
303 | if ui.verbose: |
|
305 | if ui.verbose: | |
304 | rst.append(optrst(_("global options"), |
|
306 | rst.append(optrst(_("global options"), | |
305 | commands.globalopts, ui.verbose)) |
|
307 | commands.globalopts, ui.verbose)) | |
306 |
|
308 | |||
307 | if not ui.verbose: |
|
309 | if not ui.verbose: | |
308 | if not full: |
|
310 | if not full: | |
309 | rst.append(_('\n(use "hg %s -h" to show more help)\n') |
|
311 | rst.append(_('\n(use "hg %s -h" to show more help)\n') | |
310 | % name) |
|
312 | % name) | |
311 | elif not ui.quiet: |
|
313 | elif not ui.quiet: | |
312 | rst.append(_('\n(some details hidden, use --verbose ' |
|
314 | rst.append(_('\n(some details hidden, use --verbose ' | |
313 | 'to show complete help)')) |
|
315 | 'to show complete help)')) | |
314 |
|
316 | |||
315 | return rst |
|
317 | return rst | |
316 |
|
318 | |||
317 |
|
319 | |||
318 | def helplist(select=None): |
|
320 | def helplist(select=None): | |
319 | # list of commands |
|
321 | # list of commands | |
320 | if name == "shortlist": |
|
322 | if name == "shortlist": | |
321 | header = _('basic commands:\n\n') |
|
323 | header = _('basic commands:\n\n') | |
322 | elif name == "debug": |
|
324 | elif name == "debug": | |
323 | header = _('debug commands (internal and unsupported):\n\n') |
|
325 | header = _('debug commands (internal and unsupported):\n\n') | |
324 | else: |
|
326 | else: | |
325 | header = _('list of commands:\n\n') |
|
327 | header = _('list of commands:\n\n') | |
326 |
|
328 | |||
327 | h = {} |
|
329 | h = {} | |
328 | cmds = {} |
|
330 | cmds = {} | |
329 | for c, e in commands.table.iteritems(): |
|
331 | for c, e in commands.table.iteritems(): | |
330 | f = c.split("|", 1)[0] |
|
332 | f = c.split("|", 1)[0] | |
331 | if select and not select(f): |
|
333 | if select and not select(f): | |
332 | continue |
|
334 | continue | |
333 | if (not select and name != 'shortlist' and |
|
335 | if (not select and name != 'shortlist' and | |
334 | e[0].__module__ != commands.__name__): |
|
336 | e[0].__module__ != commands.__name__): | |
335 | continue |
|
337 | continue | |
336 | if name == "shortlist" and not f.startswith("^"): |
|
338 | if name == "shortlist" and not f.startswith("^"): | |
337 | continue |
|
339 | continue | |
338 | f = f.lstrip("^") |
|
340 | f = f.lstrip("^") | |
339 | if not ui.debugflag and f.startswith("debug") and name != "debug": |
|
341 | if not ui.debugflag and f.startswith("debug") and name != "debug": | |
340 | continue |
|
342 | continue | |
341 | doc = e[0].__doc__ |
|
343 | doc = e[0].__doc__ | |
342 | if doc and 'DEPRECATED' in doc and not ui.verbose: |
|
344 | if doc and '(DEPRECATED)' in doc and not ui.verbose: | |
343 | continue |
|
345 | continue | |
344 | doc = gettext(doc) |
|
346 | doc = gettext(doc) | |
345 | if not doc: |
|
347 | if not doc: | |
346 | doc = _("(no help text available)") |
|
348 | doc = _("(no help text available)") | |
347 | h[f] = doc.splitlines()[0].rstrip() |
|
349 | h[f] = doc.splitlines()[0].rstrip() | |
348 | cmds[f] = c.lstrip("^") |
|
350 | cmds[f] = c.lstrip("^") | |
349 |
|
351 | |||
350 | rst = [] |
|
352 | rst = [] | |
351 | if not h: |
|
353 | if not h: | |
352 | if not ui.quiet: |
|
354 | if not ui.quiet: | |
353 | rst.append(_('no commands defined\n')) |
|
355 | rst.append(_('no commands defined\n')) | |
354 | return rst |
|
356 | return rst | |
355 |
|
357 | |||
356 | if not ui.quiet: |
|
358 | if not ui.quiet: | |
357 | rst.append(header) |
|
359 | rst.append(header) | |
358 | fns = sorted(h) |
|
360 | fns = sorted(h) | |
359 | for f in fns: |
|
361 | for f in fns: | |
360 | if ui.verbose: |
|
362 | if ui.verbose: | |
361 | commacmds = cmds[f].replace("|",", ") |
|
363 | commacmds = cmds[f].replace("|",", ") | |
362 | rst.append(" :%s: %s\n" % (commacmds, h[f])) |
|
364 | rst.append(" :%s: %s\n" % (commacmds, h[f])) | |
363 | else: |
|
365 | else: | |
364 | rst.append(' :%s: %s\n' % (f, h[f])) |
|
366 | rst.append(' :%s: %s\n' % (f, h[f])) | |
365 |
|
367 | |||
366 | if not name: |
|
368 | if not name: | |
367 | exts = listexts(_('enabled extensions:'), extensions.enabled()) |
|
369 | exts = listexts(_('enabled extensions:'), extensions.enabled()) | |
368 | if exts: |
|
370 | if exts: | |
369 | rst.append('\n') |
|
371 | rst.append('\n') | |
370 | rst.extend(exts) |
|
372 | rst.extend(exts) | |
371 |
|
373 | |||
372 | rst.append(_("\nadditional help topics:\n\n")) |
|
374 | rst.append(_("\nadditional help topics:\n\n")) | |
373 | topics = [] |
|
375 | topics = [] | |
374 | for names, header, doc in helptable: |
|
376 | for names, header, doc in helptable: | |
375 | topics.append((names[0], header)) |
|
377 | topics.append((names[0], header)) | |
376 | for t, desc in topics: |
|
378 | for t, desc in topics: | |
377 | rst.append(" :%s: %s\n" % (t, desc)) |
|
379 | rst.append(" :%s: %s\n" % (t, desc)) | |
378 |
|
380 | |||
379 | if ui.quiet: |
|
381 | if ui.quiet: | |
380 | pass |
|
382 | pass | |
381 | elif ui.verbose: |
|
383 | elif ui.verbose: | |
382 | rst.append('\n%s\n' % optrst(_("global options"), |
|
384 | rst.append('\n%s\n' % optrst(_("global options"), | |
383 | commands.globalopts, ui.verbose)) |
|
385 | commands.globalopts, ui.verbose)) | |
384 | if name == 'shortlist': |
|
386 | if name == 'shortlist': | |
385 | rst.append(_('\n(use "hg help" for the full list ' |
|
387 | rst.append(_('\n(use "hg help" for the full list ' | |
386 | 'of commands)\n')) |
|
388 | 'of commands)\n')) | |
387 | else: |
|
389 | else: | |
388 | if name == 'shortlist': |
|
390 | if name == 'shortlist': | |
389 | rst.append(_('\n(use "hg help" for the full list of commands ' |
|
391 | rst.append(_('\n(use "hg help" for the full list of commands ' | |
390 | 'or "hg -v" for details)\n')) |
|
392 | 'or "hg -v" for details)\n')) | |
391 | elif name and not full: |
|
393 | elif name and not full: | |
392 | rst.append(_('\n(use "hg help %s" to show the full help ' |
|
394 | rst.append(_('\n(use "hg help %s" to show the full help ' | |
393 | 'text)\n') % name) |
|
395 | 'text)\n') % name) | |
394 | elif name and cmds and name in cmds.keys(): |
|
396 | elif name and cmds and name in cmds.keys(): | |
395 | rst.append(_('\n(use "hg help -v -e %s" to show built-in ' |
|
397 | rst.append(_('\n(use "hg help -v -e %s" to show built-in ' | |
396 | 'aliases and global options)\n') % name) |
|
398 | 'aliases and global options)\n') % name) | |
397 | else: |
|
399 | else: | |
398 | rst.append(_('\n(use "hg help -v%s" to show built-in aliases ' |
|
400 | rst.append(_('\n(use "hg help -v%s" to show built-in aliases ' | |
399 | 'and global options)\n') |
|
401 | 'and global options)\n') | |
400 | % (name and " " + name or "")) |
|
402 | % (name and " " + name or "")) | |
401 | return rst |
|
403 | return rst | |
402 |
|
404 | |||
403 | def helptopic(name): |
|
405 | def helptopic(name): | |
404 | for names, header, doc in helptable: |
|
406 | for names, header, doc in helptable: | |
405 | if name in names: |
|
407 | if name in names: | |
406 | break |
|
408 | break | |
407 | else: |
|
409 | else: | |
408 | raise error.UnknownCommand(name) |
|
410 | raise error.UnknownCommand(name) | |
409 |
|
411 | |||
410 | rst = [minirst.section(header)] |
|
412 | rst = [minirst.section(header)] | |
411 |
|
413 | |||
412 | # description |
|
414 | # description | |
413 | if not doc: |
|
415 | if not doc: | |
414 | rst.append(" %s\n" % _("(no help text available)")) |
|
416 | rst.append(" %s\n" % _("(no help text available)")) | |
415 | if callable(doc): |
|
417 | if callable(doc): | |
416 | rst += [" %s\n" % l for l in doc().splitlines()] |
|
418 | rst += [" %s\n" % l for l in doc().splitlines()] | |
417 |
|
419 | |||
418 | if not ui.verbose: |
|
420 | if not ui.verbose: | |
419 | omitted = _('(some details hidden, use --verbose' |
|
421 | omitted = _('(some details hidden, use --verbose' | |
420 | ' to show complete help)') |
|
422 | ' to show complete help)') | |
421 | indicateomitted(rst, omitted) |
|
423 | indicateomitted(rst, omitted) | |
422 |
|
424 | |||
423 | try: |
|
425 | try: | |
424 | cmdutil.findcmd(name, commands.table) |
|
426 | cmdutil.findcmd(name, commands.table) | |
425 | rst.append(_('\nuse "hg help -c %s" to see help for ' |
|
427 | rst.append(_('\nuse "hg help -c %s" to see help for ' | |
426 | 'the %s command\n') % (name, name)) |
|
428 | 'the %s command\n') % (name, name)) | |
427 | except error.UnknownCommand: |
|
429 | except error.UnknownCommand: | |
428 | pass |
|
430 | pass | |
429 | return rst |
|
431 | return rst | |
430 |
|
432 | |||
431 | def helpext(name): |
|
433 | def helpext(name): | |
432 | try: |
|
434 | try: | |
433 | mod = extensions.find(name) |
|
435 | mod = extensions.find(name) | |
434 | doc = gettext(mod.__doc__) or _('no help text available') |
|
436 | doc = gettext(mod.__doc__) or _('no help text available') | |
435 | except KeyError: |
|
437 | except KeyError: | |
436 | mod = None |
|
438 | mod = None | |
437 | doc = extensions.disabledext(name) |
|
439 | doc = extensions.disabledext(name) | |
438 | if not doc: |
|
440 | if not doc: | |
439 | raise error.UnknownCommand(name) |
|
441 | raise error.UnknownCommand(name) | |
440 |
|
442 | |||
441 | if '\n' not in doc: |
|
443 | if '\n' not in doc: | |
442 | head, tail = doc, "" |
|
444 | head, tail = doc, "" | |
443 | else: |
|
445 | else: | |
444 | head, tail = doc.split('\n', 1) |
|
446 | head, tail = doc.split('\n', 1) | |
445 | rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)] |
|
447 | rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)] | |
446 | if tail: |
|
448 | if tail: | |
447 | rst.extend(tail.splitlines(True)) |
|
449 | rst.extend(tail.splitlines(True)) | |
448 | rst.append('\n') |
|
450 | rst.append('\n') | |
449 |
|
451 | |||
450 | if not ui.verbose: |
|
452 | if not ui.verbose: | |
451 | omitted = _('(some details hidden, use --verbose' |
|
453 | omitted = _('(some details hidden, use --verbose' | |
452 | ' to show complete help)') |
|
454 | ' to show complete help)') | |
453 | indicateomitted(rst, omitted) |
|
455 | indicateomitted(rst, omitted) | |
454 |
|
456 | |||
455 | if mod: |
|
457 | if mod: | |
456 | try: |
|
458 | try: | |
457 | ct = mod.cmdtable |
|
459 | ct = mod.cmdtable | |
458 | except AttributeError: |
|
460 | except AttributeError: | |
459 | ct = {} |
|
461 | ct = {} | |
460 | modcmds = set([c.split('|', 1)[0] for c in ct]) |
|
462 | modcmds = set([c.split('|', 1)[0] for c in ct]) | |
461 | rst.extend(helplist(modcmds.__contains__)) |
|
463 | rst.extend(helplist(modcmds.__contains__)) | |
462 | else: |
|
464 | else: | |
463 | rst.append(_('(use "hg help extensions" for information on enabling' |
|
465 | rst.append(_('(use "hg help extensions" for information on enabling' | |
464 | ' extensions)\n')) |
|
466 | ' extensions)\n')) | |
465 | return rst |
|
467 | return rst | |
466 |
|
468 | |||
467 | def helpextcmd(name): |
|
469 | def helpextcmd(name): | |
468 | cmd, ext, mod = extensions.disabledcmd(ui, name, |
|
470 | cmd, ext, mod = extensions.disabledcmd(ui, name, | |
469 | ui.configbool('ui', 'strict')) |
|
471 | ui.configbool('ui', 'strict')) | |
470 | doc = gettext(mod.__doc__).splitlines()[0] |
|
472 | doc = gettext(mod.__doc__).splitlines()[0] | |
471 |
|
473 | |||
472 | rst = listexts(_("'%s' is provided by the following " |
|
474 | rst = listexts(_("'%s' is provided by the following " | |
473 | "extension:") % cmd, {ext: doc}, indent=4) |
|
475 | "extension:") % cmd, {ext: doc}, indent=4) | |
474 | rst.append('\n') |
|
476 | rst.append('\n') | |
475 | rst.append(_('(use "hg help extensions" for information on enabling ' |
|
477 | rst.append(_('(use "hg help extensions" for information on enabling ' | |
476 | 'extensions)\n')) |
|
478 | 'extensions)\n')) | |
477 | return rst |
|
479 | return rst | |
478 |
|
480 | |||
479 |
|
481 | |||
480 | rst = [] |
|
482 | rst = [] | |
481 | kw = opts.get('keyword') |
|
483 | kw = opts.get('keyword') | |
482 | if kw: |
|
484 | if kw: | |
483 | matches = topicmatch(name) |
|
485 | matches = topicmatch(name) | |
484 | helpareas = [] |
|
486 | helpareas = [] | |
485 | if opts.get('extension'): |
|
487 | if opts.get('extension'): | |
486 | helpareas += [('extensions', _('Extensions'))] |
|
488 | helpareas += [('extensions', _('Extensions'))] | |
487 | if opts.get('command'): |
|
489 | if opts.get('command'): | |
488 | helpareas += [('commands', _('Commands'))] |
|
490 | helpareas += [('commands', _('Commands'))] | |
489 | if not helpareas: |
|
491 | if not helpareas: | |
490 | helpareas = [('topics', _('Topics')), |
|
492 | helpareas = [('topics', _('Topics')), | |
491 | ('commands', _('Commands')), |
|
493 | ('commands', _('Commands')), | |
492 | ('extensions', _('Extensions')), |
|
494 | ('extensions', _('Extensions')), | |
493 | ('extensioncommands', _('Extension Commands'))] |
|
495 | ('extensioncommands', _('Extension Commands'))] | |
494 | for t, title in helpareas: |
|
496 | for t, title in helpareas: | |
495 | if matches[t]: |
|
497 | if matches[t]: | |
496 | rst.append('%s:\n\n' % title) |
|
498 | rst.append('%s:\n\n' % title) | |
497 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) |
|
499 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) | |
498 | rst.append('\n') |
|
500 | rst.append('\n') | |
499 | if not rst: |
|
501 | if not rst: | |
500 | msg = _('no matches') |
|
502 | msg = _('no matches') | |
501 | hint = _('try "hg help" for a list of topics') |
|
503 | hint = _('try "hg help" for a list of topics') | |
502 | raise util.Abort(msg, hint=hint) |
|
504 | raise util.Abort(msg, hint=hint) | |
503 | elif name and name != 'shortlist': |
|
505 | elif name and name != 'shortlist': | |
504 | queries = [] |
|
506 | queries = [] | |
505 | if unknowncmd: |
|
507 | if unknowncmd: | |
506 | queries += [helpextcmd] |
|
508 | queries += [helpextcmd] | |
507 | if opts.get('extension'): |
|
509 | if opts.get('extension'): | |
508 | queries += [helpext] |
|
510 | queries += [helpext] | |
509 | if opts.get('command'): |
|
511 | if opts.get('command'): | |
510 | queries += [helpcmd] |
|
512 | queries += [helpcmd] | |
511 | if not queries: |
|
513 | if not queries: | |
512 | queries = (helptopic, helpcmd, helpext, helpextcmd) |
|
514 | queries = (helptopic, helpcmd, helpext, helpextcmd) | |
513 | for f in queries: |
|
515 | for f in queries: | |
514 | try: |
|
516 | try: | |
515 | rst = f(name) |
|
517 | rst = f(name) | |
516 | break |
|
518 | break | |
517 | except error.UnknownCommand: |
|
519 | except error.UnknownCommand: | |
518 | pass |
|
520 | pass | |
519 | else: |
|
521 | else: | |
520 | if unknowncmd: |
|
522 | if unknowncmd: | |
521 | raise error.UnknownCommand(name) |
|
523 | raise error.UnknownCommand(name) | |
522 | else: |
|
524 | else: | |
523 | msg = _('no such help topic: %s') % name |
|
525 | msg = _('no such help topic: %s') % name | |
524 | hint = _('try "hg help --keyword %s"') % name |
|
526 | hint = _('try "hg help --keyword %s"') % name | |
525 | raise util.Abort(msg, hint=hint) |
|
527 | raise util.Abort(msg, hint=hint) | |
526 | else: |
|
528 | else: | |
527 | # program name |
|
529 | # program name | |
528 | if not ui.quiet: |
|
530 | if not ui.quiet: | |
529 | rst = [_("Mercurial Distributed SCM\n"), '\n'] |
|
531 | rst = [_("Mercurial Distributed SCM\n"), '\n'] | |
530 | rst.extend(helplist()) |
|
532 | rst.extend(helplist()) | |
531 |
|
533 | |||
532 | return ''.join(rst) |
|
534 | return ''.join(rst) |
@@ -1,2364 +1,2364 b'' | |||||
1 | Short help: |
|
1 | Short help: | |
2 |
|
2 | |||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM | |
5 |
|
5 | |||
6 | basic commands: |
|
6 | basic commands: | |
7 |
|
7 | |||
8 | add add the specified files on the next commit |
|
8 | add add the specified files on the next commit | |
9 | annotate show changeset information by line for each file |
|
9 | annotate show changeset information by line for each file | |
10 | clone make a copy of an existing repository |
|
10 | clone make a copy of an existing repository | |
11 | commit commit the specified files or all outstanding changes |
|
11 | commit commit the specified files or all outstanding changes | |
12 | diff diff repository (or selected files) |
|
12 | diff diff repository (or selected files) | |
13 | export dump the header and diffs for one or more changesets |
|
13 | export dump the header and diffs for one or more changesets | |
14 | forget forget the specified files on the next commit |
|
14 | forget forget the specified files on the next commit | |
15 | init create a new repository in the given directory |
|
15 | init create a new repository in the given directory | |
16 | log show revision history of entire repository or files |
|
16 | log show revision history of entire repository or files | |
17 | merge merge another revision into working directory |
|
17 | merge merge another revision into working directory | |
18 | pull pull changes from the specified source |
|
18 | pull pull changes from the specified source | |
19 | push push changes to the specified destination |
|
19 | push push changes to the specified destination | |
20 | remove remove the specified files on the next commit |
|
20 | remove remove the specified files on the next commit | |
21 | serve start stand-alone webserver |
|
21 | serve start stand-alone webserver | |
22 | status show changed files in the working directory |
|
22 | status show changed files in the working directory | |
23 | summary summarize working directory state |
|
23 | summary summarize working directory state | |
24 | update update working directory (or switch revisions) |
|
24 | update update working directory (or switch revisions) | |
25 |
|
25 | |||
26 | (use "hg help" for the full list of commands or "hg -v" for details) |
|
26 | (use "hg help" for the full list of commands or "hg -v" for details) | |
27 |
|
27 | |||
28 | $ hg -q |
|
28 | $ hg -q | |
29 | add add the specified files on the next commit |
|
29 | add add the specified files on the next commit | |
30 | annotate show changeset information by line for each file |
|
30 | annotate show changeset information by line for each file | |
31 | clone make a copy of an existing repository |
|
31 | clone make a copy of an existing repository | |
32 | commit commit the specified files or all outstanding changes |
|
32 | commit commit the specified files or all outstanding changes | |
33 | diff diff repository (or selected files) |
|
33 | diff diff repository (or selected files) | |
34 | export dump the header and diffs for one or more changesets |
|
34 | export dump the header and diffs for one or more changesets | |
35 | forget forget the specified files on the next commit |
|
35 | forget forget the specified files on the next commit | |
36 | init create a new repository in the given directory |
|
36 | init create a new repository in the given directory | |
37 | log show revision history of entire repository or files |
|
37 | log show revision history of entire repository or files | |
38 | merge merge another revision into working directory |
|
38 | merge merge another revision into working directory | |
39 | pull pull changes from the specified source |
|
39 | pull pull changes from the specified source | |
40 | push push changes to the specified destination |
|
40 | push push changes to the specified destination | |
41 | remove remove the specified files on the next commit |
|
41 | remove remove the specified files on the next commit | |
42 | serve start stand-alone webserver |
|
42 | serve start stand-alone webserver | |
43 | status show changed files in the working directory |
|
43 | status show changed files in the working directory | |
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
47 | $ hg help |
|
47 | $ hg help | |
48 | Mercurial Distributed SCM |
|
48 | Mercurial Distributed SCM | |
49 |
|
49 | |||
50 | list of commands: |
|
50 | list of commands: | |
51 |
|
51 | |||
52 | add add the specified files on the next commit |
|
52 | add add the specified files on the next commit | |
53 | addremove add all new files, delete all missing files |
|
53 | addremove add all new files, delete all missing files | |
54 | annotate show changeset information by line for each file |
|
54 | annotate show changeset information by line for each file | |
55 | archive create an unversioned archive of a repository revision |
|
55 | archive create an unversioned archive of a repository revision | |
56 | backout reverse effect of earlier changeset |
|
56 | backout reverse effect of earlier changeset | |
57 | bisect subdivision search of changesets |
|
57 | bisect subdivision search of changesets | |
58 | bookmarks create a new bookmark or list existing bookmarks |
|
58 | bookmarks create a new bookmark or list existing bookmarks | |
59 | branch set or show the current branch name |
|
59 | branch set or show the current branch name | |
60 | branches list repository named branches |
|
60 | branches list repository named branches | |
61 | bundle create a changegroup file |
|
61 | bundle create a changegroup file | |
62 | cat output the current or given revision of files |
|
62 | cat output the current or given revision of files | |
63 | clone make a copy of an existing repository |
|
63 | clone make a copy of an existing repository | |
64 | commit commit the specified files or all outstanding changes |
|
64 | commit commit the specified files or all outstanding changes | |
65 | config show combined config settings from all hgrc files |
|
65 | config show combined config settings from all hgrc files | |
66 | copy mark files as copied for the next commit |
|
66 | copy mark files as copied for the next commit | |
67 | diff diff repository (or selected files) |
|
67 | diff diff repository (or selected files) | |
68 | export dump the header and diffs for one or more changesets |
|
68 | export dump the header and diffs for one or more changesets | |
69 | files list tracked files |
|
69 | files list tracked files | |
70 | forget forget the specified files on the next commit |
|
70 | forget forget the specified files on the next commit | |
71 | graft copy changes from other branches onto the current branch |
|
71 | graft copy changes from other branches onto the current branch | |
72 | grep search for a pattern in specified files and revisions |
|
72 | grep search for a pattern in specified files and revisions | |
73 | heads show branch heads |
|
73 | heads show branch heads | |
74 | help show help for a given topic or a help overview |
|
74 | help show help for a given topic or a help overview | |
75 | identify identify the working directory or specified revision |
|
75 | identify identify the working directory or specified revision | |
76 | import import an ordered set of patches |
|
76 | import import an ordered set of patches | |
77 | incoming show new changesets found in source |
|
77 | incoming show new changesets found in source | |
78 | init create a new repository in the given directory |
|
78 | init create a new repository in the given directory | |
79 | log show revision history of entire repository or files |
|
79 | log show revision history of entire repository or files | |
80 | manifest output the current or given revision of the project manifest |
|
80 | manifest output the current or given revision of the project manifest | |
81 | merge merge another revision into working directory |
|
81 | merge merge another revision into working directory | |
82 | outgoing show changesets not found in the destination |
|
82 | outgoing show changesets not found in the destination | |
83 | paths show aliases for remote repositories |
|
83 | paths show aliases for remote repositories | |
84 | phase set or show the current phase name |
|
84 | phase set or show the current phase name | |
85 | pull pull changes from the specified source |
|
85 | pull pull changes from the specified source | |
86 | push push changes to the specified destination |
|
86 | push push changes to the specified destination | |
87 | recover roll back an interrupted transaction |
|
87 | recover roll back an interrupted transaction | |
88 | remove remove the specified files on the next commit |
|
88 | remove remove the specified files on the next commit | |
89 | rename rename files; equivalent of copy + remove |
|
89 | rename rename files; equivalent of copy + remove | |
90 | resolve redo merges or set/view the merge status of files |
|
90 | resolve redo merges or set/view the merge status of files | |
91 | revert restore files to their checkout state |
|
91 | revert restore files to their checkout state | |
92 | root print the root (top) of the current working directory |
|
92 | root print the root (top) of the current working directory | |
93 | serve start stand-alone webserver |
|
93 | serve start stand-alone webserver | |
94 | status show changed files in the working directory |
|
94 | status show changed files in the working directory | |
95 | summary summarize working directory state |
|
95 | summary summarize working directory state | |
96 | tag add one or more tags for the current or given revision |
|
96 | tag add one or more tags for the current or given revision | |
97 | tags list repository tags |
|
97 | tags list repository tags | |
98 | unbundle apply one or more changegroup files |
|
98 | unbundle apply one or more changegroup files | |
99 | update update working directory (or switch revisions) |
|
99 | update update working directory (or switch revisions) | |
100 | verify verify the integrity of the repository |
|
100 | verify verify the integrity of the repository | |
101 | version output version and copyright information |
|
101 | version output version and copyright information | |
102 |
|
102 | |||
103 | additional help topics: |
|
103 | additional help topics: | |
104 |
|
104 | |||
105 | config Configuration Files |
|
105 | config Configuration Files | |
106 | dates Date Formats |
|
106 | dates Date Formats | |
107 | diffs Diff Formats |
|
107 | diffs Diff Formats | |
108 | environment Environment Variables |
|
108 | environment Environment Variables | |
109 | extensions Using Additional Features |
|
109 | extensions Using Additional Features | |
110 | filesets Specifying File Sets |
|
110 | filesets Specifying File Sets | |
111 | glossary Glossary |
|
111 | glossary Glossary | |
112 | hgignore Syntax for Mercurial Ignore Files |
|
112 | hgignore Syntax for Mercurial Ignore Files | |
113 | hgweb Configuring hgweb |
|
113 | hgweb Configuring hgweb | |
114 | merge-tools Merge Tools |
|
114 | merge-tools Merge Tools | |
115 | multirevs Specifying Multiple Revisions |
|
115 | multirevs Specifying Multiple Revisions | |
116 | patterns File Name Patterns |
|
116 | patterns File Name Patterns | |
117 | phases Working with Phases |
|
117 | phases Working with Phases | |
118 | revisions Specifying Single Revisions |
|
118 | revisions Specifying Single Revisions | |
119 | revsets Specifying Revision Sets |
|
119 | revsets Specifying Revision Sets | |
120 | scripting Using Mercurial from scripts and automation |
|
120 | scripting Using Mercurial from scripts and automation | |
121 | subrepos Subrepositories |
|
121 | subrepos Subrepositories | |
122 | templating Template Usage |
|
122 | templating Template Usage | |
123 | urls URL Paths |
|
123 | urls URL Paths | |
124 |
|
124 | |||
125 | (use "hg help -v" to show built-in aliases and global options) |
|
125 | (use "hg help -v" to show built-in aliases and global options) | |
126 |
|
126 | |||
127 | $ hg -q help |
|
127 | $ hg -q help | |
128 | add add the specified files on the next commit |
|
128 | add add the specified files on the next commit | |
129 | addremove add all new files, delete all missing files |
|
129 | addremove add all new files, delete all missing files | |
130 | annotate show changeset information by line for each file |
|
130 | annotate show changeset information by line for each file | |
131 | archive create an unversioned archive of a repository revision |
|
131 | archive create an unversioned archive of a repository revision | |
132 | backout reverse effect of earlier changeset |
|
132 | backout reverse effect of earlier changeset | |
133 | bisect subdivision search of changesets |
|
133 | bisect subdivision search of changesets | |
134 | bookmarks create a new bookmark or list existing bookmarks |
|
134 | bookmarks create a new bookmark or list existing bookmarks | |
135 | branch set or show the current branch name |
|
135 | branch set or show the current branch name | |
136 | branches list repository named branches |
|
136 | branches list repository named branches | |
137 | bundle create a changegroup file |
|
137 | bundle create a changegroup file | |
138 | cat output the current or given revision of files |
|
138 | cat output the current or given revision of files | |
139 | clone make a copy of an existing repository |
|
139 | clone make a copy of an existing repository | |
140 | commit commit the specified files or all outstanding changes |
|
140 | commit commit the specified files or all outstanding changes | |
141 | config show combined config settings from all hgrc files |
|
141 | config show combined config settings from all hgrc files | |
142 | copy mark files as copied for the next commit |
|
142 | copy mark files as copied for the next commit | |
143 | diff diff repository (or selected files) |
|
143 | diff diff repository (or selected files) | |
144 | export dump the header and diffs for one or more changesets |
|
144 | export dump the header and diffs for one or more changesets | |
145 | files list tracked files |
|
145 | files list tracked files | |
146 | forget forget the specified files on the next commit |
|
146 | forget forget the specified files on the next commit | |
147 | graft copy changes from other branches onto the current branch |
|
147 | graft copy changes from other branches onto the current branch | |
148 | grep search for a pattern in specified files and revisions |
|
148 | grep search for a pattern in specified files and revisions | |
149 | heads show branch heads |
|
149 | heads show branch heads | |
150 | help show help for a given topic or a help overview |
|
150 | help show help for a given topic or a help overview | |
151 | identify identify the working directory or specified revision |
|
151 | identify identify the working directory or specified revision | |
152 | import import an ordered set of patches |
|
152 | import import an ordered set of patches | |
153 | incoming show new changesets found in source |
|
153 | incoming show new changesets found in source | |
154 | init create a new repository in the given directory |
|
154 | init create a new repository in the given directory | |
155 | log show revision history of entire repository or files |
|
155 | log show revision history of entire repository or files | |
156 | manifest output the current or given revision of the project manifest |
|
156 | manifest output the current or given revision of the project manifest | |
157 | merge merge another revision into working directory |
|
157 | merge merge another revision into working directory | |
158 | outgoing show changesets not found in the destination |
|
158 | outgoing show changesets not found in the destination | |
159 | paths show aliases for remote repositories |
|
159 | paths show aliases for remote repositories | |
160 | phase set or show the current phase name |
|
160 | phase set or show the current phase name | |
161 | pull pull changes from the specified source |
|
161 | pull pull changes from the specified source | |
162 | push push changes to the specified destination |
|
162 | push push changes to the specified destination | |
163 | recover roll back an interrupted transaction |
|
163 | recover roll back an interrupted transaction | |
164 | remove remove the specified files on the next commit |
|
164 | remove remove the specified files on the next commit | |
165 | rename rename files; equivalent of copy + remove |
|
165 | rename rename files; equivalent of copy + remove | |
166 | resolve redo merges or set/view the merge status of files |
|
166 | resolve redo merges or set/view the merge status of files | |
167 | revert restore files to their checkout state |
|
167 | revert restore files to their checkout state | |
168 | root print the root (top) of the current working directory |
|
168 | root print the root (top) of the current working directory | |
169 | serve start stand-alone webserver |
|
169 | serve start stand-alone webserver | |
170 | status show changed files in the working directory |
|
170 | status show changed files in the working directory | |
171 | summary summarize working directory state |
|
171 | summary summarize working directory state | |
172 | tag add one or more tags for the current or given revision |
|
172 | tag add one or more tags for the current or given revision | |
173 | tags list repository tags |
|
173 | tags list repository tags | |
174 | unbundle apply one or more changegroup files |
|
174 | unbundle apply one or more changegroup files | |
175 | update update working directory (or switch revisions) |
|
175 | update update working directory (or switch revisions) | |
176 | verify verify the integrity of the repository |
|
176 | verify verify the integrity of the repository | |
177 | version output version and copyright information |
|
177 | version output version and copyright information | |
178 |
|
178 | |||
179 | additional help topics: |
|
179 | additional help topics: | |
180 |
|
180 | |||
181 | config Configuration Files |
|
181 | config Configuration Files | |
182 | dates Date Formats |
|
182 | dates Date Formats | |
183 | diffs Diff Formats |
|
183 | diffs Diff Formats | |
184 | environment Environment Variables |
|
184 | environment Environment Variables | |
185 | extensions Using Additional Features |
|
185 | extensions Using Additional Features | |
186 | filesets Specifying File Sets |
|
186 | filesets Specifying File Sets | |
187 | glossary Glossary |
|
187 | glossary Glossary | |
188 | hgignore Syntax for Mercurial Ignore Files |
|
188 | hgignore Syntax for Mercurial Ignore Files | |
189 | hgweb Configuring hgweb |
|
189 | hgweb Configuring hgweb | |
190 | merge-tools Merge Tools |
|
190 | merge-tools Merge Tools | |
191 | multirevs Specifying Multiple Revisions |
|
191 | multirevs Specifying Multiple Revisions | |
192 | patterns File Name Patterns |
|
192 | patterns File Name Patterns | |
193 | phases Working with Phases |
|
193 | phases Working with Phases | |
194 | revisions Specifying Single Revisions |
|
194 | revisions Specifying Single Revisions | |
195 | revsets Specifying Revision Sets |
|
195 | revsets Specifying Revision Sets | |
196 | scripting Using Mercurial from scripts and automation |
|
196 | scripting Using Mercurial from scripts and automation | |
197 | subrepos Subrepositories |
|
197 | subrepos Subrepositories | |
198 | templating Template Usage |
|
198 | templating Template Usage | |
199 | urls URL Paths |
|
199 | urls URL Paths | |
200 |
|
200 | |||
201 | Test extension help: |
|
201 | Test extension help: | |
202 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
202 | $ hg help extensions --config extensions.rebase= --config extensions.children= | |
203 | Using Additional Features |
|
203 | Using Additional Features | |
204 | """"""""""""""""""""""""" |
|
204 | """"""""""""""""""""""""" | |
205 |
|
205 | |||
206 | Mercurial has the ability to add new features through the use of |
|
206 | Mercurial has the ability to add new features through the use of | |
207 | extensions. Extensions may add new commands, add options to existing |
|
207 | extensions. Extensions may add new commands, add options to existing | |
208 | commands, change the default behavior of commands, or implement hooks. |
|
208 | commands, change the default behavior of commands, or implement hooks. | |
209 |
|
209 | |||
210 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
210 | To enable the "foo" extension, either shipped with Mercurial or in the | |
211 | Python search path, create an entry for it in your configuration file, |
|
211 | Python search path, create an entry for it in your configuration file, | |
212 | like this: |
|
212 | like this: | |
213 |
|
213 | |||
214 | [extensions] |
|
214 | [extensions] | |
215 | foo = |
|
215 | foo = | |
216 |
|
216 | |||
217 | You may also specify the full path to an extension: |
|
217 | You may also specify the full path to an extension: | |
218 |
|
218 | |||
219 | [extensions] |
|
219 | [extensions] | |
220 | myfeature = ~/.hgext/myfeature.py |
|
220 | myfeature = ~/.hgext/myfeature.py | |
221 |
|
221 | |||
222 | See "hg help config" for more information on configuration files. |
|
222 | See "hg help config" for more information on configuration files. | |
223 |
|
223 | |||
224 | Extensions are not loaded by default for a variety of reasons: they can |
|
224 | Extensions are not loaded by default for a variety of reasons: they can | |
225 | increase startup overhead; they may be meant for advanced usage only; they |
|
225 | increase startup overhead; they may be meant for advanced usage only; they | |
226 | may provide potentially dangerous abilities (such as letting you destroy |
|
226 | may provide potentially dangerous abilities (such as letting you destroy | |
227 | or modify history); they might not be ready for prime time; or they may |
|
227 | or modify history); they might not be ready for prime time; or they may | |
228 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
228 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
229 | to activate extensions as needed. |
|
229 | to activate extensions as needed. | |
230 |
|
230 | |||
231 | To explicitly disable an extension enabled in a configuration file of |
|
231 | To explicitly disable an extension enabled in a configuration file of | |
232 | broader scope, prepend its path with !: |
|
232 | broader scope, prepend its path with !: | |
233 |
|
233 | |||
234 | [extensions] |
|
234 | [extensions] | |
235 | # disabling extension bar residing in /path/to/extension/bar.py |
|
235 | # disabling extension bar residing in /path/to/extension/bar.py | |
236 | bar = !/path/to/extension/bar.py |
|
236 | bar = !/path/to/extension/bar.py | |
237 | # ditto, but no path was supplied for extension baz |
|
237 | # ditto, but no path was supplied for extension baz | |
238 | baz = ! |
|
238 | baz = ! | |
239 |
|
239 | |||
240 | enabled extensions: |
|
240 | enabled extensions: | |
241 |
|
241 | |||
242 | children command to display child changesets (DEPRECATED) |
|
242 | children command to display child changesets (DEPRECATED) | |
243 | rebase command to move sets of revisions to a different ancestor |
|
243 | rebase command to move sets of revisions to a different ancestor | |
244 |
|
244 | |||
245 | disabled extensions: |
|
245 | disabled extensions: | |
246 |
|
246 | |||
247 | acl hooks for controlling repository access |
|
247 | acl hooks for controlling repository access | |
248 | blackbox log repository events to a blackbox for debugging |
|
248 | blackbox log repository events to a blackbox for debugging | |
249 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
249 | bugzilla hooks for integrating with the Bugzilla bug tracker | |
250 | censor erase file content at a given revision |
|
250 | censor erase file content at a given revision | |
251 | churn command to display statistics about repository history |
|
251 | churn command to display statistics about repository history | |
252 | color colorize output from some commands |
|
252 | color colorize output from some commands | |
253 | convert import revisions from foreign VCS repositories into |
|
253 | convert import revisions from foreign VCS repositories into | |
254 | Mercurial |
|
254 | Mercurial | |
255 | eol automatically manage newlines in repository files |
|
255 | eol automatically manage newlines in repository files | |
256 | extdiff command to allow external programs to compare revisions |
|
256 | extdiff command to allow external programs to compare revisions | |
257 | factotum http authentication with factotum |
|
257 | factotum http authentication with factotum | |
258 | gpg commands to sign and verify changesets |
|
258 | gpg commands to sign and verify changesets | |
259 | hgcia hooks for integrating with the CIA.vc notification service |
|
259 | hgcia hooks for integrating with the CIA.vc notification service | |
260 | hgk browse the repository in a graphical way |
|
260 | hgk browse the repository in a graphical way | |
261 | highlight syntax highlighting for hgweb (requires Pygments) |
|
261 | highlight syntax highlighting for hgweb (requires Pygments) | |
262 | histedit interactive history editing |
|
262 | histedit interactive history editing | |
263 | keyword expand keywords in tracked files |
|
263 | keyword expand keywords in tracked files | |
264 | largefiles track large binary files |
|
264 | largefiles track large binary files | |
265 | mq manage a stack of patches |
|
265 | mq manage a stack of patches | |
266 | notify hooks for sending email push notifications |
|
266 | notify hooks for sending email push notifications | |
267 | pager browse command output with an external pager |
|
267 | pager browse command output with an external pager | |
268 | patchbomb command to send changesets as (a series of) patch emails |
|
268 | patchbomb command to send changesets as (a series of) patch emails | |
269 | purge command to delete untracked files from the working |
|
269 | purge command to delete untracked files from the working | |
270 | directory |
|
270 | directory | |
271 | record commands to interactively select changes for |
|
271 | record commands to interactively select changes for | |
272 | commit/qrefresh |
|
272 | commit/qrefresh | |
273 | relink recreates hardlinks between repository clones |
|
273 | relink recreates hardlinks between repository clones | |
274 | schemes extend schemes with shortcuts to repository swarms |
|
274 | schemes extend schemes with shortcuts to repository swarms | |
275 | share share a common history between several working directories |
|
275 | share share a common history between several working directories | |
276 | shelve save and restore changes to the working directory |
|
276 | shelve save and restore changes to the working directory | |
277 | strip strip changesets and their descendants from history |
|
277 | strip strip changesets and their descendants from history | |
278 | transplant command to transplant changesets from another branch |
|
278 | transplant command to transplant changesets from another branch | |
279 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
279 | win32mbcs allow the use of MBCS paths with problematic encodings | |
280 | zeroconf discover and advertise repositories on the local network |
|
280 | zeroconf discover and advertise repositories on the local network | |
281 | Test short command list with verbose option |
|
281 | Test short command list with verbose option | |
282 |
|
282 | |||
283 | $ hg -v help shortlist |
|
283 | $ hg -v help shortlist | |
284 | Mercurial Distributed SCM |
|
284 | Mercurial Distributed SCM | |
285 |
|
285 | |||
286 | basic commands: |
|
286 | basic commands: | |
287 |
|
287 | |||
288 | add add the specified files on the next commit |
|
288 | add add the specified files on the next commit | |
289 | annotate, blame |
|
289 | annotate, blame | |
290 | show changeset information by line for each file |
|
290 | show changeset information by line for each file | |
291 | clone make a copy of an existing repository |
|
291 | clone make a copy of an existing repository | |
292 | commit, ci commit the specified files or all outstanding changes |
|
292 | commit, ci commit the specified files or all outstanding changes | |
293 | diff diff repository (or selected files) |
|
293 | diff diff repository (or selected files) | |
294 | export dump the header and diffs for one or more changesets |
|
294 | export dump the header and diffs for one or more changesets | |
295 | forget forget the specified files on the next commit |
|
295 | forget forget the specified files on the next commit | |
296 | init create a new repository in the given directory |
|
296 | init create a new repository in the given directory | |
297 | log, history show revision history of entire repository or files |
|
297 | log, history show revision history of entire repository or files | |
298 | merge merge another revision into working directory |
|
298 | merge merge another revision into working directory | |
299 | pull pull changes from the specified source |
|
299 | pull pull changes from the specified source | |
300 | push push changes to the specified destination |
|
300 | push push changes to the specified destination | |
301 | remove, rm remove the specified files on the next commit |
|
301 | remove, rm remove the specified files on the next commit | |
302 | serve start stand-alone webserver |
|
302 | serve start stand-alone webserver | |
303 | status, st show changed files in the working directory |
|
303 | status, st show changed files in the working directory | |
304 | summary, sum summarize working directory state |
|
304 | summary, sum summarize working directory state | |
305 | update, up, checkout, co |
|
305 | update, up, checkout, co | |
306 | update working directory (or switch revisions) |
|
306 | update working directory (or switch revisions) | |
307 |
|
307 | |||
308 | global options ([+] can be repeated): |
|
308 | global options ([+] can be repeated): | |
309 |
|
309 | |||
310 | -R --repository REPO repository root directory or name of overlay bundle |
|
310 | -R --repository REPO repository root directory or name of overlay bundle | |
311 | file |
|
311 | file | |
312 | --cwd DIR change working directory |
|
312 | --cwd DIR change working directory | |
313 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
313 | -y --noninteractive do not prompt, automatically pick the first choice for | |
314 | all prompts |
|
314 | all prompts | |
315 | -q --quiet suppress output |
|
315 | -q --quiet suppress output | |
316 | -v --verbose enable additional output |
|
316 | -v --verbose enable additional output | |
317 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
317 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
318 | --debug enable debugging output |
|
318 | --debug enable debugging output | |
319 | --debugger start debugger |
|
319 | --debugger start debugger | |
320 | --encoding ENCODE set the charset encoding (default: ascii) |
|
320 | --encoding ENCODE set the charset encoding (default: ascii) | |
321 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
321 | --encodingmode MODE set the charset encoding mode (default: strict) | |
322 | --traceback always print a traceback on exception |
|
322 | --traceback always print a traceback on exception | |
323 | --time time how long the command takes |
|
323 | --time time how long the command takes | |
324 | --profile print command execution profile |
|
324 | --profile print command execution profile | |
325 | --version output version information and exit |
|
325 | --version output version information and exit | |
326 | -h --help display help and exit |
|
326 | -h --help display help and exit | |
327 | --hidden consider hidden changesets |
|
327 | --hidden consider hidden changesets | |
328 |
|
328 | |||
329 | (use "hg help" for the full list of commands) |
|
329 | (use "hg help" for the full list of commands) | |
330 |
|
330 | |||
331 | $ hg add -h |
|
331 | $ hg add -h | |
332 | hg add [OPTION]... [FILE]... |
|
332 | hg add [OPTION]... [FILE]... | |
333 |
|
333 | |||
334 | add the specified files on the next commit |
|
334 | add the specified files on the next commit | |
335 |
|
335 | |||
336 | Schedule files to be version controlled and added to the repository. |
|
336 | Schedule files to be version controlled and added to the repository. | |
337 |
|
337 | |||
338 | The files will be added to the repository at the next commit. To undo an |
|
338 | The files will be added to the repository at the next commit. To undo an | |
339 | add before that, see "hg forget". |
|
339 | add before that, see "hg forget". | |
340 |
|
340 | |||
341 | If no names are given, add all files to the repository. |
|
341 | If no names are given, add all files to the repository. | |
342 |
|
342 | |||
343 | Returns 0 if all files are successfully added. |
|
343 | Returns 0 if all files are successfully added. | |
344 |
|
344 | |||
345 | options ([+] can be repeated): |
|
345 | options ([+] can be repeated): | |
346 |
|
346 | |||
347 | -I --include PATTERN [+] include names matching the given patterns |
|
347 | -I --include PATTERN [+] include names matching the given patterns | |
348 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
348 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
349 | -S --subrepos recurse into subrepositories |
|
349 | -S --subrepos recurse into subrepositories | |
350 | -n --dry-run do not perform actions, just print output |
|
350 | -n --dry-run do not perform actions, just print output | |
351 |
|
351 | |||
352 | (some details hidden, use --verbose to show complete help) |
|
352 | (some details hidden, use --verbose to show complete help) | |
353 |
|
353 | |||
354 | Verbose help for add |
|
354 | Verbose help for add | |
355 |
|
355 | |||
356 | $ hg add -hv |
|
356 | $ hg add -hv | |
357 | hg add [OPTION]... [FILE]... |
|
357 | hg add [OPTION]... [FILE]... | |
358 |
|
358 | |||
359 | add the specified files on the next commit |
|
359 | add the specified files on the next commit | |
360 |
|
360 | |||
361 | Schedule files to be version controlled and added to the repository. |
|
361 | Schedule files to be version controlled and added to the repository. | |
362 |
|
362 | |||
363 | The files will be added to the repository at the next commit. To undo an |
|
363 | The files will be added to the repository at the next commit. To undo an | |
364 | add before that, see "hg forget". |
|
364 | add before that, see "hg forget". | |
365 |
|
365 | |||
366 | If no names are given, add all files to the repository. |
|
366 | If no names are given, add all files to the repository. | |
367 |
|
367 | |||
368 | An example showing how new (unknown) files are added automatically by "hg |
|
368 | An example showing how new (unknown) files are added automatically by "hg | |
369 | add": |
|
369 | add": | |
370 |
|
370 | |||
371 | $ ls |
|
371 | $ ls | |
372 | foo.c |
|
372 | foo.c | |
373 | $ hg status |
|
373 | $ hg status | |
374 | ? foo.c |
|
374 | ? foo.c | |
375 | $ hg add |
|
375 | $ hg add | |
376 | adding foo.c |
|
376 | adding foo.c | |
377 | $ hg status |
|
377 | $ hg status | |
378 | A foo.c |
|
378 | A foo.c | |
379 |
|
379 | |||
380 | Returns 0 if all files are successfully added. |
|
380 | Returns 0 if all files are successfully added. | |
381 |
|
381 | |||
382 | options ([+] can be repeated): |
|
382 | options ([+] can be repeated): | |
383 |
|
383 | |||
384 | -I --include PATTERN [+] include names matching the given patterns |
|
384 | -I --include PATTERN [+] include names matching the given patterns | |
385 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
385 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
386 | -S --subrepos recurse into subrepositories |
|
386 | -S --subrepos recurse into subrepositories | |
387 | -n --dry-run do not perform actions, just print output |
|
387 | -n --dry-run do not perform actions, just print output | |
388 |
|
388 | |||
389 | global options ([+] can be repeated): |
|
389 | global options ([+] can be repeated): | |
390 |
|
390 | |||
391 | -R --repository REPO repository root directory or name of overlay bundle |
|
391 | -R --repository REPO repository root directory or name of overlay bundle | |
392 | file |
|
392 | file | |
393 | --cwd DIR change working directory |
|
393 | --cwd DIR change working directory | |
394 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
394 | -y --noninteractive do not prompt, automatically pick the first choice for | |
395 | all prompts |
|
395 | all prompts | |
396 | -q --quiet suppress output |
|
396 | -q --quiet suppress output | |
397 | -v --verbose enable additional output |
|
397 | -v --verbose enable additional output | |
398 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
398 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
399 | --debug enable debugging output |
|
399 | --debug enable debugging output | |
400 | --debugger start debugger |
|
400 | --debugger start debugger | |
401 | --encoding ENCODE set the charset encoding (default: ascii) |
|
401 | --encoding ENCODE set the charset encoding (default: ascii) | |
402 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
402 | --encodingmode MODE set the charset encoding mode (default: strict) | |
403 | --traceback always print a traceback on exception |
|
403 | --traceback always print a traceback on exception | |
404 | --time time how long the command takes |
|
404 | --time time how long the command takes | |
405 | --profile print command execution profile |
|
405 | --profile print command execution profile | |
406 | --version output version information and exit |
|
406 | --version output version information and exit | |
407 | -h --help display help and exit |
|
407 | -h --help display help and exit | |
408 | --hidden consider hidden changesets |
|
408 | --hidden consider hidden changesets | |
409 |
|
409 | |||
410 | Test help option with version option |
|
410 | Test help option with version option | |
411 |
|
411 | |||
412 | $ hg add -h --version |
|
412 | $ hg add -h --version | |
413 | Mercurial Distributed SCM (version *) (glob) |
|
413 | Mercurial Distributed SCM (version *) (glob) | |
414 | (see http://mercurial.selenic.com for more information) |
|
414 | (see http://mercurial.selenic.com for more information) | |
415 |
|
415 | |||
416 | Copyright (C) 2005-2015 Matt Mackall and others |
|
416 | Copyright (C) 2005-2015 Matt Mackall and others | |
417 | This is free software; see the source for copying conditions. There is NO |
|
417 | This is free software; see the source for copying conditions. There is NO | |
418 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
418 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
419 |
|
419 | |||
420 | $ hg add --skjdfks |
|
420 | $ hg add --skjdfks | |
421 | hg add: option --skjdfks not recognized |
|
421 | hg add: option --skjdfks not recognized | |
422 | hg add [OPTION]... [FILE]... |
|
422 | hg add [OPTION]... [FILE]... | |
423 |
|
423 | |||
424 | add the specified files on the next commit |
|
424 | add the specified files on the next commit | |
425 |
|
425 | |||
426 | options ([+] can be repeated): |
|
426 | options ([+] can be repeated): | |
427 |
|
427 | |||
428 | -I --include PATTERN [+] include names matching the given patterns |
|
428 | -I --include PATTERN [+] include names matching the given patterns | |
429 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
429 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
430 | -S --subrepos recurse into subrepositories |
|
430 | -S --subrepos recurse into subrepositories | |
431 | -n --dry-run do not perform actions, just print output |
|
431 | -n --dry-run do not perform actions, just print output | |
432 |
|
432 | |||
433 | (use "hg add -h" to show more help) |
|
433 | (use "hg add -h" to show more help) | |
434 | [255] |
|
434 | [255] | |
435 |
|
435 | |||
436 | Test ambiguous command help |
|
436 | Test ambiguous command help | |
437 |
|
437 | |||
438 | $ hg help ad |
|
438 | $ hg help ad | |
439 | list of commands: |
|
439 | list of commands: | |
440 |
|
440 | |||
441 | add add the specified files on the next commit |
|
441 | add add the specified files on the next commit | |
442 | addremove add all new files, delete all missing files |
|
442 | addremove add all new files, delete all missing files | |
443 |
|
443 | |||
444 | (use "hg help -v ad" to show built-in aliases and global options) |
|
444 | (use "hg help -v ad" to show built-in aliases and global options) | |
445 |
|
445 | |||
446 | Test command without options |
|
446 | Test command without options | |
447 |
|
447 | |||
448 | $ hg help verify |
|
448 | $ hg help verify | |
449 | hg verify |
|
449 | hg verify | |
450 |
|
450 | |||
451 | verify the integrity of the repository |
|
451 | verify the integrity of the repository | |
452 |
|
452 | |||
453 | Verify the integrity of the current repository. |
|
453 | Verify the integrity of the current repository. | |
454 |
|
454 | |||
455 | This will perform an extensive check of the repository's integrity, |
|
455 | This will perform an extensive check of the repository's integrity, | |
456 | validating the hashes and checksums of each entry in the changelog, |
|
456 | validating the hashes and checksums of each entry in the changelog, | |
457 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
457 | manifest, and tracked files, as well as the integrity of their crosslinks | |
458 | and indices. |
|
458 | and indices. | |
459 |
|
459 | |||
460 | Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more |
|
460 | Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more | |
461 | information about recovery from corruption of the repository. |
|
461 | information about recovery from corruption of the repository. | |
462 |
|
462 | |||
463 | Returns 0 on success, 1 if errors are encountered. |
|
463 | Returns 0 on success, 1 if errors are encountered. | |
464 |
|
464 | |||
465 | (some details hidden, use --verbose to show complete help) |
|
465 | (some details hidden, use --verbose to show complete help) | |
466 |
|
466 | |||
467 | $ hg help diff |
|
467 | $ hg help diff | |
468 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
468 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
469 |
|
469 | |||
470 | diff repository (or selected files) |
|
470 | diff repository (or selected files) | |
471 |
|
471 | |||
472 | Show differences between revisions for the specified files. |
|
472 | Show differences between revisions for the specified files. | |
473 |
|
473 | |||
474 | Differences between files are shown using the unified diff format. |
|
474 | Differences between files are shown using the unified diff format. | |
475 |
|
475 | |||
476 | Note: |
|
476 | Note: | |
477 | diff may generate unexpected results for merges, as it will default to |
|
477 | diff may generate unexpected results for merges, as it will default to | |
478 | comparing against the working directory's first parent changeset if no |
|
478 | comparing against the working directory's first parent changeset if no | |
479 | revisions are specified. |
|
479 | revisions are specified. | |
480 |
|
480 | |||
481 | When two revision arguments are given, then changes are shown between |
|
481 | When two revision arguments are given, then changes are shown between | |
482 | those revisions. If only one revision is specified then that revision is |
|
482 | those revisions. If only one revision is specified then that revision is | |
483 | compared to the working directory, and, when no revisions are specified, |
|
483 | compared to the working directory, and, when no revisions are specified, | |
484 | the working directory files are compared to its parent. |
|
484 | the working directory files are compared to its parent. | |
485 |
|
485 | |||
486 | Alternatively you can specify -c/--change with a revision to see the |
|
486 | Alternatively you can specify -c/--change with a revision to see the | |
487 | changes in that changeset relative to its first parent. |
|
487 | changes in that changeset relative to its first parent. | |
488 |
|
488 | |||
489 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
489 | Without the -a/--text option, diff will avoid generating diffs of files it | |
490 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
490 | detects as binary. With -a, diff will generate a diff anyway, probably | |
491 | with undesirable results. |
|
491 | with undesirable results. | |
492 |
|
492 | |||
493 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
493 | Use the -g/--git option to generate diffs in the git extended diff format. | |
494 | For more information, read "hg help diffs". |
|
494 | For more information, read "hg help diffs". | |
495 |
|
495 | |||
496 | Returns 0 on success. |
|
496 | Returns 0 on success. | |
497 |
|
497 | |||
498 | options ([+] can be repeated): |
|
498 | options ([+] can be repeated): | |
499 |
|
499 | |||
500 | -r --rev REV [+] revision |
|
500 | -r --rev REV [+] revision | |
501 | -c --change REV change made by revision |
|
501 | -c --change REV change made by revision | |
502 | -a --text treat all files as text |
|
502 | -a --text treat all files as text | |
503 | -g --git use git extended diff format |
|
503 | -g --git use git extended diff format | |
504 | --nodates omit dates from diff headers |
|
504 | --nodates omit dates from diff headers | |
505 | --noprefix omit a/ and b/ prefixes from filenames |
|
505 | --noprefix omit a/ and b/ prefixes from filenames | |
506 | -p --show-function show which function each change is in |
|
506 | -p --show-function show which function each change is in | |
507 | --reverse produce a diff that undoes the changes |
|
507 | --reverse produce a diff that undoes the changes | |
508 | -w --ignore-all-space ignore white space when comparing lines |
|
508 | -w --ignore-all-space ignore white space when comparing lines | |
509 | -b --ignore-space-change ignore changes in the amount of white space |
|
509 | -b --ignore-space-change ignore changes in the amount of white space | |
510 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
510 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
511 | -U --unified NUM number of lines of context to show |
|
511 | -U --unified NUM number of lines of context to show | |
512 | --stat output diffstat-style summary of changes |
|
512 | --stat output diffstat-style summary of changes | |
513 | --root DIR produce diffs relative to subdirectory |
|
513 | --root DIR produce diffs relative to subdirectory | |
514 | -I --include PATTERN [+] include names matching the given patterns |
|
514 | -I --include PATTERN [+] include names matching the given patterns | |
515 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
515 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
516 | -S --subrepos recurse into subrepositories |
|
516 | -S --subrepos recurse into subrepositories | |
517 |
|
517 | |||
518 | (some details hidden, use --verbose to show complete help) |
|
518 | (some details hidden, use --verbose to show complete help) | |
519 |
|
519 | |||
520 | $ hg help status |
|
520 | $ hg help status | |
521 | hg status [OPTION]... [FILE]... |
|
521 | hg status [OPTION]... [FILE]... | |
522 |
|
522 | |||
523 | aliases: st |
|
523 | aliases: st | |
524 |
|
524 | |||
525 | show changed files in the working directory |
|
525 | show changed files in the working directory | |
526 |
|
526 | |||
527 | Show status of files in the repository. If names are given, only files |
|
527 | Show status of files in the repository. If names are given, only files | |
528 | that match are shown. Files that are clean or ignored or the source of a |
|
528 | that match are shown. Files that are clean or ignored or the source of a | |
529 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
529 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
530 | -C/--copies or -A/--all are given. Unless options described with "show |
|
530 | -C/--copies or -A/--all are given. Unless options described with "show | |
531 | only ..." are given, the options -mardu are used. |
|
531 | only ..." are given, the options -mardu are used. | |
532 |
|
532 | |||
533 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
533 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
534 | explicitly requested with -u/--unknown or -i/--ignored. |
|
534 | explicitly requested with -u/--unknown or -i/--ignored. | |
535 |
|
535 | |||
536 | Note: |
|
536 | Note: | |
537 | status may appear to disagree with diff if permissions have changed or |
|
537 | status may appear to disagree with diff if permissions have changed or | |
538 | a merge has occurred. The standard diff format does not report |
|
538 | a merge has occurred. The standard diff format does not report | |
539 | permission changes and diff only reports changes relative to one merge |
|
539 | permission changes and diff only reports changes relative to one merge | |
540 | parent. |
|
540 | parent. | |
541 |
|
541 | |||
542 | If one revision is given, it is used as the base revision. If two |
|
542 | If one revision is given, it is used as the base revision. If two | |
543 | revisions are given, the differences between them are shown. The --change |
|
543 | revisions are given, the differences between them are shown. The --change | |
544 | option can also be used as a shortcut to list the changed files of a |
|
544 | option can also be used as a shortcut to list the changed files of a | |
545 | revision from its first parent. |
|
545 | revision from its first parent. | |
546 |
|
546 | |||
547 | The codes used to show the status of files are: |
|
547 | The codes used to show the status of files are: | |
548 |
|
548 | |||
549 | M = modified |
|
549 | M = modified | |
550 | A = added |
|
550 | A = added | |
551 | R = removed |
|
551 | R = removed | |
552 | C = clean |
|
552 | C = clean | |
553 | ! = missing (deleted by non-hg command, but still tracked) |
|
553 | ! = missing (deleted by non-hg command, but still tracked) | |
554 | ? = not tracked |
|
554 | ? = not tracked | |
555 | I = ignored |
|
555 | I = ignored | |
556 | = origin of the previous file (with --copies) |
|
556 | = origin of the previous file (with --copies) | |
557 |
|
557 | |||
558 | Returns 0 on success. |
|
558 | Returns 0 on success. | |
559 |
|
559 | |||
560 | options ([+] can be repeated): |
|
560 | options ([+] can be repeated): | |
561 |
|
561 | |||
562 | -A --all show status of all files |
|
562 | -A --all show status of all files | |
563 | -m --modified show only modified files |
|
563 | -m --modified show only modified files | |
564 | -a --added show only added files |
|
564 | -a --added show only added files | |
565 | -r --removed show only removed files |
|
565 | -r --removed show only removed files | |
566 | -d --deleted show only deleted (but tracked) files |
|
566 | -d --deleted show only deleted (but tracked) files | |
567 | -c --clean show only files without changes |
|
567 | -c --clean show only files without changes | |
568 | -u --unknown show only unknown (not tracked) files |
|
568 | -u --unknown show only unknown (not tracked) files | |
569 | -i --ignored show only ignored files |
|
569 | -i --ignored show only ignored files | |
570 | -n --no-status hide status prefix |
|
570 | -n --no-status hide status prefix | |
571 | -C --copies show source of copied files |
|
571 | -C --copies show source of copied files | |
572 | -0 --print0 end filenames with NUL, for use with xargs |
|
572 | -0 --print0 end filenames with NUL, for use with xargs | |
573 | --rev REV [+] show difference from revision |
|
573 | --rev REV [+] show difference from revision | |
574 | --change REV list the changed files of a revision |
|
574 | --change REV list the changed files of a revision | |
575 | -I --include PATTERN [+] include names matching the given patterns |
|
575 | -I --include PATTERN [+] include names matching the given patterns | |
576 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
576 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
577 | -S --subrepos recurse into subrepositories |
|
577 | -S --subrepos recurse into subrepositories | |
578 |
|
578 | |||
579 | (some details hidden, use --verbose to show complete help) |
|
579 | (some details hidden, use --verbose to show complete help) | |
580 |
|
580 | |||
581 | $ hg -q help status |
|
581 | $ hg -q help status | |
582 | hg status [OPTION]... [FILE]... |
|
582 | hg status [OPTION]... [FILE]... | |
583 |
|
583 | |||
584 | show changed files in the working directory |
|
584 | show changed files in the working directory | |
585 |
|
585 | |||
586 | $ hg help foo |
|
586 | $ hg help foo | |
587 | abort: no such help topic: foo |
|
587 | abort: no such help topic: foo | |
588 | (try "hg help --keyword foo") |
|
588 | (try "hg help --keyword foo") | |
589 | [255] |
|
589 | [255] | |
590 |
|
590 | |||
591 | $ hg skjdfks |
|
591 | $ hg skjdfks | |
592 | hg: unknown command 'skjdfks' |
|
592 | hg: unknown command 'skjdfks' | |
593 | Mercurial Distributed SCM |
|
593 | Mercurial Distributed SCM | |
594 |
|
594 | |||
595 | basic commands: |
|
595 | basic commands: | |
596 |
|
596 | |||
597 | add add the specified files on the next commit |
|
597 | add add the specified files on the next commit | |
598 | annotate show changeset information by line for each file |
|
598 | annotate show changeset information by line for each file | |
599 | clone make a copy of an existing repository |
|
599 | clone make a copy of an existing repository | |
600 | commit commit the specified files or all outstanding changes |
|
600 | commit commit the specified files or all outstanding changes | |
601 | diff diff repository (or selected files) |
|
601 | diff diff repository (or selected files) | |
602 | export dump the header and diffs for one or more changesets |
|
602 | export dump the header and diffs for one or more changesets | |
603 | forget forget the specified files on the next commit |
|
603 | forget forget the specified files on the next commit | |
604 | init create a new repository in the given directory |
|
604 | init create a new repository in the given directory | |
605 | log show revision history of entire repository or files |
|
605 | log show revision history of entire repository or files | |
606 | merge merge another revision into working directory |
|
606 | merge merge another revision into working directory | |
607 | pull pull changes from the specified source |
|
607 | pull pull changes from the specified source | |
608 | push push changes to the specified destination |
|
608 | push push changes to the specified destination | |
609 | remove remove the specified files on the next commit |
|
609 | remove remove the specified files on the next commit | |
610 | serve start stand-alone webserver |
|
610 | serve start stand-alone webserver | |
611 | status show changed files in the working directory |
|
611 | status show changed files in the working directory | |
612 | summary summarize working directory state |
|
612 | summary summarize working directory state | |
613 | update update working directory (or switch revisions) |
|
613 | update update working directory (or switch revisions) | |
614 |
|
614 | |||
615 | (use "hg help" for the full list of commands or "hg -v" for details) |
|
615 | (use "hg help" for the full list of commands or "hg -v" for details) | |
616 | [255] |
|
616 | [255] | |
617 |
|
617 | |||
618 |
|
618 | |||
619 | Make sure that we don't run afoul of the help system thinking that |
|
619 | Make sure that we don't run afoul of the help system thinking that | |
620 | this is a section and erroring out weirdly. |
|
620 | this is a section and erroring out weirdly. | |
621 |
|
621 | |||
622 | $ hg .log |
|
622 | $ hg .log | |
623 | hg: unknown command '.log' |
|
623 | hg: unknown command '.log' | |
624 | (did you mean one of log?) |
|
624 | (did you mean one of log?) | |
625 | [255] |
|
625 | [255] | |
626 |
|
626 | |||
627 | $ hg log. |
|
627 | $ hg log. | |
628 | hg: unknown command 'log.' |
|
628 | hg: unknown command 'log.' | |
629 | (did you mean one of log?) |
|
629 | (did you mean one of log?) | |
630 | [255] |
|
630 | [255] | |
631 | $ hg pu.lh |
|
631 | $ hg pu.lh | |
632 | hg: unknown command 'pu.lh' |
|
632 | hg: unknown command 'pu.lh' | |
633 | (did you mean one of pull, push?) |
|
633 | (did you mean one of pull, push?) | |
634 | [255] |
|
634 | [255] | |
635 |
|
635 | |||
636 | $ cat > helpext.py <<EOF |
|
636 | $ cat > helpext.py <<EOF | |
637 | > import os |
|
637 | > import os | |
638 | > from mercurial import cmdutil, commands |
|
638 | > from mercurial import cmdutil, commands | |
639 | > |
|
639 | > | |
640 | > cmdtable = {} |
|
640 | > cmdtable = {} | |
641 | > command = cmdutil.command(cmdtable) |
|
641 | > command = cmdutil.command(cmdtable) | |
642 | > |
|
642 | > | |
643 | > @command('nohelp', |
|
643 | > @command('nohelp', | |
644 | > [('', 'longdesc', 3, 'x'*90), |
|
644 | > [('', 'longdesc', 3, 'x'*90), | |
645 | > ('n', '', None, 'normal desc'), |
|
645 | > ('n', '', None, 'normal desc'), | |
646 | > ('', 'newline', '', 'line1\nline2')], |
|
646 | > ('', 'newline', '', 'line1\nline2')], | |
647 | > 'hg nohelp', |
|
647 | > 'hg nohelp', | |
648 | > norepo=True) |
|
648 | > norepo=True) | |
649 | > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')]) |
|
649 | > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')]) | |
650 | > @command('debugoptEXP', [('', 'eopt', None, 'option is EXPERIMENTAL')]) |
|
650 | > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')]) | |
651 | > def nohelp(ui, *args, **kwargs): |
|
651 | > def nohelp(ui, *args, **kwargs): | |
652 | > pass |
|
652 | > pass | |
653 | > |
|
653 | > | |
654 | > EOF |
|
654 | > EOF | |
655 | $ echo '[extensions]' >> $HGRCPATH |
|
655 | $ echo '[extensions]' >> $HGRCPATH | |
656 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
656 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
657 |
|
657 | |||
658 | Test command with no help text |
|
658 | Test command with no help text | |
659 |
|
659 | |||
660 | $ hg help nohelp |
|
660 | $ hg help nohelp | |
661 | hg nohelp |
|
661 | hg nohelp | |
662 |
|
662 | |||
663 | (no help text available) |
|
663 | (no help text available) | |
664 |
|
664 | |||
665 | options: |
|
665 | options: | |
666 |
|
666 | |||
667 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
667 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
668 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
668 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) | |
669 | -n -- normal desc |
|
669 | -n -- normal desc | |
670 | --newline VALUE line1 line2 |
|
670 | --newline VALUE line1 line2 | |
671 |
|
671 | |||
672 | (some details hidden, use --verbose to show complete help) |
|
672 | (some details hidden, use --verbose to show complete help) | |
673 |
|
673 | |||
674 | $ hg help -k nohelp |
|
674 | $ hg help -k nohelp | |
675 | Commands: |
|
675 | Commands: | |
676 |
|
676 | |||
677 | nohelp hg nohelp |
|
677 | nohelp hg nohelp | |
678 |
|
678 | |||
679 | Extension Commands: |
|
679 | Extension Commands: | |
680 |
|
680 | |||
681 | nohelp (no help text available) |
|
681 | nohelp (no help text available) | |
682 |
|
682 | |||
683 | Test that default list of commands omits extension commands |
|
683 | Test that default list of commands omits extension commands | |
684 |
|
684 | |||
685 | $ hg help |
|
685 | $ hg help | |
686 | Mercurial Distributed SCM |
|
686 | Mercurial Distributed SCM | |
687 |
|
687 | |||
688 | list of commands: |
|
688 | list of commands: | |
689 |
|
689 | |||
690 | add add the specified files on the next commit |
|
690 | add add the specified files on the next commit | |
691 | addremove add all new files, delete all missing files |
|
691 | addremove add all new files, delete all missing files | |
692 | annotate show changeset information by line for each file |
|
692 | annotate show changeset information by line for each file | |
693 | archive create an unversioned archive of a repository revision |
|
693 | archive create an unversioned archive of a repository revision | |
694 | backout reverse effect of earlier changeset |
|
694 | backout reverse effect of earlier changeset | |
695 | bisect subdivision search of changesets |
|
695 | bisect subdivision search of changesets | |
696 | bookmarks create a new bookmark or list existing bookmarks |
|
696 | bookmarks create a new bookmark or list existing bookmarks | |
697 | branch set or show the current branch name |
|
697 | branch set or show the current branch name | |
698 | branches list repository named branches |
|
698 | branches list repository named branches | |
699 | bundle create a changegroup file |
|
699 | bundle create a changegroup file | |
700 | cat output the current or given revision of files |
|
700 | cat output the current or given revision of files | |
701 | clone make a copy of an existing repository |
|
701 | clone make a copy of an existing repository | |
702 | commit commit the specified files or all outstanding changes |
|
702 | commit commit the specified files or all outstanding changes | |
703 | config show combined config settings from all hgrc files |
|
703 | config show combined config settings from all hgrc files | |
704 | copy mark files as copied for the next commit |
|
704 | copy mark files as copied for the next commit | |
705 | diff diff repository (or selected files) |
|
705 | diff diff repository (or selected files) | |
706 | export dump the header and diffs for one or more changesets |
|
706 | export dump the header and diffs for one or more changesets | |
707 | files list tracked files |
|
707 | files list tracked files | |
708 | forget forget the specified files on the next commit |
|
708 | forget forget the specified files on the next commit | |
709 | graft copy changes from other branches onto the current branch |
|
709 | graft copy changes from other branches onto the current branch | |
710 | grep search for a pattern in specified files and revisions |
|
710 | grep search for a pattern in specified files and revisions | |
711 | heads show branch heads |
|
711 | heads show branch heads | |
712 | help show help for a given topic or a help overview |
|
712 | help show help for a given topic or a help overview | |
713 | identify identify the working directory or specified revision |
|
713 | identify identify the working directory or specified revision | |
714 | import import an ordered set of patches |
|
714 | import import an ordered set of patches | |
715 | incoming show new changesets found in source |
|
715 | incoming show new changesets found in source | |
716 | init create a new repository in the given directory |
|
716 | init create a new repository in the given directory | |
717 | log show revision history of entire repository or files |
|
717 | log show revision history of entire repository or files | |
718 | manifest output the current or given revision of the project manifest |
|
718 | manifest output the current or given revision of the project manifest | |
719 | merge merge another revision into working directory |
|
719 | merge merge another revision into working directory | |
720 | outgoing show changesets not found in the destination |
|
720 | outgoing show changesets not found in the destination | |
721 | paths show aliases for remote repositories |
|
721 | paths show aliases for remote repositories | |
722 | phase set or show the current phase name |
|
722 | phase set or show the current phase name | |
723 | pull pull changes from the specified source |
|
723 | pull pull changes from the specified source | |
724 | push push changes to the specified destination |
|
724 | push push changes to the specified destination | |
725 | recover roll back an interrupted transaction |
|
725 | recover roll back an interrupted transaction | |
726 | remove remove the specified files on the next commit |
|
726 | remove remove the specified files on the next commit | |
727 | rename rename files; equivalent of copy + remove |
|
727 | rename rename files; equivalent of copy + remove | |
728 | resolve redo merges or set/view the merge status of files |
|
728 | resolve redo merges or set/view the merge status of files | |
729 | revert restore files to their checkout state |
|
729 | revert restore files to their checkout state | |
730 | root print the root (top) of the current working directory |
|
730 | root print the root (top) of the current working directory | |
731 | serve start stand-alone webserver |
|
731 | serve start stand-alone webserver | |
732 | status show changed files in the working directory |
|
732 | status show changed files in the working directory | |
733 | summary summarize working directory state |
|
733 | summary summarize working directory state | |
734 | tag add one or more tags for the current or given revision |
|
734 | tag add one or more tags for the current or given revision | |
735 | tags list repository tags |
|
735 | tags list repository tags | |
736 | unbundle apply one or more changegroup files |
|
736 | unbundle apply one or more changegroup files | |
737 | update update working directory (or switch revisions) |
|
737 | update update working directory (or switch revisions) | |
738 | verify verify the integrity of the repository |
|
738 | verify verify the integrity of the repository | |
739 | version output version and copyright information |
|
739 | version output version and copyright information | |
740 |
|
740 | |||
741 | enabled extensions: |
|
741 | enabled extensions: | |
742 |
|
742 | |||
743 | helpext (no help text available) |
|
743 | helpext (no help text available) | |
744 |
|
744 | |||
745 | additional help topics: |
|
745 | additional help topics: | |
746 |
|
746 | |||
747 | config Configuration Files |
|
747 | config Configuration Files | |
748 | dates Date Formats |
|
748 | dates Date Formats | |
749 | diffs Diff Formats |
|
749 | diffs Diff Formats | |
750 | environment Environment Variables |
|
750 | environment Environment Variables | |
751 | extensions Using Additional Features |
|
751 | extensions Using Additional Features | |
752 | filesets Specifying File Sets |
|
752 | filesets Specifying File Sets | |
753 | glossary Glossary |
|
753 | glossary Glossary | |
754 | hgignore Syntax for Mercurial Ignore Files |
|
754 | hgignore Syntax for Mercurial Ignore Files | |
755 | hgweb Configuring hgweb |
|
755 | hgweb Configuring hgweb | |
756 | merge-tools Merge Tools |
|
756 | merge-tools Merge Tools | |
757 | multirevs Specifying Multiple Revisions |
|
757 | multirevs Specifying Multiple Revisions | |
758 | patterns File Name Patterns |
|
758 | patterns File Name Patterns | |
759 | phases Working with Phases |
|
759 | phases Working with Phases | |
760 | revisions Specifying Single Revisions |
|
760 | revisions Specifying Single Revisions | |
761 | revsets Specifying Revision Sets |
|
761 | revsets Specifying Revision Sets | |
762 | scripting Using Mercurial from scripts and automation |
|
762 | scripting Using Mercurial from scripts and automation | |
763 | subrepos Subrepositories |
|
763 | subrepos Subrepositories | |
764 | templating Template Usage |
|
764 | templating Template Usage | |
765 | urls URL Paths |
|
765 | urls URL Paths | |
766 |
|
766 | |||
767 | (use "hg help -v" to show built-in aliases and global options) |
|
767 | (use "hg help -v" to show built-in aliases and global options) | |
768 |
|
768 | |||
769 |
|
769 | |||
770 | Test list of internal help commands |
|
770 | Test list of internal help commands | |
771 |
|
771 | |||
772 | $ hg help debug |
|
772 | $ hg help debug | |
773 | debug commands (internal and unsupported): |
|
773 | debug commands (internal and unsupported): | |
774 |
|
774 | |||
775 | debugancestor |
|
775 | debugancestor | |
776 | find the ancestor revision of two revisions in a given index |
|
776 | find the ancestor revision of two revisions in a given index | |
777 | debugbuilddag |
|
777 | debugbuilddag | |
778 | builds a repo with a given DAG from scratch in the current |
|
778 | builds a repo with a given DAG from scratch in the current | |
779 | empty repo |
|
779 | empty repo | |
780 | debugbundle lists the contents of a bundle |
|
780 | debugbundle lists the contents of a bundle | |
781 | debugcheckstate |
|
781 | debugcheckstate | |
782 | validate the correctness of the current dirstate |
|
782 | validate the correctness of the current dirstate | |
783 | debugcommands |
|
783 | debugcommands | |
784 | list all available commands and options |
|
784 | list all available commands and options | |
785 | debugcomplete |
|
785 | debugcomplete | |
786 | returns the completion list associated with the given command |
|
786 | returns the completion list associated with the given command | |
787 | debugdag format the changelog or an index DAG as a concise textual |
|
787 | debugdag format the changelog or an index DAG as a concise textual | |
788 | description |
|
788 | description | |
789 | debugdata dump the contents of a data file revision |
|
789 | debugdata dump the contents of a data file revision | |
790 | debugdate parse and display a date |
|
790 | debugdate parse and display a date | |
791 | debugdirstate |
|
791 | debugdirstate | |
792 | show the contents of the current dirstate |
|
792 | show the contents of the current dirstate | |
793 | debugdiscovery |
|
793 | debugdiscovery | |
794 | runs the changeset discovery protocol in isolation |
|
794 | runs the changeset discovery protocol in isolation | |
795 | debugextensions |
|
795 | debugextensions | |
796 | show information about active extensions |
|
796 | show information about active extensions | |
797 | debugfileset parse and apply a fileset specification |
|
797 | debugfileset parse and apply a fileset specification | |
798 | debugfsinfo show information detected about current filesystem |
|
798 | debugfsinfo show information detected about current filesystem | |
799 | debuggetbundle |
|
799 | debuggetbundle | |
800 | retrieves a bundle from a repo |
|
800 | retrieves a bundle from a repo | |
801 | debugignore display the combined ignore pattern |
|
801 | debugignore display the combined ignore pattern | |
802 | debugindex dump the contents of an index file |
|
802 | debugindex dump the contents of an index file | |
803 | debugindexdot |
|
803 | debugindexdot | |
804 | dump an index DAG as a graphviz dot file |
|
804 | dump an index DAG as a graphviz dot file | |
805 | debuginstall test Mercurial installation |
|
805 | debuginstall test Mercurial installation | |
806 | debugknown test whether node ids are known to a repo |
|
806 | debugknown test whether node ids are known to a repo | |
807 | debuglocks show or modify state of locks |
|
807 | debuglocks show or modify state of locks | |
808 | debugnamecomplete |
|
808 | debugnamecomplete | |
809 | complete "names" - tags, open branch names, bookmark names |
|
809 | complete "names" - tags, open branch names, bookmark names | |
810 | debugobsolete |
|
810 | debugobsolete | |
811 | create arbitrary obsolete marker |
|
811 | create arbitrary obsolete marker | |
812 | debugoptDEP (no help text available) |
|
812 | debugoptDEP (no help text available) | |
813 | debugoptEXP (no help text available) |
|
813 | debugoptEXP (no help text available) | |
814 | debugpathcomplete |
|
814 | debugpathcomplete | |
815 | complete part or all of a tracked path |
|
815 | complete part or all of a tracked path | |
816 | debugpushkey access the pushkey key/value protocol |
|
816 | debugpushkey access the pushkey key/value protocol | |
817 | debugpvec (no help text available) |
|
817 | debugpvec (no help text available) | |
818 | debugrebuilddirstate |
|
818 | debugrebuilddirstate | |
819 | rebuild the dirstate as it would look like for the given |
|
819 | rebuild the dirstate as it would look like for the given | |
820 | revision |
|
820 | revision | |
821 | debugrebuildfncache |
|
821 | debugrebuildfncache | |
822 | rebuild the fncache file |
|
822 | rebuild the fncache file | |
823 | debugrename dump rename information |
|
823 | debugrename dump rename information | |
824 | debugrevlog show data and statistics about a revlog |
|
824 | debugrevlog show data and statistics about a revlog | |
825 | debugrevspec parse and apply a revision specification |
|
825 | debugrevspec parse and apply a revision specification | |
826 | debugsetparents |
|
826 | debugsetparents | |
827 | manually set the parents of the current working directory |
|
827 | manually set the parents of the current working directory | |
828 | debugsub (no help text available) |
|
828 | debugsub (no help text available) | |
829 | debugsuccessorssets |
|
829 | debugsuccessorssets | |
830 | show set of successors for revision |
|
830 | show set of successors for revision | |
831 | debugwalk show how files match on given patterns |
|
831 | debugwalk show how files match on given patterns | |
832 | debugwireargs |
|
832 | debugwireargs | |
833 | (no help text available) |
|
833 | (no help text available) | |
834 |
|
834 | |||
835 | (use "hg help -v debug" to show built-in aliases and global options) |
|
835 | (use "hg help -v debug" to show built-in aliases and global options) | |
836 |
|
836 | |||
837 |
|
837 | |||
838 | Test list of commands with command with no help text |
|
838 | Test list of commands with command with no help text | |
839 |
|
839 | |||
840 | $ hg help helpext |
|
840 | $ hg help helpext | |
841 | helpext extension - no help text available |
|
841 | helpext extension - no help text available | |
842 |
|
842 | |||
843 | list of commands: |
|
843 | list of commands: | |
844 |
|
844 | |||
845 | nohelp (no help text available) |
|
845 | nohelp (no help text available) | |
846 |
|
846 | |||
847 | (use "hg help -v helpext" to show built-in aliases and global options) |
|
847 | (use "hg help -v helpext" to show built-in aliases and global options) | |
848 |
|
848 | |||
849 |
|
849 | |||
850 | test deprecated and experimental options are hidden in command help |
|
850 | test deprecated and experimental options are hidden in command help | |
851 | $ hg help debugoptDEP |
|
851 | $ hg help debugoptDEP | |
852 | hg debugoptDEP |
|
852 | hg debugoptDEP | |
853 |
|
853 | |||
854 | (no help text available) |
|
854 | (no help text available) | |
855 |
|
855 | |||
856 | options: |
|
856 | options: | |
857 |
|
857 | |||
858 | (some details hidden, use --verbose to show complete help) |
|
858 | (some details hidden, use --verbose to show complete help) | |
859 |
|
859 | |||
860 | $ hg help debugoptEXP |
|
860 | $ hg help debugoptEXP | |
861 | hg debugoptEXP |
|
861 | hg debugoptEXP | |
862 |
|
862 | |||
863 | (no help text available) |
|
863 | (no help text available) | |
864 |
|
864 | |||
865 | options: |
|
865 | options: | |
866 |
|
866 | |||
867 | (some details hidden, use --verbose to show complete help) |
|
867 | (some details hidden, use --verbose to show complete help) | |
868 |
|
868 | |||
869 | test deprecated and experimental options is shown with -v |
|
869 | test deprecated and experimental options is shown with -v | |
870 | $ hg help -v debugoptDEP | grep dopt |
|
870 | $ hg help -v debugoptDEP | grep dopt | |
871 | --dopt option is DEPRECATED |
|
871 | --dopt option is (DEPRECATED) | |
872 | $ hg help -v debugoptEXP | grep eopt |
|
872 | $ hg help -v debugoptEXP | grep eopt | |
873 | --eopt option is EXPERIMENTAL |
|
873 | --eopt option is (EXPERIMENTAL) | |
874 |
|
874 | |||
875 | #if gettext |
|
875 | #if gettext | |
876 | test deprecated option is hidden with translation with untranslated description |
|
876 | test deprecated option is hidden with translation with untranslated description | |
877 | (use many globy for not failing on changed transaction) |
|
877 | (use many globy for not failing on changed transaction) | |
878 | $ LANGUAGE=sv hg help debugoptDEP |
|
878 | $ LANGUAGE=sv hg help debugoptDEP | |
879 | hg debugoptDEP |
|
879 | hg debugoptDEP | |
880 |
|
880 | |||
881 | (*) (glob) |
|
881 | (*) (glob) | |
882 |
|
882 | |||
883 | options: |
|
883 | options: | |
884 |
|
884 | |||
885 | (some details hidden, use --verbose to show complete help) |
|
885 | (some details hidden, use --verbose to show complete help) | |
886 | #endif |
|
886 | #endif | |
887 |
|
887 | |||
888 | Test commands that collide with topics (issue4240) |
|
888 | Test commands that collide with topics (issue4240) | |
889 |
|
889 | |||
890 | $ hg config -hq |
|
890 | $ hg config -hq | |
891 | hg config [-u] [NAME]... |
|
891 | hg config [-u] [NAME]... | |
892 |
|
892 | |||
893 | show combined config settings from all hgrc files |
|
893 | show combined config settings from all hgrc files | |
894 | $ hg showconfig -hq |
|
894 | $ hg showconfig -hq | |
895 | hg config [-u] [NAME]... |
|
895 | hg config [-u] [NAME]... | |
896 |
|
896 | |||
897 | show combined config settings from all hgrc files |
|
897 | show combined config settings from all hgrc files | |
898 |
|
898 | |||
899 | Test a help topic |
|
899 | Test a help topic | |
900 |
|
900 | |||
901 | $ hg help revs |
|
901 | $ hg help revs | |
902 | Specifying Single Revisions |
|
902 | Specifying Single Revisions | |
903 | """"""""""""""""""""""""""" |
|
903 | """"""""""""""""""""""""""" | |
904 |
|
904 | |||
905 | Mercurial supports several ways to specify individual revisions. |
|
905 | Mercurial supports several ways to specify individual revisions. | |
906 |
|
906 | |||
907 | A plain integer is treated as a revision number. Negative integers are |
|
907 | A plain integer is treated as a revision number. Negative integers are | |
908 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 |
|
908 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 | |
909 | denoting the revision prior to the tip, and so forth. |
|
909 | denoting the revision prior to the tip, and so forth. | |
910 |
|
910 | |||
911 | A 40-digit hexadecimal string is treated as a unique revision identifier. |
|
911 | A 40-digit hexadecimal string is treated as a unique revision identifier. | |
912 |
|
912 | |||
913 | A hexadecimal string less than 40 characters long is treated as a unique |
|
913 | A hexadecimal string less than 40 characters long is treated as a unique | |
914 | revision identifier and is referred to as a short-form identifier. A |
|
914 | revision identifier and is referred to as a short-form identifier. A | |
915 | short-form identifier is only valid if it is the prefix of exactly one |
|
915 | short-form identifier is only valid if it is the prefix of exactly one | |
916 | full-length identifier. |
|
916 | full-length identifier. | |
917 |
|
917 | |||
918 | Any other string is treated as a bookmark, tag, or branch name. A bookmark |
|
918 | Any other string is treated as a bookmark, tag, or branch name. A bookmark | |
919 | is a movable pointer to a revision. A tag is a permanent name associated |
|
919 | is a movable pointer to a revision. A tag is a permanent name associated | |
920 | with a revision. A branch name denotes the tipmost open branch head of |
|
920 | with a revision. A branch name denotes the tipmost open branch head of | |
921 | that branch - or if they are all closed, the tipmost closed head of the |
|
921 | that branch - or if they are all closed, the tipmost closed head of the | |
922 | branch. Bookmark, tag, and branch names must not contain the ":" |
|
922 | branch. Bookmark, tag, and branch names must not contain the ":" | |
923 | character. |
|
923 | character. | |
924 |
|
924 | |||
925 | The reserved name "tip" always identifies the most recent revision. |
|
925 | The reserved name "tip" always identifies the most recent revision. | |
926 |
|
926 | |||
927 | The reserved name "null" indicates the null revision. This is the revision |
|
927 | The reserved name "null" indicates the null revision. This is the revision | |
928 | of an empty repository, and the parent of revision 0. |
|
928 | of an empty repository, and the parent of revision 0. | |
929 |
|
929 | |||
930 | The reserved name "." indicates the working directory parent. If no |
|
930 | The reserved name "." indicates the working directory parent. If no | |
931 | working directory is checked out, it is equivalent to null. If an |
|
931 | working directory is checked out, it is equivalent to null. If an | |
932 | uncommitted merge is in progress, "." is the revision of the first parent. |
|
932 | uncommitted merge is in progress, "." is the revision of the first parent. | |
933 |
|
933 | |||
934 | Test repeated config section name |
|
934 | Test repeated config section name | |
935 |
|
935 | |||
936 | $ hg help config.host |
|
936 | $ hg help config.host | |
937 | "http_proxy.host" |
|
937 | "http_proxy.host" | |
938 | Host name and (optional) port of the proxy server, for example |
|
938 | Host name and (optional) port of the proxy server, for example | |
939 | "myproxy:8000". |
|
939 | "myproxy:8000". | |
940 |
|
940 | |||
941 | "smtp.host" |
|
941 | "smtp.host" | |
942 | Host name of mail server, e.g. "mail.example.com". |
|
942 | Host name of mail server, e.g. "mail.example.com". | |
943 |
|
943 | |||
944 | Unrelated trailing paragraphs shouldn't be included |
|
944 | Unrelated trailing paragraphs shouldn't be included | |
945 |
|
945 | |||
946 | $ hg help config.extramsg | grep '^$' |
|
946 | $ hg help config.extramsg | grep '^$' | |
947 |
|
947 | |||
948 |
|
948 | |||
949 | Test capitalized section name |
|
949 | Test capitalized section name | |
950 |
|
950 | |||
951 | $ hg help scripting.HGPLAIN > /dev/null |
|
951 | $ hg help scripting.HGPLAIN > /dev/null | |
952 |
|
952 | |||
953 | Help subsection: |
|
953 | Help subsection: | |
954 |
|
954 | |||
955 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
955 | $ hg help config.charsets |grep "Email example:" > /dev/null | |
956 | [1] |
|
956 | [1] | |
957 |
|
957 | |||
958 | Show nested definitions |
|
958 | Show nested definitions | |
959 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
959 | ("profiling.type"[break]"ls"[break]"stat"[break]) | |
960 |
|
960 | |||
961 | $ hg help config.type | egrep '^$'|wc -l |
|
961 | $ hg help config.type | egrep '^$'|wc -l | |
962 | \s*3 (re) |
|
962 | \s*3 (re) | |
963 |
|
963 | |||
964 | Last item in help config.*: |
|
964 | Last item in help config.*: | |
965 |
|
965 | |||
966 | $ hg help config.`hg help config|grep '^ "'| \ |
|
966 | $ hg help config.`hg help config|grep '^ "'| \ | |
967 | > tail -1|sed 's![ "]*!!g'`| \ |
|
967 | > tail -1|sed 's![ "]*!!g'`| \ | |
968 | > grep "hg help -c config" > /dev/null |
|
968 | > grep "hg help -c config" > /dev/null | |
969 | [1] |
|
969 | [1] | |
970 |
|
970 | |||
971 | note to use help -c for general hg help config: |
|
971 | note to use help -c for general hg help config: | |
972 |
|
972 | |||
973 | $ hg help config |grep "hg help -c config" > /dev/null |
|
973 | $ hg help config |grep "hg help -c config" > /dev/null | |
974 |
|
974 | |||
975 | Test templating help |
|
975 | Test templating help | |
976 |
|
976 | |||
977 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
977 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
978 | desc String. The text of the changeset description. |
|
978 | desc String. The text of the changeset description. | |
979 | diffstat String. Statistics of changes with the following format: |
|
979 | diffstat String. Statistics of changes with the following format: | |
980 | firstline Any text. Returns the first line of text. |
|
980 | firstline Any text. Returns the first line of text. | |
981 | nonempty Any text. Returns '(none)' if the string is empty. |
|
981 | nonempty Any text. Returns '(none)' if the string is empty. | |
982 |
|
982 | |||
983 | Test help hooks |
|
983 | Test help hooks | |
984 |
|
984 | |||
985 | $ cat > helphook1.py <<EOF |
|
985 | $ cat > helphook1.py <<EOF | |
986 | > from mercurial import help |
|
986 | > from mercurial import help | |
987 | > |
|
987 | > | |
988 | > def rewrite(topic, doc): |
|
988 | > def rewrite(topic, doc): | |
989 | > return doc + '\nhelphook1\n' |
|
989 | > return doc + '\nhelphook1\n' | |
990 | > |
|
990 | > | |
991 | > def extsetup(ui): |
|
991 | > def extsetup(ui): | |
992 | > help.addtopichook('revsets', rewrite) |
|
992 | > help.addtopichook('revsets', rewrite) | |
993 | > EOF |
|
993 | > EOF | |
994 | $ cat > helphook2.py <<EOF |
|
994 | $ cat > helphook2.py <<EOF | |
995 | > from mercurial import help |
|
995 | > from mercurial import help | |
996 | > |
|
996 | > | |
997 | > def rewrite(topic, doc): |
|
997 | > def rewrite(topic, doc): | |
998 | > return doc + '\nhelphook2\n' |
|
998 | > return doc + '\nhelphook2\n' | |
999 | > |
|
999 | > | |
1000 | > def extsetup(ui): |
|
1000 | > def extsetup(ui): | |
1001 | > help.addtopichook('revsets', rewrite) |
|
1001 | > help.addtopichook('revsets', rewrite) | |
1002 | > EOF |
|
1002 | > EOF | |
1003 | $ echo '[extensions]' >> $HGRCPATH |
|
1003 | $ echo '[extensions]' >> $HGRCPATH | |
1004 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1004 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
1005 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1005 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
1006 | $ hg help revsets | grep helphook |
|
1006 | $ hg help revsets | grep helphook | |
1007 | helphook1 |
|
1007 | helphook1 | |
1008 | helphook2 |
|
1008 | helphook2 | |
1009 |
|
1009 | |||
1010 | Test -e / -c / -k combinations |
|
1010 | Test -e / -c / -k combinations | |
1011 |
|
1011 | |||
1012 | $ hg help -c progress |
|
1012 | $ hg help -c progress | |
1013 | abort: no such help topic: progress |
|
1013 | abort: no such help topic: progress | |
1014 | (try "hg help --keyword progress") |
|
1014 | (try "hg help --keyword progress") | |
1015 | [255] |
|
1015 | [255] | |
1016 | $ hg help -e progress |head -1 |
|
1016 | $ hg help -e progress |head -1 | |
1017 | progress extension - show progress bars for some actions (DEPRECATED) |
|
1017 | progress extension - show progress bars for some actions (DEPRECATED) | |
1018 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1018 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' | |
1019 | Commands: |
|
1019 | Commands: | |
1020 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1020 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' | |
1021 | Extensions: |
|
1021 | Extensions: | |
1022 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1022 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' | |
1023 | Extensions: |
|
1023 | Extensions: | |
1024 | Commands: |
|
1024 | Commands: | |
1025 | $ hg help -c commit > /dev/null |
|
1025 | $ hg help -c commit > /dev/null | |
1026 | $ hg help -e -c commit > /dev/null |
|
1026 | $ hg help -e -c commit > /dev/null | |
1027 | $ hg help -e commit > /dev/null |
|
1027 | $ hg help -e commit > /dev/null | |
1028 | abort: no such help topic: commit |
|
1028 | abort: no such help topic: commit | |
1029 | (try "hg help --keyword commit") |
|
1029 | (try "hg help --keyword commit") | |
1030 | [255] |
|
1030 | [255] | |
1031 |
|
1031 | |||
1032 | Test keyword search help |
|
1032 | Test keyword search help | |
1033 |
|
1033 | |||
1034 | $ cat > prefixedname.py <<EOF |
|
1034 | $ cat > prefixedname.py <<EOF | |
1035 | > '''matched against word "clone" |
|
1035 | > '''matched against word "clone" | |
1036 | > ''' |
|
1036 | > ''' | |
1037 | > EOF |
|
1037 | > EOF | |
1038 | $ echo '[extensions]' >> $HGRCPATH |
|
1038 | $ echo '[extensions]' >> $HGRCPATH | |
1039 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1039 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | |
1040 | $ hg help -k clone |
|
1040 | $ hg help -k clone | |
1041 | Topics: |
|
1041 | Topics: | |
1042 |
|
1042 | |||
1043 | config Configuration Files |
|
1043 | config Configuration Files | |
1044 | extensions Using Additional Features |
|
1044 | extensions Using Additional Features | |
1045 | glossary Glossary |
|
1045 | glossary Glossary | |
1046 | phases Working with Phases |
|
1046 | phases Working with Phases | |
1047 | subrepos Subrepositories |
|
1047 | subrepos Subrepositories | |
1048 | urls URL Paths |
|
1048 | urls URL Paths | |
1049 |
|
1049 | |||
1050 | Commands: |
|
1050 | Commands: | |
1051 |
|
1051 | |||
1052 | bookmarks create a new bookmark or list existing bookmarks |
|
1052 | bookmarks create a new bookmark or list existing bookmarks | |
1053 | clone make a copy of an existing repository |
|
1053 | clone make a copy of an existing repository | |
1054 | paths show aliases for remote repositories |
|
1054 | paths show aliases for remote repositories | |
1055 | update update working directory (or switch revisions) |
|
1055 | update update working directory (or switch revisions) | |
1056 |
|
1056 | |||
1057 | Extensions: |
|
1057 | Extensions: | |
1058 |
|
1058 | |||
1059 | prefixedname matched against word "clone" |
|
1059 | prefixedname matched against word "clone" | |
1060 | relink recreates hardlinks between repository clones |
|
1060 | relink recreates hardlinks between repository clones | |
1061 |
|
1061 | |||
1062 | Extension Commands: |
|
1062 | Extension Commands: | |
1063 |
|
1063 | |||
1064 | qclone clone main and patch repository at same time |
|
1064 | qclone clone main and patch repository at same time | |
1065 |
|
1065 | |||
1066 | Test unfound topic |
|
1066 | Test unfound topic | |
1067 |
|
1067 | |||
1068 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1068 | $ hg help nonexistingtopicthatwillneverexisteverever | |
1069 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1069 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever | |
1070 | (try "hg help --keyword nonexistingtopicthatwillneverexisteverever") |
|
1070 | (try "hg help --keyword nonexistingtopicthatwillneverexisteverever") | |
1071 | [255] |
|
1071 | [255] | |
1072 |
|
1072 | |||
1073 | Test unfound keyword |
|
1073 | Test unfound keyword | |
1074 |
|
1074 | |||
1075 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1075 | $ hg help --keyword nonexistingwordthatwillneverexisteverever | |
1076 | abort: no matches |
|
1076 | abort: no matches | |
1077 | (try "hg help" for a list of topics) |
|
1077 | (try "hg help" for a list of topics) | |
1078 | [255] |
|
1078 | [255] | |
1079 |
|
1079 | |||
1080 | Test omit indicating for help |
|
1080 | Test omit indicating for help | |
1081 |
|
1081 | |||
1082 | $ cat > addverboseitems.py <<EOF |
|
1082 | $ cat > addverboseitems.py <<EOF | |
1083 | > '''extension to test omit indicating. |
|
1083 | > '''extension to test omit indicating. | |
1084 | > |
|
1084 | > | |
1085 | > This paragraph is never omitted (for extension) |
|
1085 | > This paragraph is never omitted (for extension) | |
1086 | > |
|
1086 | > | |
1087 | > .. container:: verbose |
|
1087 | > .. container:: verbose | |
1088 | > |
|
1088 | > | |
1089 | > This paragraph is omitted, |
|
1089 | > This paragraph is omitted, | |
1090 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1090 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | |
1091 | > |
|
1091 | > | |
1092 | > This paragraph is never omitted, too (for extension) |
|
1092 | > This paragraph is never omitted, too (for extension) | |
1093 | > ''' |
|
1093 | > ''' | |
1094 | > |
|
1094 | > | |
1095 | > from mercurial import help, commands |
|
1095 | > from mercurial import help, commands | |
1096 | > testtopic = """This paragraph is never omitted (for topic). |
|
1096 | > testtopic = """This paragraph is never omitted (for topic). | |
1097 | > |
|
1097 | > | |
1098 | > .. container:: verbose |
|
1098 | > .. container:: verbose | |
1099 | > |
|
1099 | > | |
1100 | > This paragraph is omitted, |
|
1100 | > This paragraph is omitted, | |
1101 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1101 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | |
1102 | > |
|
1102 | > | |
1103 | > This paragraph is never omitted, too (for topic) |
|
1103 | > This paragraph is never omitted, too (for topic) | |
1104 | > """ |
|
1104 | > """ | |
1105 | > def extsetup(ui): |
|
1105 | > def extsetup(ui): | |
1106 | > help.helptable.append((["topic-containing-verbose"], |
|
1106 | > help.helptable.append((["topic-containing-verbose"], | |
1107 | > "This is the topic to test omit indicating.", |
|
1107 | > "This is the topic to test omit indicating.", | |
1108 | > lambda : testtopic)) |
|
1108 | > lambda : testtopic)) | |
1109 | > EOF |
|
1109 | > EOF | |
1110 | $ echo '[extensions]' >> $HGRCPATH |
|
1110 | $ echo '[extensions]' >> $HGRCPATH | |
1111 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1111 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | |
1112 | $ hg help addverboseitems |
|
1112 | $ hg help addverboseitems | |
1113 | addverboseitems extension - extension to test omit indicating. |
|
1113 | addverboseitems extension - extension to test omit indicating. | |
1114 |
|
1114 | |||
1115 | This paragraph is never omitted (for extension) |
|
1115 | This paragraph is never omitted (for extension) | |
1116 |
|
1116 | |||
1117 | This paragraph is never omitted, too (for extension) |
|
1117 | This paragraph is never omitted, too (for extension) | |
1118 |
|
1118 | |||
1119 | (some details hidden, use --verbose to show complete help) |
|
1119 | (some details hidden, use --verbose to show complete help) | |
1120 |
|
1120 | |||
1121 | no commands defined |
|
1121 | no commands defined | |
1122 | $ hg help -v addverboseitems |
|
1122 | $ hg help -v addverboseitems | |
1123 | addverboseitems extension - extension to test omit indicating. |
|
1123 | addverboseitems extension - extension to test omit indicating. | |
1124 |
|
1124 | |||
1125 | This paragraph is never omitted (for extension) |
|
1125 | This paragraph is never omitted (for extension) | |
1126 |
|
1126 | |||
1127 | This paragraph is omitted, if "hg help" is invoked without "-v" (for |
|
1127 | This paragraph is omitted, if "hg help" is invoked without "-v" (for | |
1128 | extension) |
|
1128 | extension) | |
1129 |
|
1129 | |||
1130 | This paragraph is never omitted, too (for extension) |
|
1130 | This paragraph is never omitted, too (for extension) | |
1131 |
|
1131 | |||
1132 | no commands defined |
|
1132 | no commands defined | |
1133 | $ hg help topic-containing-verbose |
|
1133 | $ hg help topic-containing-verbose | |
1134 | This is the topic to test omit indicating. |
|
1134 | This is the topic to test omit indicating. | |
1135 | """""""""""""""""""""""""""""""""""""""""" |
|
1135 | """""""""""""""""""""""""""""""""""""""""" | |
1136 |
|
1136 | |||
1137 | This paragraph is never omitted (for topic). |
|
1137 | This paragraph is never omitted (for topic). | |
1138 |
|
1138 | |||
1139 | This paragraph is never omitted, too (for topic) |
|
1139 | This paragraph is never omitted, too (for topic) | |
1140 |
|
1140 | |||
1141 | (some details hidden, use --verbose to show complete help) |
|
1141 | (some details hidden, use --verbose to show complete help) | |
1142 | $ hg help -v topic-containing-verbose |
|
1142 | $ hg help -v topic-containing-verbose | |
1143 | This is the topic to test omit indicating. |
|
1143 | This is the topic to test omit indicating. | |
1144 | """""""""""""""""""""""""""""""""""""""""" |
|
1144 | """""""""""""""""""""""""""""""""""""""""" | |
1145 |
|
1145 | |||
1146 | This paragraph is never omitted (for topic). |
|
1146 | This paragraph is never omitted (for topic). | |
1147 |
|
1147 | |||
1148 | This paragraph is omitted, if "hg help" is invoked without "-v" (for |
|
1148 | This paragraph is omitted, if "hg help" is invoked without "-v" (for | |
1149 | topic) |
|
1149 | topic) | |
1150 |
|
1150 | |||
1151 | This paragraph is never omitted, too (for topic) |
|
1151 | This paragraph is never omitted, too (for topic) | |
1152 |
|
1152 | |||
1153 | Test section lookup |
|
1153 | Test section lookup | |
1154 |
|
1154 | |||
1155 | $ hg help revset.merge |
|
1155 | $ hg help revset.merge | |
1156 | "merge()" |
|
1156 | "merge()" | |
1157 | Changeset is a merge changeset. |
|
1157 | Changeset is a merge changeset. | |
1158 |
|
1158 | |||
1159 | $ hg help glossary.dag |
|
1159 | $ hg help glossary.dag | |
1160 | DAG |
|
1160 | DAG | |
1161 | The repository of changesets of a distributed version control system |
|
1161 | The repository of changesets of a distributed version control system | |
1162 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1162 | (DVCS) can be described as a directed acyclic graph (DAG), consisting | |
1163 | of nodes and edges, where nodes correspond to changesets and edges |
|
1163 | of nodes and edges, where nodes correspond to changesets and edges | |
1164 | imply a parent -> child relation. This graph can be visualized by |
|
1164 | imply a parent -> child relation. This graph can be visualized by | |
1165 | graphical tools such as "hg log --graph". In Mercurial, the DAG is |
|
1165 | graphical tools such as "hg log --graph". In Mercurial, the DAG is | |
1166 | limited by the requirement for children to have at most two parents. |
|
1166 | limited by the requirement for children to have at most two parents. | |
1167 |
|
1167 | |||
1168 |
|
1168 | |||
1169 | $ hg help hgrc.paths |
|
1169 | $ hg help hgrc.paths | |
1170 | "paths" |
|
1170 | "paths" | |
1171 | ------- |
|
1171 | ------- | |
1172 |
|
1172 | |||
1173 | Assigns symbolic names to repositories. The left side is the symbolic |
|
1173 | Assigns symbolic names to repositories. The left side is the symbolic | |
1174 | name, and the right gives the directory or URL that is the location of the |
|
1174 | name, and the right gives the directory or URL that is the location of the | |
1175 | repository. Default paths can be declared by setting the following |
|
1175 | repository. Default paths can be declared by setting the following | |
1176 | entries. |
|
1176 | entries. | |
1177 |
|
1177 | |||
1178 | "default" |
|
1178 | "default" | |
1179 | Directory or URL to use when pulling if no source is specified. |
|
1179 | Directory or URL to use when pulling if no source is specified. | |
1180 | (default: repository from which the current repository was cloned) |
|
1180 | (default: repository from which the current repository was cloned) | |
1181 |
|
1181 | |||
1182 | "default-push" |
|
1182 | "default-push" | |
1183 | Optional. Directory or URL to use when pushing if no destination is |
|
1183 | Optional. Directory or URL to use when pushing if no destination is | |
1184 | specified. |
|
1184 | specified. | |
1185 |
|
1185 | |||
1186 | Custom paths can be defined by assigning the path to a name that later can |
|
1186 | Custom paths can be defined by assigning the path to a name that later can | |
1187 | be used from the command line. Example: |
|
1187 | be used from the command line. Example: | |
1188 |
|
1188 | |||
1189 | [paths] |
|
1189 | [paths] | |
1190 | my_path = http://example.com/path |
|
1190 | my_path = http://example.com/path | |
1191 |
|
1191 | |||
1192 | To push to the path defined in "my_path" run the command: |
|
1192 | To push to the path defined in "my_path" run the command: | |
1193 |
|
1193 | |||
1194 | hg push my_path |
|
1194 | hg push my_path | |
1195 |
|
1195 | |||
1196 | $ hg help glossary.mcguffin |
|
1196 | $ hg help glossary.mcguffin | |
1197 | abort: help section not found |
|
1197 | abort: help section not found | |
1198 | [255] |
|
1198 | [255] | |
1199 |
|
1199 | |||
1200 | $ hg help glossary.mc.guffin |
|
1200 | $ hg help glossary.mc.guffin | |
1201 | abort: help section not found |
|
1201 | abort: help section not found | |
1202 | [255] |
|
1202 | [255] | |
1203 |
|
1203 | |||
1204 | $ hg help template.files |
|
1204 | $ hg help template.files | |
1205 | files List of strings. All files modified, added, or removed by |
|
1205 | files List of strings. All files modified, added, or removed by | |
1206 | this changeset. |
|
1206 | this changeset. | |
1207 |
|
1207 | |||
1208 | Test dynamic list of merge tools only shows up once |
|
1208 | Test dynamic list of merge tools only shows up once | |
1209 | $ hg help merge-tools |
|
1209 | $ hg help merge-tools | |
1210 | Merge Tools |
|
1210 | Merge Tools | |
1211 | """"""""""" |
|
1211 | """"""""""" | |
1212 |
|
1212 | |||
1213 | To merge files Mercurial uses merge tools. |
|
1213 | To merge files Mercurial uses merge tools. | |
1214 |
|
1214 | |||
1215 | A merge tool combines two different versions of a file into a merged file. |
|
1215 | A merge tool combines two different versions of a file into a merged file. | |
1216 | Merge tools are given the two files and the greatest common ancestor of |
|
1216 | Merge tools are given the two files and the greatest common ancestor of | |
1217 | the two file versions, so they can determine the changes made on both |
|
1217 | the two file versions, so they can determine the changes made on both | |
1218 | branches. |
|
1218 | branches. | |
1219 |
|
1219 | |||
1220 | Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg |
|
1220 | Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg | |
1221 | backout" and in several extensions. |
|
1221 | backout" and in several extensions. | |
1222 |
|
1222 | |||
1223 | Usually, the merge tool tries to automatically reconcile the files by |
|
1223 | Usually, the merge tool tries to automatically reconcile the files by | |
1224 | combining all non-overlapping changes that occurred separately in the two |
|
1224 | combining all non-overlapping changes that occurred separately in the two | |
1225 | different evolutions of the same initial base file. Furthermore, some |
|
1225 | different evolutions of the same initial base file. Furthermore, some | |
1226 | interactive merge programs make it easier to manually resolve conflicting |
|
1226 | interactive merge programs make it easier to manually resolve conflicting | |
1227 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1227 | merges, either in a graphical way, or by inserting some conflict markers. | |
1228 | Mercurial does not include any interactive merge programs but relies on |
|
1228 | Mercurial does not include any interactive merge programs but relies on | |
1229 | external tools for that. |
|
1229 | external tools for that. | |
1230 |
|
1230 | |||
1231 | Available merge tools |
|
1231 | Available merge tools | |
1232 | ===================== |
|
1232 | ===================== | |
1233 |
|
1233 | |||
1234 | External merge tools and their properties are configured in the merge- |
|
1234 | External merge tools and their properties are configured in the merge- | |
1235 | tools configuration section - see hgrc(5) - but they can often just be |
|
1235 | tools configuration section - see hgrc(5) - but they can often just be | |
1236 | named by their executable. |
|
1236 | named by their executable. | |
1237 |
|
1237 | |||
1238 | A merge tool is generally usable if its executable can be found on the |
|
1238 | A merge tool is generally usable if its executable can be found on the | |
1239 | system and if it can handle the merge. The executable is found if it is an |
|
1239 | system and if it can handle the merge. The executable is found if it is an | |
1240 | absolute or relative executable path or the name of an application in the |
|
1240 | absolute or relative executable path or the name of an application in the | |
1241 | executable search path. The tool is assumed to be able to handle the merge |
|
1241 | executable search path. The tool is assumed to be able to handle the merge | |
1242 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1242 | if it can handle symlinks if the file is a symlink, if it can handle | |
1243 | binary files if the file is binary, and if a GUI is available if the tool |
|
1243 | binary files if the file is binary, and if a GUI is available if the tool | |
1244 | requires a GUI. |
|
1244 | requires a GUI. | |
1245 |
|
1245 | |||
1246 | There are some internal merge tools which can be used. The internal merge |
|
1246 | There are some internal merge tools which can be used. The internal merge | |
1247 | tools are: |
|
1247 | tools are: | |
1248 |
|
1248 | |||
1249 | ":dump" |
|
1249 | ":dump" | |
1250 | Creates three versions of the files to merge, containing the contents of |
|
1250 | Creates three versions of the files to merge, containing the contents of | |
1251 | local, other and base. These files can then be used to perform a merge |
|
1251 | local, other and base. These files can then be used to perform a merge | |
1252 | manually. If the file to be merged is named "a.txt", these files will |
|
1252 | manually. If the file to be merged is named "a.txt", these files will | |
1253 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
1253 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and | |
1254 | they will be placed in the same directory as "a.txt". |
|
1254 | they will be placed in the same directory as "a.txt". | |
1255 |
|
1255 | |||
1256 | ":fail" |
|
1256 | ":fail" | |
1257 | Rather than attempting to merge files that were modified on both |
|
1257 | Rather than attempting to merge files that were modified on both | |
1258 | branches, it marks them as unresolved. The resolve command must be used |
|
1258 | branches, it marks them as unresolved. The resolve command must be used | |
1259 | to resolve these conflicts. |
|
1259 | to resolve these conflicts. | |
1260 |
|
1260 | |||
1261 | ":local" |
|
1261 | ":local" | |
1262 | Uses the local version of files as the merged version. |
|
1262 | Uses the local version of files as the merged version. | |
1263 |
|
1263 | |||
1264 | ":merge" |
|
1264 | ":merge" | |
1265 | Uses the internal non-interactive simple merge algorithm for merging |
|
1265 | Uses the internal non-interactive simple merge algorithm for merging | |
1266 | files. It will fail if there are any conflicts and leave markers in the |
|
1266 | files. It will fail if there are any conflicts and leave markers in the | |
1267 | partially merged file. Markers will have two sections, one for each side |
|
1267 | partially merged file. Markers will have two sections, one for each side | |
1268 | of merge. |
|
1268 | of merge. | |
1269 |
|
1269 | |||
1270 | ":merge-local" |
|
1270 | ":merge-local" | |
1271 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1271 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
1272 | local changes. |
|
1272 | local changes. | |
1273 |
|
1273 | |||
1274 | ":merge-other" |
|
1274 | ":merge-other" | |
1275 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1275 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
1276 | other changes. |
|
1276 | other changes. | |
1277 |
|
1277 | |||
1278 | ":merge3" |
|
1278 | ":merge3" | |
1279 | Uses the internal non-interactive simple merge algorithm for merging |
|
1279 | Uses the internal non-interactive simple merge algorithm for merging | |
1280 | files. It will fail if there are any conflicts and leave markers in the |
|
1280 | files. It will fail if there are any conflicts and leave markers in the | |
1281 | partially merged file. Marker will have three sections, one from each |
|
1281 | partially merged file. Marker will have three sections, one from each | |
1282 | side of the merge and one for the base content. |
|
1282 | side of the merge and one for the base content. | |
1283 |
|
1283 | |||
1284 | ":other" |
|
1284 | ":other" | |
1285 | Uses the other version of files as the merged version. |
|
1285 | Uses the other version of files as the merged version. | |
1286 |
|
1286 | |||
1287 | ":prompt" |
|
1287 | ":prompt" | |
1288 | Asks the user which of the local or the other version to keep as the |
|
1288 | Asks the user which of the local or the other version to keep as the | |
1289 | merged version. |
|
1289 | merged version. | |
1290 |
|
1290 | |||
1291 | ":tagmerge" |
|
1291 | ":tagmerge" | |
1292 | Uses the internal tag merge algorithm (experimental). |
|
1292 | Uses the internal tag merge algorithm (experimental). | |
1293 |
|
1293 | |||
1294 | ":union" |
|
1294 | ":union" | |
1295 | Uses the internal non-interactive simple merge algorithm for merging |
|
1295 | Uses the internal non-interactive simple merge algorithm for merging | |
1296 | files. It will use both left and right sides for conflict regions. No |
|
1296 | files. It will use both left and right sides for conflict regions. No | |
1297 | markers are inserted. |
|
1297 | markers are inserted. | |
1298 |
|
1298 | |||
1299 | Internal tools are always available and do not require a GUI but will by |
|
1299 | Internal tools are always available and do not require a GUI but will by | |
1300 | default not handle symlinks or binary files. |
|
1300 | default not handle symlinks or binary files. | |
1301 |
|
1301 | |||
1302 | Choosing a merge tool |
|
1302 | Choosing a merge tool | |
1303 | ===================== |
|
1303 | ===================== | |
1304 |
|
1304 | |||
1305 | Mercurial uses these rules when deciding which merge tool to use: |
|
1305 | Mercurial uses these rules when deciding which merge tool to use: | |
1306 |
|
1306 | |||
1307 | 1. If a tool has been specified with the --tool option to merge or |
|
1307 | 1. If a tool has been specified with the --tool option to merge or | |
1308 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
1308 | resolve, it is used. If it is the name of a tool in the merge-tools | |
1309 | configuration, its configuration is used. Otherwise the specified tool |
|
1309 | configuration, its configuration is used. Otherwise the specified tool | |
1310 | must be executable by the shell. |
|
1310 | must be executable by the shell. | |
1311 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
1311 | 2. If the "HGMERGE" environment variable is present, its value is used and | |
1312 | must be executable by the shell. |
|
1312 | must be executable by the shell. | |
1313 | 3. If the filename of the file to be merged matches any of the patterns in |
|
1313 | 3. If the filename of the file to be merged matches any of the patterns in | |
1314 | the merge-patterns configuration section, the first usable merge tool |
|
1314 | the merge-patterns configuration section, the first usable merge tool | |
1315 | corresponding to a matching pattern is used. Here, binary capabilities |
|
1315 | corresponding to a matching pattern is used. Here, binary capabilities | |
1316 | of the merge tool are not considered. |
|
1316 | of the merge tool are not considered. | |
1317 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
1317 | 4. If ui.merge is set it will be considered next. If the value is not the | |
1318 | name of a configured tool, the specified value is used and must be |
|
1318 | name of a configured tool, the specified value is used and must be | |
1319 | executable by the shell. Otherwise the named tool is used if it is |
|
1319 | executable by the shell. Otherwise the named tool is used if it is | |
1320 | usable. |
|
1320 | usable. | |
1321 | 5. If any usable merge tools are present in the merge-tools configuration |
|
1321 | 5. If any usable merge tools are present in the merge-tools configuration | |
1322 | section, the one with the highest priority is used. |
|
1322 | section, the one with the highest priority is used. | |
1323 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
1323 | 6. If a program named "hgmerge" can be found on the system, it is used - | |
1324 | but it will by default not be used for symlinks and binary files. |
|
1324 | but it will by default not be used for symlinks and binary files. | |
1325 | 7. If the file to be merged is not binary and is not a symlink, then |
|
1325 | 7. If the file to be merged is not binary and is not a symlink, then | |
1326 | internal ":merge" is used. |
|
1326 | internal ":merge" is used. | |
1327 | 8. The merge of the file fails and must be resolved before commit. |
|
1327 | 8. The merge of the file fails and must be resolved before commit. | |
1328 |
|
1328 | |||
1329 | Note: |
|
1329 | Note: | |
1330 | After selecting a merge program, Mercurial will by default attempt to |
|
1330 | After selecting a merge program, Mercurial will by default attempt to | |
1331 | merge the files using a simple merge algorithm first. Only if it |
|
1331 | merge the files using a simple merge algorithm first. Only if it | |
1332 | doesn't succeed because of conflicting changes Mercurial will actually |
|
1332 | doesn't succeed because of conflicting changes Mercurial will actually | |
1333 | execute the merge program. Whether to use the simple merge algorithm |
|
1333 | execute the merge program. Whether to use the simple merge algorithm | |
1334 | first can be controlled by the premerge setting of the merge tool. |
|
1334 | first can be controlled by the premerge setting of the merge tool. | |
1335 | Premerge is enabled by default unless the file is binary or a symlink. |
|
1335 | Premerge is enabled by default unless the file is binary or a symlink. | |
1336 |
|
1336 | |||
1337 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
1337 | See the merge-tools and ui sections of hgrc(5) for details on the | |
1338 | configuration of merge tools. |
|
1338 | configuration of merge tools. | |
1339 |
|
1339 | |||
1340 | Test usage of section marks in help documents |
|
1340 | Test usage of section marks in help documents | |
1341 |
|
1341 | |||
1342 | $ cd "$TESTDIR"/../doc |
|
1342 | $ cd "$TESTDIR"/../doc | |
1343 | $ python check-seclevel.py |
|
1343 | $ python check-seclevel.py | |
1344 | $ cd $TESTTMP |
|
1344 | $ cd $TESTTMP | |
1345 |
|
1345 | |||
1346 | #if serve |
|
1346 | #if serve | |
1347 |
|
1347 | |||
1348 | Test the help pages in hgweb. |
|
1348 | Test the help pages in hgweb. | |
1349 |
|
1349 | |||
1350 | Dish up an empty repo; serve it cold. |
|
1350 | Dish up an empty repo; serve it cold. | |
1351 |
|
1351 | |||
1352 | $ hg init "$TESTTMP/test" |
|
1352 | $ hg init "$TESTTMP/test" | |
1353 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
1353 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | |
1354 | $ cat hg.pid >> $DAEMON_PIDS |
|
1354 | $ cat hg.pid >> $DAEMON_PIDS | |
1355 |
|
1355 | |||
1356 | $ get-with-headers.py 127.0.0.1:$HGPORT "help" |
|
1356 | $ get-with-headers.py 127.0.0.1:$HGPORT "help" | |
1357 | 200 Script output follows |
|
1357 | 200 Script output follows | |
1358 |
|
1358 | |||
1359 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1359 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1360 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1360 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1361 | <head> |
|
1361 | <head> | |
1362 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1362 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1363 | <meta name="robots" content="index, nofollow" /> |
|
1363 | <meta name="robots" content="index, nofollow" /> | |
1364 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1364 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1365 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1365 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1366 |
|
1366 | |||
1367 | <title>Help: Index</title> |
|
1367 | <title>Help: Index</title> | |
1368 | </head> |
|
1368 | </head> | |
1369 | <body> |
|
1369 | <body> | |
1370 |
|
1370 | |||
1371 | <div class="container"> |
|
1371 | <div class="container"> | |
1372 | <div class="menu"> |
|
1372 | <div class="menu"> | |
1373 | <div class="logo"> |
|
1373 | <div class="logo"> | |
1374 | <a href="http://mercurial.selenic.com/"> |
|
1374 | <a href="http://mercurial.selenic.com/"> | |
1375 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1375 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1376 | </div> |
|
1376 | </div> | |
1377 | <ul> |
|
1377 | <ul> | |
1378 | <li><a href="/shortlog">log</a></li> |
|
1378 | <li><a href="/shortlog">log</a></li> | |
1379 | <li><a href="/graph">graph</a></li> |
|
1379 | <li><a href="/graph">graph</a></li> | |
1380 | <li><a href="/tags">tags</a></li> |
|
1380 | <li><a href="/tags">tags</a></li> | |
1381 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1381 | <li><a href="/bookmarks">bookmarks</a></li> | |
1382 | <li><a href="/branches">branches</a></li> |
|
1382 | <li><a href="/branches">branches</a></li> | |
1383 | </ul> |
|
1383 | </ul> | |
1384 | <ul> |
|
1384 | <ul> | |
1385 | <li class="active">help</li> |
|
1385 | <li class="active">help</li> | |
1386 | </ul> |
|
1386 | </ul> | |
1387 | </div> |
|
1387 | </div> | |
1388 |
|
1388 | |||
1389 | <div class="main"> |
|
1389 | <div class="main"> | |
1390 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1390 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
1391 | <form class="search" action="/log"> |
|
1391 | <form class="search" action="/log"> | |
1392 |
|
1392 | |||
1393 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
1393 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
1394 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1394 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
1395 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1395 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
1396 | </form> |
|
1396 | </form> | |
1397 | <table class="bigtable"> |
|
1397 | <table class="bigtable"> | |
1398 | <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr> |
|
1398 | <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr> | |
1399 |
|
1399 | |||
1400 | <tr><td> |
|
1400 | <tr><td> | |
1401 | <a href="/help/config"> |
|
1401 | <a href="/help/config"> | |
1402 | config |
|
1402 | config | |
1403 | </a> |
|
1403 | </a> | |
1404 | </td><td> |
|
1404 | </td><td> | |
1405 | Configuration Files |
|
1405 | Configuration Files | |
1406 | </td></tr> |
|
1406 | </td></tr> | |
1407 | <tr><td> |
|
1407 | <tr><td> | |
1408 | <a href="/help/dates"> |
|
1408 | <a href="/help/dates"> | |
1409 | dates |
|
1409 | dates | |
1410 | </a> |
|
1410 | </a> | |
1411 | </td><td> |
|
1411 | </td><td> | |
1412 | Date Formats |
|
1412 | Date Formats | |
1413 | </td></tr> |
|
1413 | </td></tr> | |
1414 | <tr><td> |
|
1414 | <tr><td> | |
1415 | <a href="/help/diffs"> |
|
1415 | <a href="/help/diffs"> | |
1416 | diffs |
|
1416 | diffs | |
1417 | </a> |
|
1417 | </a> | |
1418 | </td><td> |
|
1418 | </td><td> | |
1419 | Diff Formats |
|
1419 | Diff Formats | |
1420 | </td></tr> |
|
1420 | </td></tr> | |
1421 | <tr><td> |
|
1421 | <tr><td> | |
1422 | <a href="/help/environment"> |
|
1422 | <a href="/help/environment"> | |
1423 | environment |
|
1423 | environment | |
1424 | </a> |
|
1424 | </a> | |
1425 | </td><td> |
|
1425 | </td><td> | |
1426 | Environment Variables |
|
1426 | Environment Variables | |
1427 | </td></tr> |
|
1427 | </td></tr> | |
1428 | <tr><td> |
|
1428 | <tr><td> | |
1429 | <a href="/help/extensions"> |
|
1429 | <a href="/help/extensions"> | |
1430 | extensions |
|
1430 | extensions | |
1431 | </a> |
|
1431 | </a> | |
1432 | </td><td> |
|
1432 | </td><td> | |
1433 | Using Additional Features |
|
1433 | Using Additional Features | |
1434 | </td></tr> |
|
1434 | </td></tr> | |
1435 | <tr><td> |
|
1435 | <tr><td> | |
1436 | <a href="/help/filesets"> |
|
1436 | <a href="/help/filesets"> | |
1437 | filesets |
|
1437 | filesets | |
1438 | </a> |
|
1438 | </a> | |
1439 | </td><td> |
|
1439 | </td><td> | |
1440 | Specifying File Sets |
|
1440 | Specifying File Sets | |
1441 | </td></tr> |
|
1441 | </td></tr> | |
1442 | <tr><td> |
|
1442 | <tr><td> | |
1443 | <a href="/help/glossary"> |
|
1443 | <a href="/help/glossary"> | |
1444 | glossary |
|
1444 | glossary | |
1445 | </a> |
|
1445 | </a> | |
1446 | </td><td> |
|
1446 | </td><td> | |
1447 | Glossary |
|
1447 | Glossary | |
1448 | </td></tr> |
|
1448 | </td></tr> | |
1449 | <tr><td> |
|
1449 | <tr><td> | |
1450 | <a href="/help/hgignore"> |
|
1450 | <a href="/help/hgignore"> | |
1451 | hgignore |
|
1451 | hgignore | |
1452 | </a> |
|
1452 | </a> | |
1453 | </td><td> |
|
1453 | </td><td> | |
1454 | Syntax for Mercurial Ignore Files |
|
1454 | Syntax for Mercurial Ignore Files | |
1455 | </td></tr> |
|
1455 | </td></tr> | |
1456 | <tr><td> |
|
1456 | <tr><td> | |
1457 | <a href="/help/hgweb"> |
|
1457 | <a href="/help/hgweb"> | |
1458 | hgweb |
|
1458 | hgweb | |
1459 | </a> |
|
1459 | </a> | |
1460 | </td><td> |
|
1460 | </td><td> | |
1461 | Configuring hgweb |
|
1461 | Configuring hgweb | |
1462 | </td></tr> |
|
1462 | </td></tr> | |
1463 | <tr><td> |
|
1463 | <tr><td> | |
1464 | <a href="/help/merge-tools"> |
|
1464 | <a href="/help/merge-tools"> | |
1465 | merge-tools |
|
1465 | merge-tools | |
1466 | </a> |
|
1466 | </a> | |
1467 | </td><td> |
|
1467 | </td><td> | |
1468 | Merge Tools |
|
1468 | Merge Tools | |
1469 | </td></tr> |
|
1469 | </td></tr> | |
1470 | <tr><td> |
|
1470 | <tr><td> | |
1471 | <a href="/help/multirevs"> |
|
1471 | <a href="/help/multirevs"> | |
1472 | multirevs |
|
1472 | multirevs | |
1473 | </a> |
|
1473 | </a> | |
1474 | </td><td> |
|
1474 | </td><td> | |
1475 | Specifying Multiple Revisions |
|
1475 | Specifying Multiple Revisions | |
1476 | </td></tr> |
|
1476 | </td></tr> | |
1477 | <tr><td> |
|
1477 | <tr><td> | |
1478 | <a href="/help/patterns"> |
|
1478 | <a href="/help/patterns"> | |
1479 | patterns |
|
1479 | patterns | |
1480 | </a> |
|
1480 | </a> | |
1481 | </td><td> |
|
1481 | </td><td> | |
1482 | File Name Patterns |
|
1482 | File Name Patterns | |
1483 | </td></tr> |
|
1483 | </td></tr> | |
1484 | <tr><td> |
|
1484 | <tr><td> | |
1485 | <a href="/help/phases"> |
|
1485 | <a href="/help/phases"> | |
1486 | phases |
|
1486 | phases | |
1487 | </a> |
|
1487 | </a> | |
1488 | </td><td> |
|
1488 | </td><td> | |
1489 | Working with Phases |
|
1489 | Working with Phases | |
1490 | </td></tr> |
|
1490 | </td></tr> | |
1491 | <tr><td> |
|
1491 | <tr><td> | |
1492 | <a href="/help/revisions"> |
|
1492 | <a href="/help/revisions"> | |
1493 | revisions |
|
1493 | revisions | |
1494 | </a> |
|
1494 | </a> | |
1495 | </td><td> |
|
1495 | </td><td> | |
1496 | Specifying Single Revisions |
|
1496 | Specifying Single Revisions | |
1497 | </td></tr> |
|
1497 | </td></tr> | |
1498 | <tr><td> |
|
1498 | <tr><td> | |
1499 | <a href="/help/revsets"> |
|
1499 | <a href="/help/revsets"> | |
1500 | revsets |
|
1500 | revsets | |
1501 | </a> |
|
1501 | </a> | |
1502 | </td><td> |
|
1502 | </td><td> | |
1503 | Specifying Revision Sets |
|
1503 | Specifying Revision Sets | |
1504 | </td></tr> |
|
1504 | </td></tr> | |
1505 | <tr><td> |
|
1505 | <tr><td> | |
1506 | <a href="/help/scripting"> |
|
1506 | <a href="/help/scripting"> | |
1507 | scripting |
|
1507 | scripting | |
1508 | </a> |
|
1508 | </a> | |
1509 | </td><td> |
|
1509 | </td><td> | |
1510 | Using Mercurial from scripts and automation |
|
1510 | Using Mercurial from scripts and automation | |
1511 | </td></tr> |
|
1511 | </td></tr> | |
1512 | <tr><td> |
|
1512 | <tr><td> | |
1513 | <a href="/help/subrepos"> |
|
1513 | <a href="/help/subrepos"> | |
1514 | subrepos |
|
1514 | subrepos | |
1515 | </a> |
|
1515 | </a> | |
1516 | </td><td> |
|
1516 | </td><td> | |
1517 | Subrepositories |
|
1517 | Subrepositories | |
1518 | </td></tr> |
|
1518 | </td></tr> | |
1519 | <tr><td> |
|
1519 | <tr><td> | |
1520 | <a href="/help/templating"> |
|
1520 | <a href="/help/templating"> | |
1521 | templating |
|
1521 | templating | |
1522 | </a> |
|
1522 | </a> | |
1523 | </td><td> |
|
1523 | </td><td> | |
1524 | Template Usage |
|
1524 | Template Usage | |
1525 | </td></tr> |
|
1525 | </td></tr> | |
1526 | <tr><td> |
|
1526 | <tr><td> | |
1527 | <a href="/help/urls"> |
|
1527 | <a href="/help/urls"> | |
1528 | urls |
|
1528 | urls | |
1529 | </a> |
|
1529 | </a> | |
1530 | </td><td> |
|
1530 | </td><td> | |
1531 | URL Paths |
|
1531 | URL Paths | |
1532 | </td></tr> |
|
1532 | </td></tr> | |
1533 | <tr><td> |
|
1533 | <tr><td> | |
1534 | <a href="/help/topic-containing-verbose"> |
|
1534 | <a href="/help/topic-containing-verbose"> | |
1535 | topic-containing-verbose |
|
1535 | topic-containing-verbose | |
1536 | </a> |
|
1536 | </a> | |
1537 | </td><td> |
|
1537 | </td><td> | |
1538 | This is the topic to test omit indicating. |
|
1538 | This is the topic to test omit indicating. | |
1539 | </td></tr> |
|
1539 | </td></tr> | |
1540 |
|
1540 | |||
1541 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
1541 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | |
1542 |
|
1542 | |||
1543 | <tr><td> |
|
1543 | <tr><td> | |
1544 | <a href="/help/add"> |
|
1544 | <a href="/help/add"> | |
1545 | add |
|
1545 | add | |
1546 | </a> |
|
1546 | </a> | |
1547 | </td><td> |
|
1547 | </td><td> | |
1548 | add the specified files on the next commit |
|
1548 | add the specified files on the next commit | |
1549 | </td></tr> |
|
1549 | </td></tr> | |
1550 | <tr><td> |
|
1550 | <tr><td> | |
1551 | <a href="/help/annotate"> |
|
1551 | <a href="/help/annotate"> | |
1552 | annotate |
|
1552 | annotate | |
1553 | </a> |
|
1553 | </a> | |
1554 | </td><td> |
|
1554 | </td><td> | |
1555 | show changeset information by line for each file |
|
1555 | show changeset information by line for each file | |
1556 | </td></tr> |
|
1556 | </td></tr> | |
1557 | <tr><td> |
|
1557 | <tr><td> | |
1558 | <a href="/help/clone"> |
|
1558 | <a href="/help/clone"> | |
1559 | clone |
|
1559 | clone | |
1560 | </a> |
|
1560 | </a> | |
1561 | </td><td> |
|
1561 | </td><td> | |
1562 | make a copy of an existing repository |
|
1562 | make a copy of an existing repository | |
1563 | </td></tr> |
|
1563 | </td></tr> | |
1564 | <tr><td> |
|
1564 | <tr><td> | |
1565 | <a href="/help/commit"> |
|
1565 | <a href="/help/commit"> | |
1566 | commit |
|
1566 | commit | |
1567 | </a> |
|
1567 | </a> | |
1568 | </td><td> |
|
1568 | </td><td> | |
1569 | commit the specified files or all outstanding changes |
|
1569 | commit the specified files or all outstanding changes | |
1570 | </td></tr> |
|
1570 | </td></tr> | |
1571 | <tr><td> |
|
1571 | <tr><td> | |
1572 | <a href="/help/diff"> |
|
1572 | <a href="/help/diff"> | |
1573 | diff |
|
1573 | diff | |
1574 | </a> |
|
1574 | </a> | |
1575 | </td><td> |
|
1575 | </td><td> | |
1576 | diff repository (or selected files) |
|
1576 | diff repository (or selected files) | |
1577 | </td></tr> |
|
1577 | </td></tr> | |
1578 | <tr><td> |
|
1578 | <tr><td> | |
1579 | <a href="/help/export"> |
|
1579 | <a href="/help/export"> | |
1580 | export |
|
1580 | export | |
1581 | </a> |
|
1581 | </a> | |
1582 | </td><td> |
|
1582 | </td><td> | |
1583 | dump the header and diffs for one or more changesets |
|
1583 | dump the header and diffs for one or more changesets | |
1584 | </td></tr> |
|
1584 | </td></tr> | |
1585 | <tr><td> |
|
1585 | <tr><td> | |
1586 | <a href="/help/forget"> |
|
1586 | <a href="/help/forget"> | |
1587 | forget |
|
1587 | forget | |
1588 | </a> |
|
1588 | </a> | |
1589 | </td><td> |
|
1589 | </td><td> | |
1590 | forget the specified files on the next commit |
|
1590 | forget the specified files on the next commit | |
1591 | </td></tr> |
|
1591 | </td></tr> | |
1592 | <tr><td> |
|
1592 | <tr><td> | |
1593 | <a href="/help/init"> |
|
1593 | <a href="/help/init"> | |
1594 | init |
|
1594 | init | |
1595 | </a> |
|
1595 | </a> | |
1596 | </td><td> |
|
1596 | </td><td> | |
1597 | create a new repository in the given directory |
|
1597 | create a new repository in the given directory | |
1598 | </td></tr> |
|
1598 | </td></tr> | |
1599 | <tr><td> |
|
1599 | <tr><td> | |
1600 | <a href="/help/log"> |
|
1600 | <a href="/help/log"> | |
1601 | log |
|
1601 | log | |
1602 | </a> |
|
1602 | </a> | |
1603 | </td><td> |
|
1603 | </td><td> | |
1604 | show revision history of entire repository or files |
|
1604 | show revision history of entire repository or files | |
1605 | </td></tr> |
|
1605 | </td></tr> | |
1606 | <tr><td> |
|
1606 | <tr><td> | |
1607 | <a href="/help/merge"> |
|
1607 | <a href="/help/merge"> | |
1608 | merge |
|
1608 | merge | |
1609 | </a> |
|
1609 | </a> | |
1610 | </td><td> |
|
1610 | </td><td> | |
1611 | merge another revision into working directory |
|
1611 | merge another revision into working directory | |
1612 | </td></tr> |
|
1612 | </td></tr> | |
1613 | <tr><td> |
|
1613 | <tr><td> | |
1614 | <a href="/help/pull"> |
|
1614 | <a href="/help/pull"> | |
1615 | pull |
|
1615 | pull | |
1616 | </a> |
|
1616 | </a> | |
1617 | </td><td> |
|
1617 | </td><td> | |
1618 | pull changes from the specified source |
|
1618 | pull changes from the specified source | |
1619 | </td></tr> |
|
1619 | </td></tr> | |
1620 | <tr><td> |
|
1620 | <tr><td> | |
1621 | <a href="/help/push"> |
|
1621 | <a href="/help/push"> | |
1622 | push |
|
1622 | push | |
1623 | </a> |
|
1623 | </a> | |
1624 | </td><td> |
|
1624 | </td><td> | |
1625 | push changes to the specified destination |
|
1625 | push changes to the specified destination | |
1626 | </td></tr> |
|
1626 | </td></tr> | |
1627 | <tr><td> |
|
1627 | <tr><td> | |
1628 | <a href="/help/remove"> |
|
1628 | <a href="/help/remove"> | |
1629 | remove |
|
1629 | remove | |
1630 | </a> |
|
1630 | </a> | |
1631 | </td><td> |
|
1631 | </td><td> | |
1632 | remove the specified files on the next commit |
|
1632 | remove the specified files on the next commit | |
1633 | </td></tr> |
|
1633 | </td></tr> | |
1634 | <tr><td> |
|
1634 | <tr><td> | |
1635 | <a href="/help/serve"> |
|
1635 | <a href="/help/serve"> | |
1636 | serve |
|
1636 | serve | |
1637 | </a> |
|
1637 | </a> | |
1638 | </td><td> |
|
1638 | </td><td> | |
1639 | start stand-alone webserver |
|
1639 | start stand-alone webserver | |
1640 | </td></tr> |
|
1640 | </td></tr> | |
1641 | <tr><td> |
|
1641 | <tr><td> | |
1642 | <a href="/help/status"> |
|
1642 | <a href="/help/status"> | |
1643 | status |
|
1643 | status | |
1644 | </a> |
|
1644 | </a> | |
1645 | </td><td> |
|
1645 | </td><td> | |
1646 | show changed files in the working directory |
|
1646 | show changed files in the working directory | |
1647 | </td></tr> |
|
1647 | </td></tr> | |
1648 | <tr><td> |
|
1648 | <tr><td> | |
1649 | <a href="/help/summary"> |
|
1649 | <a href="/help/summary"> | |
1650 | summary |
|
1650 | summary | |
1651 | </a> |
|
1651 | </a> | |
1652 | </td><td> |
|
1652 | </td><td> | |
1653 | summarize working directory state |
|
1653 | summarize working directory state | |
1654 | </td></tr> |
|
1654 | </td></tr> | |
1655 | <tr><td> |
|
1655 | <tr><td> | |
1656 | <a href="/help/update"> |
|
1656 | <a href="/help/update"> | |
1657 | update |
|
1657 | update | |
1658 | </a> |
|
1658 | </a> | |
1659 | </td><td> |
|
1659 | </td><td> | |
1660 | update working directory (or switch revisions) |
|
1660 | update working directory (or switch revisions) | |
1661 | </td></tr> |
|
1661 | </td></tr> | |
1662 |
|
1662 | |||
1663 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
1663 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | |
1664 |
|
1664 | |||
1665 | <tr><td> |
|
1665 | <tr><td> | |
1666 | <a href="/help/addremove"> |
|
1666 | <a href="/help/addremove"> | |
1667 | addremove |
|
1667 | addremove | |
1668 | </a> |
|
1668 | </a> | |
1669 | </td><td> |
|
1669 | </td><td> | |
1670 | add all new files, delete all missing files |
|
1670 | add all new files, delete all missing files | |
1671 | </td></tr> |
|
1671 | </td></tr> | |
1672 | <tr><td> |
|
1672 | <tr><td> | |
1673 | <a href="/help/archive"> |
|
1673 | <a href="/help/archive"> | |
1674 | archive |
|
1674 | archive | |
1675 | </a> |
|
1675 | </a> | |
1676 | </td><td> |
|
1676 | </td><td> | |
1677 | create an unversioned archive of a repository revision |
|
1677 | create an unversioned archive of a repository revision | |
1678 | </td></tr> |
|
1678 | </td></tr> | |
1679 | <tr><td> |
|
1679 | <tr><td> | |
1680 | <a href="/help/backout"> |
|
1680 | <a href="/help/backout"> | |
1681 | backout |
|
1681 | backout | |
1682 | </a> |
|
1682 | </a> | |
1683 | </td><td> |
|
1683 | </td><td> | |
1684 | reverse effect of earlier changeset |
|
1684 | reverse effect of earlier changeset | |
1685 | </td></tr> |
|
1685 | </td></tr> | |
1686 | <tr><td> |
|
1686 | <tr><td> | |
1687 | <a href="/help/bisect"> |
|
1687 | <a href="/help/bisect"> | |
1688 | bisect |
|
1688 | bisect | |
1689 | </a> |
|
1689 | </a> | |
1690 | </td><td> |
|
1690 | </td><td> | |
1691 | subdivision search of changesets |
|
1691 | subdivision search of changesets | |
1692 | </td></tr> |
|
1692 | </td></tr> | |
1693 | <tr><td> |
|
1693 | <tr><td> | |
1694 | <a href="/help/bookmarks"> |
|
1694 | <a href="/help/bookmarks"> | |
1695 | bookmarks |
|
1695 | bookmarks | |
1696 | </a> |
|
1696 | </a> | |
1697 | </td><td> |
|
1697 | </td><td> | |
1698 | create a new bookmark or list existing bookmarks |
|
1698 | create a new bookmark or list existing bookmarks | |
1699 | </td></tr> |
|
1699 | </td></tr> | |
1700 | <tr><td> |
|
1700 | <tr><td> | |
1701 | <a href="/help/branch"> |
|
1701 | <a href="/help/branch"> | |
1702 | branch |
|
1702 | branch | |
1703 | </a> |
|
1703 | </a> | |
1704 | </td><td> |
|
1704 | </td><td> | |
1705 | set or show the current branch name |
|
1705 | set or show the current branch name | |
1706 | </td></tr> |
|
1706 | </td></tr> | |
1707 | <tr><td> |
|
1707 | <tr><td> | |
1708 | <a href="/help/branches"> |
|
1708 | <a href="/help/branches"> | |
1709 | branches |
|
1709 | branches | |
1710 | </a> |
|
1710 | </a> | |
1711 | </td><td> |
|
1711 | </td><td> | |
1712 | list repository named branches |
|
1712 | list repository named branches | |
1713 | </td></tr> |
|
1713 | </td></tr> | |
1714 | <tr><td> |
|
1714 | <tr><td> | |
1715 | <a href="/help/bundle"> |
|
1715 | <a href="/help/bundle"> | |
1716 | bundle |
|
1716 | bundle | |
1717 | </a> |
|
1717 | </a> | |
1718 | </td><td> |
|
1718 | </td><td> | |
1719 | create a changegroup file |
|
1719 | create a changegroup file | |
1720 | </td></tr> |
|
1720 | </td></tr> | |
1721 | <tr><td> |
|
1721 | <tr><td> | |
1722 | <a href="/help/cat"> |
|
1722 | <a href="/help/cat"> | |
1723 | cat |
|
1723 | cat | |
1724 | </a> |
|
1724 | </a> | |
1725 | </td><td> |
|
1725 | </td><td> | |
1726 | output the current or given revision of files |
|
1726 | output the current or given revision of files | |
1727 | </td></tr> |
|
1727 | </td></tr> | |
1728 | <tr><td> |
|
1728 | <tr><td> | |
1729 | <a href="/help/config"> |
|
1729 | <a href="/help/config"> | |
1730 | config |
|
1730 | config | |
1731 | </a> |
|
1731 | </a> | |
1732 | </td><td> |
|
1732 | </td><td> | |
1733 | show combined config settings from all hgrc files |
|
1733 | show combined config settings from all hgrc files | |
1734 | </td></tr> |
|
1734 | </td></tr> | |
1735 | <tr><td> |
|
1735 | <tr><td> | |
1736 | <a href="/help/copy"> |
|
1736 | <a href="/help/copy"> | |
1737 | copy |
|
1737 | copy | |
1738 | </a> |
|
1738 | </a> | |
1739 | </td><td> |
|
1739 | </td><td> | |
1740 | mark files as copied for the next commit |
|
1740 | mark files as copied for the next commit | |
1741 | </td></tr> |
|
1741 | </td></tr> | |
1742 | <tr><td> |
|
1742 | <tr><td> | |
1743 | <a href="/help/files"> |
|
1743 | <a href="/help/files"> | |
1744 | files |
|
1744 | files | |
1745 | </a> |
|
1745 | </a> | |
1746 | </td><td> |
|
1746 | </td><td> | |
1747 | list tracked files |
|
1747 | list tracked files | |
1748 | </td></tr> |
|
1748 | </td></tr> | |
1749 | <tr><td> |
|
1749 | <tr><td> | |
1750 | <a href="/help/graft"> |
|
1750 | <a href="/help/graft"> | |
1751 | graft |
|
1751 | graft | |
1752 | </a> |
|
1752 | </a> | |
1753 | </td><td> |
|
1753 | </td><td> | |
1754 | copy changes from other branches onto the current branch |
|
1754 | copy changes from other branches onto the current branch | |
1755 | </td></tr> |
|
1755 | </td></tr> | |
1756 | <tr><td> |
|
1756 | <tr><td> | |
1757 | <a href="/help/grep"> |
|
1757 | <a href="/help/grep"> | |
1758 | grep |
|
1758 | grep | |
1759 | </a> |
|
1759 | </a> | |
1760 | </td><td> |
|
1760 | </td><td> | |
1761 | search for a pattern in specified files and revisions |
|
1761 | search for a pattern in specified files and revisions | |
1762 | </td></tr> |
|
1762 | </td></tr> | |
1763 | <tr><td> |
|
1763 | <tr><td> | |
1764 | <a href="/help/heads"> |
|
1764 | <a href="/help/heads"> | |
1765 | heads |
|
1765 | heads | |
1766 | </a> |
|
1766 | </a> | |
1767 | </td><td> |
|
1767 | </td><td> | |
1768 | show branch heads |
|
1768 | show branch heads | |
1769 | </td></tr> |
|
1769 | </td></tr> | |
1770 | <tr><td> |
|
1770 | <tr><td> | |
1771 | <a href="/help/help"> |
|
1771 | <a href="/help/help"> | |
1772 | help |
|
1772 | help | |
1773 | </a> |
|
1773 | </a> | |
1774 | </td><td> |
|
1774 | </td><td> | |
1775 | show help for a given topic or a help overview |
|
1775 | show help for a given topic or a help overview | |
1776 | </td></tr> |
|
1776 | </td></tr> | |
1777 | <tr><td> |
|
1777 | <tr><td> | |
1778 | <a href="/help/identify"> |
|
1778 | <a href="/help/identify"> | |
1779 | identify |
|
1779 | identify | |
1780 | </a> |
|
1780 | </a> | |
1781 | </td><td> |
|
1781 | </td><td> | |
1782 | identify the working directory or specified revision |
|
1782 | identify the working directory or specified revision | |
1783 | </td></tr> |
|
1783 | </td></tr> | |
1784 | <tr><td> |
|
1784 | <tr><td> | |
1785 | <a href="/help/import"> |
|
1785 | <a href="/help/import"> | |
1786 | import |
|
1786 | import | |
1787 | </a> |
|
1787 | </a> | |
1788 | </td><td> |
|
1788 | </td><td> | |
1789 | import an ordered set of patches |
|
1789 | import an ordered set of patches | |
1790 | </td></tr> |
|
1790 | </td></tr> | |
1791 | <tr><td> |
|
1791 | <tr><td> | |
1792 | <a href="/help/incoming"> |
|
1792 | <a href="/help/incoming"> | |
1793 | incoming |
|
1793 | incoming | |
1794 | </a> |
|
1794 | </a> | |
1795 | </td><td> |
|
1795 | </td><td> | |
1796 | show new changesets found in source |
|
1796 | show new changesets found in source | |
1797 | </td></tr> |
|
1797 | </td></tr> | |
1798 | <tr><td> |
|
1798 | <tr><td> | |
1799 | <a href="/help/manifest"> |
|
1799 | <a href="/help/manifest"> | |
1800 | manifest |
|
1800 | manifest | |
1801 | </a> |
|
1801 | </a> | |
1802 | </td><td> |
|
1802 | </td><td> | |
1803 | output the current or given revision of the project manifest |
|
1803 | output the current or given revision of the project manifest | |
1804 | </td></tr> |
|
1804 | </td></tr> | |
1805 | <tr><td> |
|
1805 | <tr><td> | |
1806 | <a href="/help/nohelp"> |
|
1806 | <a href="/help/nohelp"> | |
1807 | nohelp |
|
1807 | nohelp | |
1808 | </a> |
|
1808 | </a> | |
1809 | </td><td> |
|
1809 | </td><td> | |
1810 | (no help text available) |
|
1810 | (no help text available) | |
1811 | </td></tr> |
|
1811 | </td></tr> | |
1812 | <tr><td> |
|
1812 | <tr><td> | |
1813 | <a href="/help/outgoing"> |
|
1813 | <a href="/help/outgoing"> | |
1814 | outgoing |
|
1814 | outgoing | |
1815 | </a> |
|
1815 | </a> | |
1816 | </td><td> |
|
1816 | </td><td> | |
1817 | show changesets not found in the destination |
|
1817 | show changesets not found in the destination | |
1818 | </td></tr> |
|
1818 | </td></tr> | |
1819 | <tr><td> |
|
1819 | <tr><td> | |
1820 | <a href="/help/paths"> |
|
1820 | <a href="/help/paths"> | |
1821 | paths |
|
1821 | paths | |
1822 | </a> |
|
1822 | </a> | |
1823 | </td><td> |
|
1823 | </td><td> | |
1824 | show aliases for remote repositories |
|
1824 | show aliases for remote repositories | |
1825 | </td></tr> |
|
1825 | </td></tr> | |
1826 | <tr><td> |
|
1826 | <tr><td> | |
1827 | <a href="/help/phase"> |
|
1827 | <a href="/help/phase"> | |
1828 | phase |
|
1828 | phase | |
1829 | </a> |
|
1829 | </a> | |
1830 | </td><td> |
|
1830 | </td><td> | |
1831 | set or show the current phase name |
|
1831 | set or show the current phase name | |
1832 | </td></tr> |
|
1832 | </td></tr> | |
1833 | <tr><td> |
|
1833 | <tr><td> | |
1834 | <a href="/help/recover"> |
|
1834 | <a href="/help/recover"> | |
1835 | recover |
|
1835 | recover | |
1836 | </a> |
|
1836 | </a> | |
1837 | </td><td> |
|
1837 | </td><td> | |
1838 | roll back an interrupted transaction |
|
1838 | roll back an interrupted transaction | |
1839 | </td></tr> |
|
1839 | </td></tr> | |
1840 | <tr><td> |
|
1840 | <tr><td> | |
1841 | <a href="/help/rename"> |
|
1841 | <a href="/help/rename"> | |
1842 | rename |
|
1842 | rename | |
1843 | </a> |
|
1843 | </a> | |
1844 | </td><td> |
|
1844 | </td><td> | |
1845 | rename files; equivalent of copy + remove |
|
1845 | rename files; equivalent of copy + remove | |
1846 | </td></tr> |
|
1846 | </td></tr> | |
1847 | <tr><td> |
|
1847 | <tr><td> | |
1848 | <a href="/help/resolve"> |
|
1848 | <a href="/help/resolve"> | |
1849 | resolve |
|
1849 | resolve | |
1850 | </a> |
|
1850 | </a> | |
1851 | </td><td> |
|
1851 | </td><td> | |
1852 | redo merges or set/view the merge status of files |
|
1852 | redo merges or set/view the merge status of files | |
1853 | </td></tr> |
|
1853 | </td></tr> | |
1854 | <tr><td> |
|
1854 | <tr><td> | |
1855 | <a href="/help/revert"> |
|
1855 | <a href="/help/revert"> | |
1856 | revert |
|
1856 | revert | |
1857 | </a> |
|
1857 | </a> | |
1858 | </td><td> |
|
1858 | </td><td> | |
1859 | restore files to their checkout state |
|
1859 | restore files to their checkout state | |
1860 | </td></tr> |
|
1860 | </td></tr> | |
1861 | <tr><td> |
|
1861 | <tr><td> | |
1862 | <a href="/help/root"> |
|
1862 | <a href="/help/root"> | |
1863 | root |
|
1863 | root | |
1864 | </a> |
|
1864 | </a> | |
1865 | </td><td> |
|
1865 | </td><td> | |
1866 | print the root (top) of the current working directory |
|
1866 | print the root (top) of the current working directory | |
1867 | </td></tr> |
|
1867 | </td></tr> | |
1868 | <tr><td> |
|
1868 | <tr><td> | |
1869 | <a href="/help/tag"> |
|
1869 | <a href="/help/tag"> | |
1870 | tag |
|
1870 | tag | |
1871 | </a> |
|
1871 | </a> | |
1872 | </td><td> |
|
1872 | </td><td> | |
1873 | add one or more tags for the current or given revision |
|
1873 | add one or more tags for the current or given revision | |
1874 | </td></tr> |
|
1874 | </td></tr> | |
1875 | <tr><td> |
|
1875 | <tr><td> | |
1876 | <a href="/help/tags"> |
|
1876 | <a href="/help/tags"> | |
1877 | tags |
|
1877 | tags | |
1878 | </a> |
|
1878 | </a> | |
1879 | </td><td> |
|
1879 | </td><td> | |
1880 | list repository tags |
|
1880 | list repository tags | |
1881 | </td></tr> |
|
1881 | </td></tr> | |
1882 | <tr><td> |
|
1882 | <tr><td> | |
1883 | <a href="/help/unbundle"> |
|
1883 | <a href="/help/unbundle"> | |
1884 | unbundle |
|
1884 | unbundle | |
1885 | </a> |
|
1885 | </a> | |
1886 | </td><td> |
|
1886 | </td><td> | |
1887 | apply one or more changegroup files |
|
1887 | apply one or more changegroup files | |
1888 | </td></tr> |
|
1888 | </td></tr> | |
1889 | <tr><td> |
|
1889 | <tr><td> | |
1890 | <a href="/help/verify"> |
|
1890 | <a href="/help/verify"> | |
1891 | verify |
|
1891 | verify | |
1892 | </a> |
|
1892 | </a> | |
1893 | </td><td> |
|
1893 | </td><td> | |
1894 | verify the integrity of the repository |
|
1894 | verify the integrity of the repository | |
1895 | </td></tr> |
|
1895 | </td></tr> | |
1896 | <tr><td> |
|
1896 | <tr><td> | |
1897 | <a href="/help/version"> |
|
1897 | <a href="/help/version"> | |
1898 | version |
|
1898 | version | |
1899 | </a> |
|
1899 | </a> | |
1900 | </td><td> |
|
1900 | </td><td> | |
1901 | output version and copyright information |
|
1901 | output version and copyright information | |
1902 | </td></tr> |
|
1902 | </td></tr> | |
1903 | </table> |
|
1903 | </table> | |
1904 | </div> |
|
1904 | </div> | |
1905 | </div> |
|
1905 | </div> | |
1906 |
|
1906 | |||
1907 | <script type="text/javascript">process_dates()</script> |
|
1907 | <script type="text/javascript">process_dates()</script> | |
1908 |
|
1908 | |||
1909 |
|
1909 | |||
1910 | </body> |
|
1910 | </body> | |
1911 | </html> |
|
1911 | </html> | |
1912 |
|
1912 | |||
1913 |
|
1913 | |||
1914 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/add" |
|
1914 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/add" | |
1915 | 200 Script output follows |
|
1915 | 200 Script output follows | |
1916 |
|
1916 | |||
1917 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1917 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1918 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1918 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1919 | <head> |
|
1919 | <head> | |
1920 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1920 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1921 | <meta name="robots" content="index, nofollow" /> |
|
1921 | <meta name="robots" content="index, nofollow" /> | |
1922 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1922 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1923 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1923 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1924 |
|
1924 | |||
1925 | <title>Help: add</title> |
|
1925 | <title>Help: add</title> | |
1926 | </head> |
|
1926 | </head> | |
1927 | <body> |
|
1927 | <body> | |
1928 |
|
1928 | |||
1929 | <div class="container"> |
|
1929 | <div class="container"> | |
1930 | <div class="menu"> |
|
1930 | <div class="menu"> | |
1931 | <div class="logo"> |
|
1931 | <div class="logo"> | |
1932 | <a href="http://mercurial.selenic.com/"> |
|
1932 | <a href="http://mercurial.selenic.com/"> | |
1933 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1933 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1934 | </div> |
|
1934 | </div> | |
1935 | <ul> |
|
1935 | <ul> | |
1936 | <li><a href="/shortlog">log</a></li> |
|
1936 | <li><a href="/shortlog">log</a></li> | |
1937 | <li><a href="/graph">graph</a></li> |
|
1937 | <li><a href="/graph">graph</a></li> | |
1938 | <li><a href="/tags">tags</a></li> |
|
1938 | <li><a href="/tags">tags</a></li> | |
1939 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1939 | <li><a href="/bookmarks">bookmarks</a></li> | |
1940 | <li><a href="/branches">branches</a></li> |
|
1940 | <li><a href="/branches">branches</a></li> | |
1941 | </ul> |
|
1941 | </ul> | |
1942 | <ul> |
|
1942 | <ul> | |
1943 | <li class="active"><a href="/help">help</a></li> |
|
1943 | <li class="active"><a href="/help">help</a></li> | |
1944 | </ul> |
|
1944 | </ul> | |
1945 | </div> |
|
1945 | </div> | |
1946 |
|
1946 | |||
1947 | <div class="main"> |
|
1947 | <div class="main"> | |
1948 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1948 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
1949 | <h3>Help: add</h3> |
|
1949 | <h3>Help: add</h3> | |
1950 |
|
1950 | |||
1951 | <form class="search" action="/log"> |
|
1951 | <form class="search" action="/log"> | |
1952 |
|
1952 | |||
1953 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
1953 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
1954 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1954 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
1955 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1955 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
1956 | </form> |
|
1956 | </form> | |
1957 | <div id="doc"> |
|
1957 | <div id="doc"> | |
1958 | <p> |
|
1958 | <p> | |
1959 | hg add [OPTION]... [FILE]... |
|
1959 | hg add [OPTION]... [FILE]... | |
1960 | </p> |
|
1960 | </p> | |
1961 | <p> |
|
1961 | <p> | |
1962 | add the specified files on the next commit |
|
1962 | add the specified files on the next commit | |
1963 | </p> |
|
1963 | </p> | |
1964 | <p> |
|
1964 | <p> | |
1965 | Schedule files to be version controlled and added to the |
|
1965 | Schedule files to be version controlled and added to the | |
1966 | repository. |
|
1966 | repository. | |
1967 | </p> |
|
1967 | </p> | |
1968 | <p> |
|
1968 | <p> | |
1969 | The files will be added to the repository at the next commit. To |
|
1969 | The files will be added to the repository at the next commit. To | |
1970 | undo an add before that, see "hg forget". |
|
1970 | undo an add before that, see "hg forget". | |
1971 | </p> |
|
1971 | </p> | |
1972 | <p> |
|
1972 | <p> | |
1973 | If no names are given, add all files to the repository. |
|
1973 | If no names are given, add all files to the repository. | |
1974 | </p> |
|
1974 | </p> | |
1975 | <p> |
|
1975 | <p> | |
1976 | An example showing how new (unknown) files are added |
|
1976 | An example showing how new (unknown) files are added | |
1977 | automatically by "hg add": |
|
1977 | automatically by "hg add": | |
1978 | </p> |
|
1978 | </p> | |
1979 | <pre> |
|
1979 | <pre> | |
1980 | \$ ls (re) |
|
1980 | \$ ls (re) | |
1981 | foo.c |
|
1981 | foo.c | |
1982 | \$ hg status (re) |
|
1982 | \$ hg status (re) | |
1983 | ? foo.c |
|
1983 | ? foo.c | |
1984 | \$ hg add (re) |
|
1984 | \$ hg add (re) | |
1985 | adding foo.c |
|
1985 | adding foo.c | |
1986 | \$ hg status (re) |
|
1986 | \$ hg status (re) | |
1987 | A foo.c |
|
1987 | A foo.c | |
1988 | </pre> |
|
1988 | </pre> | |
1989 | <p> |
|
1989 | <p> | |
1990 | Returns 0 if all files are successfully added. |
|
1990 | Returns 0 if all files are successfully added. | |
1991 | </p> |
|
1991 | </p> | |
1992 | <p> |
|
1992 | <p> | |
1993 | options ([+] can be repeated): |
|
1993 | options ([+] can be repeated): | |
1994 | </p> |
|
1994 | </p> | |
1995 | <table> |
|
1995 | <table> | |
1996 | <tr><td>-I</td> |
|
1996 | <tr><td>-I</td> | |
1997 | <td>--include PATTERN [+]</td> |
|
1997 | <td>--include PATTERN [+]</td> | |
1998 | <td>include names matching the given patterns</td></tr> |
|
1998 | <td>include names matching the given patterns</td></tr> | |
1999 | <tr><td>-X</td> |
|
1999 | <tr><td>-X</td> | |
2000 | <td>--exclude PATTERN [+]</td> |
|
2000 | <td>--exclude PATTERN [+]</td> | |
2001 | <td>exclude names matching the given patterns</td></tr> |
|
2001 | <td>exclude names matching the given patterns</td></tr> | |
2002 | <tr><td>-S</td> |
|
2002 | <tr><td>-S</td> | |
2003 | <td>--subrepos</td> |
|
2003 | <td>--subrepos</td> | |
2004 | <td>recurse into subrepositories</td></tr> |
|
2004 | <td>recurse into subrepositories</td></tr> | |
2005 | <tr><td>-n</td> |
|
2005 | <tr><td>-n</td> | |
2006 | <td>--dry-run</td> |
|
2006 | <td>--dry-run</td> | |
2007 | <td>do not perform actions, just print output</td></tr> |
|
2007 | <td>do not perform actions, just print output</td></tr> | |
2008 | </table> |
|
2008 | </table> | |
2009 | <p> |
|
2009 | <p> | |
2010 | global options ([+] can be repeated): |
|
2010 | global options ([+] can be repeated): | |
2011 | </p> |
|
2011 | </p> | |
2012 | <table> |
|
2012 | <table> | |
2013 | <tr><td>-R</td> |
|
2013 | <tr><td>-R</td> | |
2014 | <td>--repository REPO</td> |
|
2014 | <td>--repository REPO</td> | |
2015 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2015 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2016 | <tr><td></td> |
|
2016 | <tr><td></td> | |
2017 | <td>--cwd DIR</td> |
|
2017 | <td>--cwd DIR</td> | |
2018 | <td>change working directory</td></tr> |
|
2018 | <td>change working directory</td></tr> | |
2019 | <tr><td>-y</td> |
|
2019 | <tr><td>-y</td> | |
2020 | <td>--noninteractive</td> |
|
2020 | <td>--noninteractive</td> | |
2021 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2021 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2022 | <tr><td>-q</td> |
|
2022 | <tr><td>-q</td> | |
2023 | <td>--quiet</td> |
|
2023 | <td>--quiet</td> | |
2024 | <td>suppress output</td></tr> |
|
2024 | <td>suppress output</td></tr> | |
2025 | <tr><td>-v</td> |
|
2025 | <tr><td>-v</td> | |
2026 | <td>--verbose</td> |
|
2026 | <td>--verbose</td> | |
2027 | <td>enable additional output</td></tr> |
|
2027 | <td>enable additional output</td></tr> | |
2028 | <tr><td></td> |
|
2028 | <tr><td></td> | |
2029 | <td>--config CONFIG [+]</td> |
|
2029 | <td>--config CONFIG [+]</td> | |
2030 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2030 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2031 | <tr><td></td> |
|
2031 | <tr><td></td> | |
2032 | <td>--debug</td> |
|
2032 | <td>--debug</td> | |
2033 | <td>enable debugging output</td></tr> |
|
2033 | <td>enable debugging output</td></tr> | |
2034 | <tr><td></td> |
|
2034 | <tr><td></td> | |
2035 | <td>--debugger</td> |
|
2035 | <td>--debugger</td> | |
2036 | <td>start debugger</td></tr> |
|
2036 | <td>start debugger</td></tr> | |
2037 | <tr><td></td> |
|
2037 | <tr><td></td> | |
2038 | <td>--encoding ENCODE</td> |
|
2038 | <td>--encoding ENCODE</td> | |
2039 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2039 | <td>set the charset encoding (default: ascii)</td></tr> | |
2040 | <tr><td></td> |
|
2040 | <tr><td></td> | |
2041 | <td>--encodingmode MODE</td> |
|
2041 | <td>--encodingmode MODE</td> | |
2042 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2042 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2043 | <tr><td></td> |
|
2043 | <tr><td></td> | |
2044 | <td>--traceback</td> |
|
2044 | <td>--traceback</td> | |
2045 | <td>always print a traceback on exception</td></tr> |
|
2045 | <td>always print a traceback on exception</td></tr> | |
2046 | <tr><td></td> |
|
2046 | <tr><td></td> | |
2047 | <td>--time</td> |
|
2047 | <td>--time</td> | |
2048 | <td>time how long the command takes</td></tr> |
|
2048 | <td>time how long the command takes</td></tr> | |
2049 | <tr><td></td> |
|
2049 | <tr><td></td> | |
2050 | <td>--profile</td> |
|
2050 | <td>--profile</td> | |
2051 | <td>print command execution profile</td></tr> |
|
2051 | <td>print command execution profile</td></tr> | |
2052 | <tr><td></td> |
|
2052 | <tr><td></td> | |
2053 | <td>--version</td> |
|
2053 | <td>--version</td> | |
2054 | <td>output version information and exit</td></tr> |
|
2054 | <td>output version information and exit</td></tr> | |
2055 | <tr><td>-h</td> |
|
2055 | <tr><td>-h</td> | |
2056 | <td>--help</td> |
|
2056 | <td>--help</td> | |
2057 | <td>display help and exit</td></tr> |
|
2057 | <td>display help and exit</td></tr> | |
2058 | <tr><td></td> |
|
2058 | <tr><td></td> | |
2059 | <td>--hidden</td> |
|
2059 | <td>--hidden</td> | |
2060 | <td>consider hidden changesets</td></tr> |
|
2060 | <td>consider hidden changesets</td></tr> | |
2061 | </table> |
|
2061 | </table> | |
2062 |
|
2062 | |||
2063 | </div> |
|
2063 | </div> | |
2064 | </div> |
|
2064 | </div> | |
2065 | </div> |
|
2065 | </div> | |
2066 |
|
2066 | |||
2067 | <script type="text/javascript">process_dates()</script> |
|
2067 | <script type="text/javascript">process_dates()</script> | |
2068 |
|
2068 | |||
2069 |
|
2069 | |||
2070 | </body> |
|
2070 | </body> | |
2071 | </html> |
|
2071 | </html> | |
2072 |
|
2072 | |||
2073 |
|
2073 | |||
2074 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove" |
|
2074 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove" | |
2075 | 200 Script output follows |
|
2075 | 200 Script output follows | |
2076 |
|
2076 | |||
2077 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2077 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2078 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2078 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2079 | <head> |
|
2079 | <head> | |
2080 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2080 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2081 | <meta name="robots" content="index, nofollow" /> |
|
2081 | <meta name="robots" content="index, nofollow" /> | |
2082 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2082 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2083 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2083 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2084 |
|
2084 | |||
2085 | <title>Help: remove</title> |
|
2085 | <title>Help: remove</title> | |
2086 | </head> |
|
2086 | </head> | |
2087 | <body> |
|
2087 | <body> | |
2088 |
|
2088 | |||
2089 | <div class="container"> |
|
2089 | <div class="container"> | |
2090 | <div class="menu"> |
|
2090 | <div class="menu"> | |
2091 | <div class="logo"> |
|
2091 | <div class="logo"> | |
2092 | <a href="http://mercurial.selenic.com/"> |
|
2092 | <a href="http://mercurial.selenic.com/"> | |
2093 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2093 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2094 | </div> |
|
2094 | </div> | |
2095 | <ul> |
|
2095 | <ul> | |
2096 | <li><a href="/shortlog">log</a></li> |
|
2096 | <li><a href="/shortlog">log</a></li> | |
2097 | <li><a href="/graph">graph</a></li> |
|
2097 | <li><a href="/graph">graph</a></li> | |
2098 | <li><a href="/tags">tags</a></li> |
|
2098 | <li><a href="/tags">tags</a></li> | |
2099 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2099 | <li><a href="/bookmarks">bookmarks</a></li> | |
2100 | <li><a href="/branches">branches</a></li> |
|
2100 | <li><a href="/branches">branches</a></li> | |
2101 | </ul> |
|
2101 | </ul> | |
2102 | <ul> |
|
2102 | <ul> | |
2103 | <li class="active"><a href="/help">help</a></li> |
|
2103 | <li class="active"><a href="/help">help</a></li> | |
2104 | </ul> |
|
2104 | </ul> | |
2105 | </div> |
|
2105 | </div> | |
2106 |
|
2106 | |||
2107 | <div class="main"> |
|
2107 | <div class="main"> | |
2108 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2108 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2109 | <h3>Help: remove</h3> |
|
2109 | <h3>Help: remove</h3> | |
2110 |
|
2110 | |||
2111 | <form class="search" action="/log"> |
|
2111 | <form class="search" action="/log"> | |
2112 |
|
2112 | |||
2113 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2113 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
2114 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2114 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2115 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2115 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2116 | </form> |
|
2116 | </form> | |
2117 | <div id="doc"> |
|
2117 | <div id="doc"> | |
2118 | <p> |
|
2118 | <p> | |
2119 | hg remove [OPTION]... FILE... |
|
2119 | hg remove [OPTION]... FILE... | |
2120 | </p> |
|
2120 | </p> | |
2121 | <p> |
|
2121 | <p> | |
2122 | aliases: rm |
|
2122 | aliases: rm | |
2123 | </p> |
|
2123 | </p> | |
2124 | <p> |
|
2124 | <p> | |
2125 | remove the specified files on the next commit |
|
2125 | remove the specified files on the next commit | |
2126 | </p> |
|
2126 | </p> | |
2127 | <p> |
|
2127 | <p> | |
2128 | Schedule the indicated files for removal from the current branch. |
|
2128 | Schedule the indicated files for removal from the current branch. | |
2129 | </p> |
|
2129 | </p> | |
2130 | <p> |
|
2130 | <p> | |
2131 | This command schedules the files to be removed at the next commit. |
|
2131 | This command schedules the files to be removed at the next commit. | |
2132 | To undo a remove before that, see "hg revert". To undo added |
|
2132 | To undo a remove before that, see "hg revert". To undo added | |
2133 | files, see "hg forget". |
|
2133 | files, see "hg forget". | |
2134 | </p> |
|
2134 | </p> | |
2135 | <p> |
|
2135 | <p> | |
2136 | -A/--after can be used to remove only files that have already |
|
2136 | -A/--after can be used to remove only files that have already | |
2137 | been deleted, -f/--force can be used to force deletion, and -Af |
|
2137 | been deleted, -f/--force can be used to force deletion, and -Af | |
2138 | can be used to remove files from the next revision without |
|
2138 | can be used to remove files from the next revision without | |
2139 | deleting them from the working directory. |
|
2139 | deleting them from the working directory. | |
2140 | </p> |
|
2140 | </p> | |
2141 | <p> |
|
2141 | <p> | |
2142 | The following table details the behavior of remove for different |
|
2142 | The following table details the behavior of remove for different | |
2143 | file states (columns) and option combinations (rows). The file |
|
2143 | file states (columns) and option combinations (rows). The file | |
2144 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
2144 | states are Added [A], Clean [C], Modified [M] and Missing [!] | |
2145 | (as reported by "hg status"). The actions are Warn, Remove |
|
2145 | (as reported by "hg status"). The actions are Warn, Remove | |
2146 | (from branch) and Delete (from disk): |
|
2146 | (from branch) and Delete (from disk): | |
2147 | </p> |
|
2147 | </p> | |
2148 | <table> |
|
2148 | <table> | |
2149 | <tr><td>opt/state</td> |
|
2149 | <tr><td>opt/state</td> | |
2150 | <td>A</td> |
|
2150 | <td>A</td> | |
2151 | <td>C</td> |
|
2151 | <td>C</td> | |
2152 | <td>M</td> |
|
2152 | <td>M</td> | |
2153 | <td>!</td></tr> |
|
2153 | <td>!</td></tr> | |
2154 | <tr><td>none</td> |
|
2154 | <tr><td>none</td> | |
2155 | <td>W</td> |
|
2155 | <td>W</td> | |
2156 | <td>RD</td> |
|
2156 | <td>RD</td> | |
2157 | <td>W</td> |
|
2157 | <td>W</td> | |
2158 | <td>R</td></tr> |
|
2158 | <td>R</td></tr> | |
2159 | <tr><td>-f</td> |
|
2159 | <tr><td>-f</td> | |
2160 | <td>R</td> |
|
2160 | <td>R</td> | |
2161 | <td>RD</td> |
|
2161 | <td>RD</td> | |
2162 | <td>RD</td> |
|
2162 | <td>RD</td> | |
2163 | <td>R</td></tr> |
|
2163 | <td>R</td></tr> | |
2164 | <tr><td>-A</td> |
|
2164 | <tr><td>-A</td> | |
2165 | <td>W</td> |
|
2165 | <td>W</td> | |
2166 | <td>W</td> |
|
2166 | <td>W</td> | |
2167 | <td>W</td> |
|
2167 | <td>W</td> | |
2168 | <td>R</td></tr> |
|
2168 | <td>R</td></tr> | |
2169 | <tr><td>-Af</td> |
|
2169 | <tr><td>-Af</td> | |
2170 | <td>R</td> |
|
2170 | <td>R</td> | |
2171 | <td>R</td> |
|
2171 | <td>R</td> | |
2172 | <td>R</td> |
|
2172 | <td>R</td> | |
2173 | <td>R</td></tr> |
|
2173 | <td>R</td></tr> | |
2174 | </table> |
|
2174 | </table> | |
2175 | <p> |
|
2175 | <p> | |
2176 | Note that remove never deletes files in Added [A] state from the |
|
2176 | Note that remove never deletes files in Added [A] state from the | |
2177 | working directory, not even if option --force is specified. |
|
2177 | working directory, not even if option --force is specified. | |
2178 | </p> |
|
2178 | </p> | |
2179 | <p> |
|
2179 | <p> | |
2180 | Returns 0 on success, 1 if any warnings encountered. |
|
2180 | Returns 0 on success, 1 if any warnings encountered. | |
2181 | </p> |
|
2181 | </p> | |
2182 | <p> |
|
2182 | <p> | |
2183 | options ([+] can be repeated): |
|
2183 | options ([+] can be repeated): | |
2184 | </p> |
|
2184 | </p> | |
2185 | <table> |
|
2185 | <table> | |
2186 | <tr><td>-A</td> |
|
2186 | <tr><td>-A</td> | |
2187 | <td>--after</td> |
|
2187 | <td>--after</td> | |
2188 | <td>record delete for missing files</td></tr> |
|
2188 | <td>record delete for missing files</td></tr> | |
2189 | <tr><td>-f</td> |
|
2189 | <tr><td>-f</td> | |
2190 | <td>--force</td> |
|
2190 | <td>--force</td> | |
2191 | <td>remove (and delete) file even if added or modified</td></tr> |
|
2191 | <td>remove (and delete) file even if added or modified</td></tr> | |
2192 | <tr><td>-S</td> |
|
2192 | <tr><td>-S</td> | |
2193 | <td>--subrepos</td> |
|
2193 | <td>--subrepos</td> | |
2194 | <td>recurse into subrepositories</td></tr> |
|
2194 | <td>recurse into subrepositories</td></tr> | |
2195 | <tr><td>-I</td> |
|
2195 | <tr><td>-I</td> | |
2196 | <td>--include PATTERN [+]</td> |
|
2196 | <td>--include PATTERN [+]</td> | |
2197 | <td>include names matching the given patterns</td></tr> |
|
2197 | <td>include names matching the given patterns</td></tr> | |
2198 | <tr><td>-X</td> |
|
2198 | <tr><td>-X</td> | |
2199 | <td>--exclude PATTERN [+]</td> |
|
2199 | <td>--exclude PATTERN [+]</td> | |
2200 | <td>exclude names matching the given patterns</td></tr> |
|
2200 | <td>exclude names matching the given patterns</td></tr> | |
2201 | </table> |
|
2201 | </table> | |
2202 | <p> |
|
2202 | <p> | |
2203 | global options ([+] can be repeated): |
|
2203 | global options ([+] can be repeated): | |
2204 | </p> |
|
2204 | </p> | |
2205 | <table> |
|
2205 | <table> | |
2206 | <tr><td>-R</td> |
|
2206 | <tr><td>-R</td> | |
2207 | <td>--repository REPO</td> |
|
2207 | <td>--repository REPO</td> | |
2208 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2208 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2209 | <tr><td></td> |
|
2209 | <tr><td></td> | |
2210 | <td>--cwd DIR</td> |
|
2210 | <td>--cwd DIR</td> | |
2211 | <td>change working directory</td></tr> |
|
2211 | <td>change working directory</td></tr> | |
2212 | <tr><td>-y</td> |
|
2212 | <tr><td>-y</td> | |
2213 | <td>--noninteractive</td> |
|
2213 | <td>--noninteractive</td> | |
2214 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2214 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2215 | <tr><td>-q</td> |
|
2215 | <tr><td>-q</td> | |
2216 | <td>--quiet</td> |
|
2216 | <td>--quiet</td> | |
2217 | <td>suppress output</td></tr> |
|
2217 | <td>suppress output</td></tr> | |
2218 | <tr><td>-v</td> |
|
2218 | <tr><td>-v</td> | |
2219 | <td>--verbose</td> |
|
2219 | <td>--verbose</td> | |
2220 | <td>enable additional output</td></tr> |
|
2220 | <td>enable additional output</td></tr> | |
2221 | <tr><td></td> |
|
2221 | <tr><td></td> | |
2222 | <td>--config CONFIG [+]</td> |
|
2222 | <td>--config CONFIG [+]</td> | |
2223 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2223 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2224 | <tr><td></td> |
|
2224 | <tr><td></td> | |
2225 | <td>--debug</td> |
|
2225 | <td>--debug</td> | |
2226 | <td>enable debugging output</td></tr> |
|
2226 | <td>enable debugging output</td></tr> | |
2227 | <tr><td></td> |
|
2227 | <tr><td></td> | |
2228 | <td>--debugger</td> |
|
2228 | <td>--debugger</td> | |
2229 | <td>start debugger</td></tr> |
|
2229 | <td>start debugger</td></tr> | |
2230 | <tr><td></td> |
|
2230 | <tr><td></td> | |
2231 | <td>--encoding ENCODE</td> |
|
2231 | <td>--encoding ENCODE</td> | |
2232 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2232 | <td>set the charset encoding (default: ascii)</td></tr> | |
2233 | <tr><td></td> |
|
2233 | <tr><td></td> | |
2234 | <td>--encodingmode MODE</td> |
|
2234 | <td>--encodingmode MODE</td> | |
2235 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2235 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2236 | <tr><td></td> |
|
2236 | <tr><td></td> | |
2237 | <td>--traceback</td> |
|
2237 | <td>--traceback</td> | |
2238 | <td>always print a traceback on exception</td></tr> |
|
2238 | <td>always print a traceback on exception</td></tr> | |
2239 | <tr><td></td> |
|
2239 | <tr><td></td> | |
2240 | <td>--time</td> |
|
2240 | <td>--time</td> | |
2241 | <td>time how long the command takes</td></tr> |
|
2241 | <td>time how long the command takes</td></tr> | |
2242 | <tr><td></td> |
|
2242 | <tr><td></td> | |
2243 | <td>--profile</td> |
|
2243 | <td>--profile</td> | |
2244 | <td>print command execution profile</td></tr> |
|
2244 | <td>print command execution profile</td></tr> | |
2245 | <tr><td></td> |
|
2245 | <tr><td></td> | |
2246 | <td>--version</td> |
|
2246 | <td>--version</td> | |
2247 | <td>output version information and exit</td></tr> |
|
2247 | <td>output version information and exit</td></tr> | |
2248 | <tr><td>-h</td> |
|
2248 | <tr><td>-h</td> | |
2249 | <td>--help</td> |
|
2249 | <td>--help</td> | |
2250 | <td>display help and exit</td></tr> |
|
2250 | <td>display help and exit</td></tr> | |
2251 | <tr><td></td> |
|
2251 | <tr><td></td> | |
2252 | <td>--hidden</td> |
|
2252 | <td>--hidden</td> | |
2253 | <td>consider hidden changesets</td></tr> |
|
2253 | <td>consider hidden changesets</td></tr> | |
2254 | </table> |
|
2254 | </table> | |
2255 |
|
2255 | |||
2256 | </div> |
|
2256 | </div> | |
2257 | </div> |
|
2257 | </div> | |
2258 | </div> |
|
2258 | </div> | |
2259 |
|
2259 | |||
2260 | <script type="text/javascript">process_dates()</script> |
|
2260 | <script type="text/javascript">process_dates()</script> | |
2261 |
|
2261 | |||
2262 |
|
2262 | |||
2263 | </body> |
|
2263 | </body> | |
2264 | </html> |
|
2264 | </html> | |
2265 |
|
2265 | |||
2266 |
|
2266 | |||
2267 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions" |
|
2267 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions" | |
2268 | 200 Script output follows |
|
2268 | 200 Script output follows | |
2269 |
|
2269 | |||
2270 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2270 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2271 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2271 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2272 | <head> |
|
2272 | <head> | |
2273 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2273 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2274 | <meta name="robots" content="index, nofollow" /> |
|
2274 | <meta name="robots" content="index, nofollow" /> | |
2275 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2275 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2276 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2276 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2277 |
|
2277 | |||
2278 | <title>Help: revisions</title> |
|
2278 | <title>Help: revisions</title> | |
2279 | </head> |
|
2279 | </head> | |
2280 | <body> |
|
2280 | <body> | |
2281 |
|
2281 | |||
2282 | <div class="container"> |
|
2282 | <div class="container"> | |
2283 | <div class="menu"> |
|
2283 | <div class="menu"> | |
2284 | <div class="logo"> |
|
2284 | <div class="logo"> | |
2285 | <a href="http://mercurial.selenic.com/"> |
|
2285 | <a href="http://mercurial.selenic.com/"> | |
2286 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2286 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2287 | </div> |
|
2287 | </div> | |
2288 | <ul> |
|
2288 | <ul> | |
2289 | <li><a href="/shortlog">log</a></li> |
|
2289 | <li><a href="/shortlog">log</a></li> | |
2290 | <li><a href="/graph">graph</a></li> |
|
2290 | <li><a href="/graph">graph</a></li> | |
2291 | <li><a href="/tags">tags</a></li> |
|
2291 | <li><a href="/tags">tags</a></li> | |
2292 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2292 | <li><a href="/bookmarks">bookmarks</a></li> | |
2293 | <li><a href="/branches">branches</a></li> |
|
2293 | <li><a href="/branches">branches</a></li> | |
2294 | </ul> |
|
2294 | </ul> | |
2295 | <ul> |
|
2295 | <ul> | |
2296 | <li class="active"><a href="/help">help</a></li> |
|
2296 | <li class="active"><a href="/help">help</a></li> | |
2297 | </ul> |
|
2297 | </ul> | |
2298 | </div> |
|
2298 | </div> | |
2299 |
|
2299 | |||
2300 | <div class="main"> |
|
2300 | <div class="main"> | |
2301 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2301 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2302 | <h3>Help: revisions</h3> |
|
2302 | <h3>Help: revisions</h3> | |
2303 |
|
2303 | |||
2304 | <form class="search" action="/log"> |
|
2304 | <form class="search" action="/log"> | |
2305 |
|
2305 | |||
2306 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2306 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
2307 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2307 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2308 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2308 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2309 | </form> |
|
2309 | </form> | |
2310 | <div id="doc"> |
|
2310 | <div id="doc"> | |
2311 | <h1>Specifying Single Revisions</h1> |
|
2311 | <h1>Specifying Single Revisions</h1> | |
2312 | <p> |
|
2312 | <p> | |
2313 | Mercurial supports several ways to specify individual revisions. |
|
2313 | Mercurial supports several ways to specify individual revisions. | |
2314 | </p> |
|
2314 | </p> | |
2315 | <p> |
|
2315 | <p> | |
2316 | A plain integer is treated as a revision number. Negative integers are |
|
2316 | A plain integer is treated as a revision number. Negative integers are | |
2317 | treated as sequential offsets from the tip, with -1 denoting the tip, |
|
2317 | treated as sequential offsets from the tip, with -1 denoting the tip, | |
2318 | -2 denoting the revision prior to the tip, and so forth. |
|
2318 | -2 denoting the revision prior to the tip, and so forth. | |
2319 | </p> |
|
2319 | </p> | |
2320 | <p> |
|
2320 | <p> | |
2321 | A 40-digit hexadecimal string is treated as a unique revision |
|
2321 | A 40-digit hexadecimal string is treated as a unique revision | |
2322 | identifier. |
|
2322 | identifier. | |
2323 | </p> |
|
2323 | </p> | |
2324 | <p> |
|
2324 | <p> | |
2325 | A hexadecimal string less than 40 characters long is treated as a |
|
2325 | A hexadecimal string less than 40 characters long is treated as a | |
2326 | unique revision identifier and is referred to as a short-form |
|
2326 | unique revision identifier and is referred to as a short-form | |
2327 | identifier. A short-form identifier is only valid if it is the prefix |
|
2327 | identifier. A short-form identifier is only valid if it is the prefix | |
2328 | of exactly one full-length identifier. |
|
2328 | of exactly one full-length identifier. | |
2329 | </p> |
|
2329 | </p> | |
2330 | <p> |
|
2330 | <p> | |
2331 | Any other string is treated as a bookmark, tag, or branch name. A |
|
2331 | Any other string is treated as a bookmark, tag, or branch name. A | |
2332 | bookmark is a movable pointer to a revision. A tag is a permanent name |
|
2332 | bookmark is a movable pointer to a revision. A tag is a permanent name | |
2333 | associated with a revision. A branch name denotes the tipmost open branch head |
|
2333 | associated with a revision. A branch name denotes the tipmost open branch head | |
2334 | of that branch - or if they are all closed, the tipmost closed head of the |
|
2334 | of that branch - or if they are all closed, the tipmost closed head of the | |
2335 | branch. Bookmark, tag, and branch names must not contain the ":" character. |
|
2335 | branch. Bookmark, tag, and branch names must not contain the ":" character. | |
2336 | </p> |
|
2336 | </p> | |
2337 | <p> |
|
2337 | <p> | |
2338 | The reserved name "tip" always identifies the most recent revision. |
|
2338 | The reserved name "tip" always identifies the most recent revision. | |
2339 | </p> |
|
2339 | </p> | |
2340 | <p> |
|
2340 | <p> | |
2341 | The reserved name "null" indicates the null revision. This is the |
|
2341 | The reserved name "null" indicates the null revision. This is the | |
2342 | revision of an empty repository, and the parent of revision 0. |
|
2342 | revision of an empty repository, and the parent of revision 0. | |
2343 | </p> |
|
2343 | </p> | |
2344 | <p> |
|
2344 | <p> | |
2345 | The reserved name "." indicates the working directory parent. If no |
|
2345 | The reserved name "." indicates the working directory parent. If no | |
2346 | working directory is checked out, it is equivalent to null. If an |
|
2346 | working directory is checked out, it is equivalent to null. If an | |
2347 | uncommitted merge is in progress, "." is the revision of the first |
|
2347 | uncommitted merge is in progress, "." is the revision of the first | |
2348 | parent. |
|
2348 | parent. | |
2349 | </p> |
|
2349 | </p> | |
2350 |
|
2350 | |||
2351 | </div> |
|
2351 | </div> | |
2352 | </div> |
|
2352 | </div> | |
2353 | </div> |
|
2353 | </div> | |
2354 |
|
2354 | |||
2355 | <script type="text/javascript">process_dates()</script> |
|
2355 | <script type="text/javascript">process_dates()</script> | |
2356 |
|
2356 | |||
2357 |
|
2357 | |||
2358 | </body> |
|
2358 | </body> | |
2359 | </html> |
|
2359 | </html> | |
2360 |
|
2360 | |||
2361 |
|
2361 | |||
2362 | $ killdaemons.py |
|
2362 | $ killdaemons.py | |
2363 |
|
2363 | |||
2364 | #endif |
|
2364 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now