Show More
@@ -1,856 +1,847 | |||||
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 __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import itertools |
|
10 | import itertools | |
11 | import os |
|
11 | import os | |
12 | import textwrap |
|
12 | import textwrap | |
13 |
|
13 | |||
14 | from .i18n import ( |
|
14 | from .i18n import ( | |
15 | _, |
|
15 | _, | |
16 | gettext, |
|
16 | gettext, | |
17 | ) |
|
17 | ) | |
18 | from . import ( |
|
18 | from . import ( | |
19 | cmdutil, |
|
19 | cmdutil, | |
20 | encoding, |
|
20 | encoding, | |
21 | error, |
|
21 | error, | |
22 | extensions, |
|
22 | extensions, | |
23 | fancyopts, |
|
23 | fancyopts, | |
24 | filemerge, |
|
24 | filemerge, | |
25 | fileset, |
|
25 | fileset, | |
26 | minirst, |
|
26 | minirst, | |
27 | pycompat, |
|
27 | pycompat, | |
28 | registrar, |
|
28 | registrar, | |
29 | revset, |
|
29 | revset, | |
30 | templatefilters, |
|
30 | templatefilters, | |
31 | templatefuncs, |
|
31 | templatefuncs, | |
32 | templatekw, |
|
32 | templatekw, | |
33 | util, |
|
33 | util, | |
34 | ) |
|
34 | ) | |
35 | from .hgweb import ( |
|
35 | from .hgweb import ( | |
36 | webcommands, |
|
36 | webcommands, | |
37 | ) |
|
37 | ) | |
38 |
|
38 | |||
39 | _exclkeywords = { |
|
39 | _exclkeywords = { | |
40 | "(ADVANCED)", |
|
40 | "(ADVANCED)", | |
41 | "(DEPRECATED)", |
|
41 | "(DEPRECATED)", | |
42 | "(EXPERIMENTAL)", |
|
42 | "(EXPERIMENTAL)", | |
43 | # i18n: "(ADVANCED)" is a keyword, must be translated consistently |
|
43 | # i18n: "(ADVANCED)" is a keyword, must be translated consistently | |
44 | _("(ADVANCED)"), |
|
44 | _("(ADVANCED)"), | |
45 | # i18n: "(DEPRECATED)" is a keyword, must be translated consistently |
|
45 | # i18n: "(DEPRECATED)" is a keyword, must be translated consistently | |
46 | _("(DEPRECATED)"), |
|
46 | _("(DEPRECATED)"), | |
47 | # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently |
|
47 | # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently | |
48 | _("(EXPERIMENTAL)"), |
|
48 | _("(EXPERIMENTAL)"), | |
49 | } |
|
49 | } | |
50 |
|
50 | |||
51 | # The order in which command categories will be displayed. |
|
51 | # The order in which command categories will be displayed. | |
52 | # Extensions with custom categories should insert them into this list |
|
52 | # Extensions with custom categories should insert them into this list | |
53 | # after/before the appropriate item, rather than replacing the list or |
|
53 | # after/before the appropriate item, rather than replacing the list or | |
54 | # assuming absolute positions. |
|
54 | # assuming absolute positions. | |
55 | CATEGORY_ORDER = [ |
|
55 | CATEGORY_ORDER = [ | |
56 | registrar.command.CATEGORY_REPO_CREATION, |
|
56 | registrar.command.CATEGORY_REPO_CREATION, | |
57 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT, |
|
57 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT, | |
58 | registrar.command.CATEGORY_COMMITTING, |
|
58 | registrar.command.CATEGORY_COMMITTING, | |
59 | registrar.command.CATEGORY_CHANGE_MANAGEMENT, |
|
59 | registrar.command.CATEGORY_CHANGE_MANAGEMENT, | |
60 | registrar.command.CATEGORY_CHANGE_ORGANIZATION, |
|
60 | registrar.command.CATEGORY_CHANGE_ORGANIZATION, | |
61 | registrar.command.CATEGORY_FILE_CONTENTS, |
|
61 | registrar.command.CATEGORY_FILE_CONTENTS, | |
62 | registrar.command.CATEGORY_CHANGE_NAVIGATION , |
|
62 | registrar.command.CATEGORY_CHANGE_NAVIGATION , | |
63 | registrar.command.CATEGORY_WORKING_DIRECTORY, |
|
63 | registrar.command.CATEGORY_WORKING_DIRECTORY, | |
64 | registrar.command.CATEGORY_IMPORT_EXPORT, |
|
64 | registrar.command.CATEGORY_IMPORT_EXPORT, | |
65 | registrar.command.CATEGORY_MAINTENANCE, |
|
65 | registrar.command.CATEGORY_MAINTENANCE, | |
66 | registrar.command.CATEGORY_HELP, |
|
66 | registrar.command.CATEGORY_HELP, | |
67 | registrar.command.CATEGORY_MISC, |
|
67 | registrar.command.CATEGORY_MISC, | |
68 | registrar.command.CATEGORY_NONE, |
|
68 | registrar.command.CATEGORY_NONE, | |
69 | ] |
|
69 | ] | |
70 |
|
70 | |||
71 | # Human-readable category names. These are translated. |
|
71 | # Human-readable category names. These are translated. | |
72 | # Extensions with custom categories should add their names here. |
|
72 | # Extensions with custom categories should add their names here. | |
73 | CATEGORY_NAMES = { |
|
73 | CATEGORY_NAMES = { | |
74 | registrar.command.CATEGORY_REPO_CREATION: 'Repository creation', |
|
74 | registrar.command.CATEGORY_REPO_CREATION: 'Repository creation', | |
75 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: |
|
75 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: | |
76 | 'Remote repository management', |
|
76 | 'Remote repository management', | |
77 | registrar.command.CATEGORY_COMMITTING: 'Change creation', |
|
77 | registrar.command.CATEGORY_COMMITTING: 'Change creation', | |
78 | registrar.command.CATEGORY_CHANGE_NAVIGATION: 'Change navigation', |
|
78 | registrar.command.CATEGORY_CHANGE_NAVIGATION: 'Change navigation', | |
79 | registrar.command.CATEGORY_CHANGE_MANAGEMENT: 'Change manipulation', |
|
79 | registrar.command.CATEGORY_CHANGE_MANAGEMENT: 'Change manipulation', | |
80 | registrar.command.CATEGORY_CHANGE_ORGANIZATION: 'Change organization', |
|
80 | registrar.command.CATEGORY_CHANGE_ORGANIZATION: 'Change organization', | |
81 | registrar.command.CATEGORY_WORKING_DIRECTORY: |
|
81 | registrar.command.CATEGORY_WORKING_DIRECTORY: | |
82 | 'Working directory management', |
|
82 | 'Working directory management', | |
83 | registrar.command.CATEGORY_FILE_CONTENTS: 'File content management', |
|
83 | registrar.command.CATEGORY_FILE_CONTENTS: 'File content management', | |
84 | registrar.command.CATEGORY_IMPORT_EXPORT: 'Change import/export', |
|
84 | registrar.command.CATEGORY_IMPORT_EXPORT: 'Change import/export', | |
85 | registrar.command.CATEGORY_MAINTENANCE: 'Repository maintenance', |
|
85 | registrar.command.CATEGORY_MAINTENANCE: 'Repository maintenance', | |
86 | registrar.command.CATEGORY_HELP: 'Help', |
|
86 | registrar.command.CATEGORY_HELP: 'Help', | |
87 | registrar.command.CATEGORY_MISC: 'Miscellaneous commands', |
|
87 | registrar.command.CATEGORY_MISC: 'Miscellaneous commands', | |
88 | registrar.command.CATEGORY_NONE: 'Uncategorized commands', |
|
88 | registrar.command.CATEGORY_NONE: 'Uncategorized commands', | |
89 | } |
|
89 | } | |
90 |
|
90 | |||
91 | # Topic categories. |
|
91 | # Topic categories. | |
92 | TOPIC_CATEGORY_IDS = 'ids' |
|
92 | TOPIC_CATEGORY_IDS = 'ids' | |
93 | TOPIC_CATEGORY_OUTPUT = 'output' |
|
93 | TOPIC_CATEGORY_OUTPUT = 'output' | |
94 | TOPIC_CATEGORY_CONFIG = 'config' |
|
94 | TOPIC_CATEGORY_CONFIG = 'config' | |
95 | TOPIC_CATEGORY_CONCEPTS = 'concepts' |
|
95 | TOPIC_CATEGORY_CONCEPTS = 'concepts' | |
96 | TOPIC_CATEGORY_MISC = 'misc' |
|
96 | TOPIC_CATEGORY_MISC = 'misc' | |
97 | TOPIC_CATEGORY_NONE = 'none' |
|
97 | TOPIC_CATEGORY_NONE = 'none' | |
98 |
|
98 | |||
99 | # The order in which topic categories will be displayed. |
|
99 | # The order in which topic categories will be displayed. | |
100 | # Extensions with custom categories should insert them into this list |
|
100 | # Extensions with custom categories should insert them into this list | |
101 | # after/before the appropriate item, rather than replacing the list or |
|
101 | # after/before the appropriate item, rather than replacing the list or | |
102 | # assuming absolute positions. |
|
102 | # assuming absolute positions. | |
103 | TOPIC_CATEGORY_ORDER = [ |
|
103 | TOPIC_CATEGORY_ORDER = [ | |
104 | TOPIC_CATEGORY_IDS, |
|
104 | TOPIC_CATEGORY_IDS, | |
105 | TOPIC_CATEGORY_OUTPUT, |
|
105 | TOPIC_CATEGORY_OUTPUT, | |
106 | TOPIC_CATEGORY_CONFIG, |
|
106 | TOPIC_CATEGORY_CONFIG, | |
107 | TOPIC_CATEGORY_CONCEPTS, |
|
107 | TOPIC_CATEGORY_CONCEPTS, | |
108 | TOPIC_CATEGORY_MISC, |
|
108 | TOPIC_CATEGORY_MISC, | |
109 | TOPIC_CATEGORY_NONE, |
|
109 | TOPIC_CATEGORY_NONE, | |
110 | ] |
|
110 | ] | |
111 |
|
111 | |||
112 | # Human-readable topic category names. These are translated. |
|
112 | # Human-readable topic category names. These are translated. | |
113 | TOPIC_CATEGORY_NAMES = { |
|
113 | TOPIC_CATEGORY_NAMES = { | |
114 | TOPIC_CATEGORY_IDS: 'Mercurial identifiers', |
|
114 | TOPIC_CATEGORY_IDS: 'Mercurial identifiers', | |
115 | TOPIC_CATEGORY_OUTPUT: 'Mercurial output', |
|
115 | TOPIC_CATEGORY_OUTPUT: 'Mercurial output', | |
116 | TOPIC_CATEGORY_CONFIG: 'Mercurial configuration', |
|
116 | TOPIC_CATEGORY_CONFIG: 'Mercurial configuration', | |
117 | TOPIC_CATEGORY_CONCEPTS: 'Concepts', |
|
117 | TOPIC_CATEGORY_CONCEPTS: 'Concepts', | |
118 | TOPIC_CATEGORY_MISC: 'Miscellaneous', |
|
118 | TOPIC_CATEGORY_MISC: 'Miscellaneous', | |
119 | TOPIC_CATEGORY_NONE: 'Uncategorized topics', |
|
119 | TOPIC_CATEGORY_NONE: 'Uncategorized topics', | |
120 | TOPIC_CATEGORY_NONE: 'Uncategorized topics', |
|
120 | TOPIC_CATEGORY_NONE: 'Uncategorized topics', | |
121 | } |
|
121 | } | |
122 |
|
122 | |||
123 | def listexts(header, exts, indent=1, showdeprecated=False): |
|
123 | def listexts(header, exts, indent=1, showdeprecated=False): | |
124 | '''return a text listing of the given extensions''' |
|
124 | '''return a text listing of the given extensions''' | |
125 | rst = [] |
|
125 | rst = [] | |
126 | if exts: |
|
126 | if exts: | |
127 | for name, desc in sorted(exts.iteritems()): |
|
127 | for name, desc in sorted(exts.iteritems()): | |
128 | if not showdeprecated and any(w in desc for w in _exclkeywords): |
|
128 | if not showdeprecated and any(w in desc for w in _exclkeywords): | |
129 | continue |
|
129 | continue | |
130 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) |
|
130 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) | |
131 | if rst: |
|
131 | if rst: | |
132 | rst.insert(0, '\n%s\n\n' % header) |
|
132 | rst.insert(0, '\n%s\n\n' % header) | |
133 | return rst |
|
133 | return rst | |
134 |
|
134 | |||
135 | def extshelp(ui): |
|
135 | def extshelp(ui): | |
136 | rst = loaddoc('extensions')(ui).splitlines(True) |
|
136 | rst = loaddoc('extensions')(ui).splitlines(True) | |
137 | rst.extend(listexts( |
|
137 | rst.extend(listexts( | |
138 | _('enabled extensions:'), extensions.enabled(), showdeprecated=True)) |
|
138 | _('enabled extensions:'), extensions.enabled(), showdeprecated=True)) | |
139 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled(), |
|
139 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled(), | |
140 | showdeprecated=ui.verbose)) |
|
140 | showdeprecated=ui.verbose)) | |
141 | doc = ''.join(rst) |
|
141 | doc = ''.join(rst) | |
142 | return doc |
|
142 | return doc | |
143 |
|
143 | |||
144 | def optrst(header, options, verbose): |
|
144 | def optrst(header, options, verbose): | |
145 | data = [] |
|
145 | data = [] | |
146 | multioccur = False |
|
146 | multioccur = False | |
147 | for option in options: |
|
147 | for option in options: | |
148 | if len(option) == 5: |
|
148 | if len(option) == 5: | |
149 | shortopt, longopt, default, desc, optlabel = option |
|
149 | shortopt, longopt, default, desc, optlabel = option | |
150 | else: |
|
150 | else: | |
151 | shortopt, longopt, default, desc = option |
|
151 | shortopt, longopt, default, desc = option | |
152 | optlabel = _("VALUE") # default label |
|
152 | optlabel = _("VALUE") # default label | |
153 |
|
153 | |||
154 | if not verbose and any(w in desc for w in _exclkeywords): |
|
154 | if not verbose and any(w in desc for w in _exclkeywords): | |
155 | continue |
|
155 | continue | |
156 |
|
156 | |||
157 | so = '' |
|
157 | so = '' | |
158 | if shortopt: |
|
158 | if shortopt: | |
159 | so = '-' + shortopt |
|
159 | so = '-' + shortopt | |
160 | lo = '--' + longopt |
|
160 | lo = '--' + longopt | |
161 |
|
161 | |||
162 | if isinstance(default, fancyopts.customopt): |
|
162 | if isinstance(default, fancyopts.customopt): | |
163 | default = default.getdefaultvalue() |
|
163 | default = default.getdefaultvalue() | |
164 | if default and not callable(default): |
|
164 | if default and not callable(default): | |
165 | # default is of unknown type, and in Python 2 we abused |
|
165 | # default is of unknown type, and in Python 2 we abused | |
166 | # the %s-shows-repr property to handle integers etc. To |
|
166 | # the %s-shows-repr property to handle integers etc. To | |
167 | # match that behavior on Python 3, we do str(default) and |
|
167 | # match that behavior on Python 3, we do str(default) and | |
168 | # then convert it to bytes. |
|
168 | # then convert it to bytes. | |
169 | desc += _(" (default: %s)") % pycompat.bytestr(default) |
|
169 | desc += _(" (default: %s)") % pycompat.bytestr(default) | |
170 |
|
170 | |||
171 | if isinstance(default, list): |
|
171 | if isinstance(default, list): | |
172 | lo += " %s [+]" % optlabel |
|
172 | lo += " %s [+]" % optlabel | |
173 | multioccur = True |
|
173 | multioccur = True | |
174 | elif (default is not None) and not isinstance(default, bool): |
|
174 | elif (default is not None) and not isinstance(default, bool): | |
175 | lo += " %s" % optlabel |
|
175 | lo += " %s" % optlabel | |
176 |
|
176 | |||
177 | data.append((so, lo, desc)) |
|
177 | data.append((so, lo, desc)) | |
178 |
|
178 | |||
179 | if multioccur: |
|
179 | if multioccur: | |
180 | header += (_(" ([+] can be repeated)")) |
|
180 | header += (_(" ([+] can be repeated)")) | |
181 |
|
181 | |||
182 | rst = ['\n%s:\n\n' % header] |
|
182 | rst = ['\n%s:\n\n' % header] | |
183 | rst.extend(minirst.maketable(data, 1)) |
|
183 | rst.extend(minirst.maketable(data, 1)) | |
184 |
|
184 | |||
185 | return ''.join(rst) |
|
185 | return ''.join(rst) | |
186 |
|
186 | |||
187 | def indicateomitted(rst, omitted, notomitted=None): |
|
187 | def indicateomitted(rst, omitted, notomitted=None): | |
188 | rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) |
|
188 | rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) | |
189 | if notomitted: |
|
189 | if notomitted: | |
190 | rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) |
|
190 | rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) | |
191 |
|
191 | |||
192 | def filtercmd(ui, cmd, func, kw, doc): |
|
192 | def filtercmd(ui, cmd, func, kw, doc): | |
193 | if not ui.debugflag and cmd.startswith("debug") and kw != "debug": |
|
193 | if not ui.debugflag and cmd.startswith("debug") and kw != "debug": | |
194 | # Debug command, and user is not looking for those. |
|
194 | # Debug command, and user is not looking for those. | |
195 | return True |
|
195 | return True | |
196 | if not ui.verbose: |
|
196 | if not ui.verbose: | |
197 | if not kw and not doc: |
|
197 | if not kw and not doc: | |
198 | # Command had no documentation, no point in showing it by default. |
|
198 | # Command had no documentation, no point in showing it by default. | |
199 | return True |
|
199 | return True | |
200 | if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False): |
|
200 | if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False): | |
201 | # Alias didn't have its own documentation. |
|
201 | # Alias didn't have its own documentation. | |
202 | return True |
|
202 | return True | |
203 | if doc and any(w in doc for w in _exclkeywords): |
|
203 | if doc and any(w in doc for w in _exclkeywords): | |
204 | # Documentation has excluded keywords. |
|
204 | # Documentation has excluded keywords. | |
205 | return True |
|
205 | return True | |
206 | if kw == "shortlist" and not getattr(func, 'helpbasic', False): |
|
206 | if kw == "shortlist" and not getattr(func, 'helpbasic', False): | |
207 | # We're presenting the short list but the command is not basic. |
|
207 | # We're presenting the short list but the command is not basic. | |
208 | return True |
|
208 | return True | |
209 | if ui.configbool('help', 'hidden-command.%s' % cmd): |
|
209 | if ui.configbool('help', 'hidden-command.%s' % cmd): | |
210 | # Configuration explicitly hides the command. |
|
210 | # Configuration explicitly hides the command. | |
211 | return True |
|
211 | return True | |
212 | return False |
|
212 | return False | |
213 |
|
213 | |||
214 | def filtertopic(ui, topic): |
|
214 | def filtertopic(ui, topic): | |
215 | return ui.configbool('help', 'hidden-topic.%s' % topic, False) |
|
215 | return ui.configbool('help', 'hidden-topic.%s' % topic, False) | |
216 |
|
216 | |||
217 | def topicmatch(ui, commands, kw): |
|
217 | def topicmatch(ui, commands, kw): | |
218 | """Return help topics matching kw. |
|
218 | """Return help topics matching kw. | |
219 |
|
219 | |||
220 | Returns {'section': [(name, summary), ...], ...} where section is |
|
220 | Returns {'section': [(name, summary), ...], ...} where section is | |
221 | one of topics, commands, extensions, or extensioncommands. |
|
221 | one of topics, commands, extensions, or extensioncommands. | |
222 | """ |
|
222 | """ | |
223 | kw = encoding.lower(kw) |
|
223 | kw = encoding.lower(kw) | |
224 | def lowercontains(container): |
|
224 | def lowercontains(container): | |
225 | return kw in encoding.lower(container) # translated in helptable |
|
225 | return kw in encoding.lower(container) # translated in helptable | |
226 | results = {'topics': [], |
|
226 | results = {'topics': [], | |
227 | 'commands': [], |
|
227 | 'commands': [], | |
228 | 'extensions': [], |
|
228 | 'extensions': [], | |
229 | 'extensioncommands': [], |
|
229 | 'extensioncommands': [], | |
230 | } |
|
230 | } | |
231 | for topic in helptable: |
|
231 | for topic in helptable: | |
232 | names, header, doc = topic[0:3] |
|
232 | names, header, doc = topic[0:3] | |
233 | # Old extensions may use a str as doc. |
|
233 | # Old extensions may use a str as doc. | |
234 | if (sum(map(lowercontains, names)) |
|
234 | if (sum(map(lowercontains, names)) | |
235 | or lowercontains(header) |
|
235 | or lowercontains(header) | |
236 | or (callable(doc) and lowercontains(doc(ui)))): |
|
236 | or (callable(doc) and lowercontains(doc(ui)))): | |
237 | name = names[0] |
|
237 | name = names[0] | |
238 | if not filtertopic(ui, name): |
|
238 | if not filtertopic(ui, name): | |
239 | results['topics'].append((names[0], header)) |
|
239 | results['topics'].append((names[0], header)) | |
240 | for cmd, entry in commands.table.iteritems(): |
|
240 | for cmd, entry in commands.table.iteritems(): | |
241 | if len(entry) == 3: |
|
241 | if len(entry) == 3: | |
242 | summary = entry[2] |
|
242 | summary = entry[2] | |
243 | else: |
|
243 | else: | |
244 | summary = '' |
|
244 | summary = '' | |
245 | # translate docs *before* searching there |
|
245 | # translate docs *before* searching there | |
246 | func = entry[0] |
|
246 | func = entry[0] | |
247 | docs = _(pycompat.getdoc(func)) or '' |
|
247 | docs = _(pycompat.getdoc(func)) or '' | |
248 | if kw in cmd or lowercontains(summary) or lowercontains(docs): |
|
248 | if kw in cmd or lowercontains(summary) or lowercontains(docs): | |
249 | doclines = docs.splitlines() |
|
249 | doclines = docs.splitlines() | |
250 | if doclines: |
|
250 | if doclines: | |
251 | summary = doclines[0] |
|
251 | summary = doclines[0] | |
252 | cmdname = cmdutil.parsealiases(cmd)[0] |
|
252 | cmdname = cmdutil.parsealiases(cmd)[0] | |
253 | if filtercmd(ui, cmdname, func, kw, docs): |
|
253 | if filtercmd(ui, cmdname, func, kw, docs): | |
254 | continue |
|
254 | continue | |
255 | results['commands'].append((cmdname, summary)) |
|
255 | results['commands'].append((cmdname, summary)) | |
256 | for name, docs in itertools.chain( |
|
256 | for name, docs in itertools.chain( | |
257 | extensions.enabled(False).iteritems(), |
|
257 | extensions.enabled(False).iteritems(), | |
258 | extensions.disabled().iteritems()): |
|
258 | extensions.disabled().iteritems()): | |
259 | if not docs: |
|
259 | if not docs: | |
260 | continue |
|
260 | continue | |
261 | name = name.rpartition('.')[-1] |
|
261 | name = name.rpartition('.')[-1] | |
262 | if lowercontains(name) or lowercontains(docs): |
|
262 | if lowercontains(name) or lowercontains(docs): | |
263 | # extension docs are already translated |
|
263 | # extension docs are already translated | |
264 | results['extensions'].append((name, docs.splitlines()[0])) |
|
264 | results['extensions'].append((name, docs.splitlines()[0])) | |
265 | try: |
|
265 | try: | |
266 | mod = extensions.load(ui, name, '') |
|
266 | mod = extensions.load(ui, name, '') | |
267 | except ImportError: |
|
267 | except ImportError: | |
268 | # debug message would be printed in extensions.load() |
|
268 | # debug message would be printed in extensions.load() | |
269 | continue |
|
269 | continue | |
270 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): |
|
270 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): | |
271 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
|
271 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): | |
272 | cmdname = cmdutil.parsealiases(cmd)[0] |
|
272 | cmdname = cmdutil.parsealiases(cmd)[0] | |
273 | func = entry[0] |
|
273 | func = entry[0] | |
274 | cmddoc = pycompat.getdoc(func) |
|
274 | cmddoc = pycompat.getdoc(func) | |
275 | if cmddoc: |
|
275 | if cmddoc: | |
276 | cmddoc = gettext(cmddoc).splitlines()[0] |
|
276 | cmddoc = gettext(cmddoc).splitlines()[0] | |
277 | else: |
|
277 | else: | |
278 | cmddoc = _('(no help text available)') |
|
278 | cmddoc = _('(no help text available)') | |
279 | if filtercmd(ui, cmdname, func, kw, cmddoc): |
|
279 | if filtercmd(ui, cmdname, func, kw, cmddoc): | |
280 | continue |
|
280 | continue | |
281 | results['extensioncommands'].append((cmdname, cmddoc)) |
|
281 | results['extensioncommands'].append((cmdname, cmddoc)) | |
282 | return results |
|
282 | return results | |
283 |
|
283 | |||
284 | def loaddoc(topic, subdir=None): |
|
284 | def loaddoc(topic, subdir=None): | |
285 | """Return a delayed loader for help/topic.txt.""" |
|
285 | """Return a delayed loader for help/topic.txt.""" | |
286 |
|
286 | |||
287 | def loader(ui): |
|
287 | def loader(ui): | |
288 | docdir = os.path.join(util.datapath, 'help') |
|
288 | docdir = os.path.join(util.datapath, 'help') | |
289 | if subdir: |
|
289 | if subdir: | |
290 | docdir = os.path.join(docdir, subdir) |
|
290 | docdir = os.path.join(docdir, subdir) | |
291 | path = os.path.join(docdir, topic + ".txt") |
|
291 | path = os.path.join(docdir, topic + ".txt") | |
292 | doc = gettext(util.readfile(path)) |
|
292 | doc = gettext(util.readfile(path)) | |
293 | for rewriter in helphooks.get(topic, []): |
|
293 | for rewriter in helphooks.get(topic, []): | |
294 | doc = rewriter(ui, topic, doc) |
|
294 | doc = rewriter(ui, topic, doc) | |
295 | return doc |
|
295 | return doc | |
296 |
|
296 | |||
297 | return loader |
|
297 | return loader | |
298 |
|
298 | |||
299 | internalstable = sorted([ |
|
299 | internalstable = sorted([ | |
300 | (['bundle2'], _('Bundle2'), |
|
300 | (['bundle2'], _('Bundle2'), | |
301 | loaddoc('bundle2', subdir='internals')), |
|
301 | loaddoc('bundle2', subdir='internals')), | |
302 | (['bundles'], _('Bundles'), |
|
302 | (['bundles'], _('Bundles'), | |
303 | loaddoc('bundles', subdir='internals')), |
|
303 | loaddoc('bundles', subdir='internals')), | |
304 | (['cbor'], _('CBOR'), |
|
304 | (['cbor'], _('CBOR'), | |
305 | loaddoc('cbor', subdir='internals')), |
|
305 | loaddoc('cbor', subdir='internals')), | |
306 | (['censor'], _('Censor'), |
|
306 | (['censor'], _('Censor'), | |
307 | loaddoc('censor', subdir='internals')), |
|
307 | loaddoc('censor', subdir='internals')), | |
308 | (['changegroups'], _('Changegroups'), |
|
308 | (['changegroups'], _('Changegroups'), | |
309 | loaddoc('changegroups', subdir='internals')), |
|
309 | loaddoc('changegroups', subdir='internals')), | |
310 | (['config'], _('Config Registrar'), |
|
310 | (['config'], _('Config Registrar'), | |
311 | loaddoc('config', subdir='internals')), |
|
311 | loaddoc('config', subdir='internals')), | |
312 | (['requirements'], _('Repository Requirements'), |
|
312 | (['requirements'], _('Repository Requirements'), | |
313 | loaddoc('requirements', subdir='internals')), |
|
313 | loaddoc('requirements', subdir='internals')), | |
314 | (['revlogs'], _('Revision Logs'), |
|
314 | (['revlogs'], _('Revision Logs'), | |
315 | loaddoc('revlogs', subdir='internals')), |
|
315 | loaddoc('revlogs', subdir='internals')), | |
316 | (['wireprotocol'], _('Wire Protocol'), |
|
316 | (['wireprotocol'], _('Wire Protocol'), | |
317 | loaddoc('wireprotocol', subdir='internals')), |
|
317 | loaddoc('wireprotocol', subdir='internals')), | |
318 | (['wireprotocolrpc'], _('Wire Protocol RPC'), |
|
318 | (['wireprotocolrpc'], _('Wire Protocol RPC'), | |
319 | loaddoc('wireprotocolrpc', subdir='internals')), |
|
319 | loaddoc('wireprotocolrpc', subdir='internals')), | |
320 | (['wireprotocolv2'], _('Wire Protocol Version 2'), |
|
320 | (['wireprotocolv2'], _('Wire Protocol Version 2'), | |
321 | loaddoc('wireprotocolv2', subdir='internals')), |
|
321 | loaddoc('wireprotocolv2', subdir='internals')), | |
322 | ]) |
|
322 | ]) | |
323 |
|
323 | |||
324 | def internalshelp(ui): |
|
324 | def internalshelp(ui): | |
325 | """Generate the index for the "internals" topic.""" |
|
325 | """Generate the index for the "internals" topic.""" | |
326 | lines = ['To access a subtopic, use "hg help internals.{subtopic-name}"\n', |
|
326 | lines = ['To access a subtopic, use "hg help internals.{subtopic-name}"\n', | |
327 | '\n'] |
|
327 | '\n'] | |
328 | for names, header, doc in internalstable: |
|
328 | for names, header, doc in internalstable: | |
329 | lines.append(' :%s: %s\n' % (names[0], header)) |
|
329 | lines.append(' :%s: %s\n' % (names[0], header)) | |
330 |
|
330 | |||
331 | return ''.join(lines) |
|
331 | return ''.join(lines) | |
332 |
|
332 | |||
333 | helptable = sorted([ |
|
333 | helptable = sorted([ | |
334 | (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec'), |
|
334 | (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec'), | |
335 | TOPIC_CATEGORY_CONCEPTS), |
|
335 | TOPIC_CATEGORY_CONCEPTS), | |
336 | (['color'], _("Colorizing Outputs"), loaddoc('color'), |
|
336 | (['color'], _("Colorizing Outputs"), loaddoc('color'), | |
337 | TOPIC_CATEGORY_OUTPUT), |
|
337 | TOPIC_CATEGORY_OUTPUT), | |
338 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config'), |
|
338 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config'), | |
339 | TOPIC_CATEGORY_CONFIG), |
|
339 | TOPIC_CATEGORY_CONFIG), | |
340 | (['deprecated'], _("Deprecated Features"), loaddoc('deprecated'), |
|
340 | (['deprecated'], _("Deprecated Features"), loaddoc('deprecated'), | |
341 | TOPIC_CATEGORY_MISC), |
|
341 | TOPIC_CATEGORY_MISC), | |
342 | (["dates"], _("Date Formats"), loaddoc('dates'), TOPIC_CATEGORY_OUTPUT), |
|
342 | (["dates"], _("Date Formats"), loaddoc('dates'), TOPIC_CATEGORY_OUTPUT), | |
343 | (["flags"], _("Command-line flags"), loaddoc('flags'), |
|
343 | (["flags"], _("Command-line flags"), loaddoc('flags'), | |
344 | TOPIC_CATEGORY_CONFIG), |
|
344 | TOPIC_CATEGORY_CONFIG), | |
345 | (["patterns"], _("File Name Patterns"), loaddoc('patterns'), |
|
345 | (["patterns"], _("File Name Patterns"), loaddoc('patterns'), | |
346 | TOPIC_CATEGORY_IDS), |
|
346 | TOPIC_CATEGORY_IDS), | |
347 | (['environment', 'env'], _('Environment Variables'), |
|
347 | (['environment', 'env'], _('Environment Variables'), | |
348 | loaddoc('environment'), TOPIC_CATEGORY_CONFIG), |
|
348 | loaddoc('environment'), TOPIC_CATEGORY_CONFIG), | |
349 | (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'], |
|
349 | (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'], | |
350 | _('Specifying Revisions'), loaddoc('revisions'), TOPIC_CATEGORY_IDS), |
|
350 | _('Specifying Revisions'), loaddoc('revisions'), TOPIC_CATEGORY_IDS), | |
351 | (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets'), |
|
351 | (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets'), | |
352 | TOPIC_CATEGORY_IDS), |
|
352 | TOPIC_CATEGORY_IDS), | |
353 | (['diffs'], _('Diff Formats'), loaddoc('diffs'), TOPIC_CATEGORY_OUTPUT), |
|
353 | (['diffs'], _('Diff Formats'), loaddoc('diffs'), TOPIC_CATEGORY_OUTPUT), | |
354 | (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'), |
|
354 | (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'), | |
355 | loaddoc('merge-tools'), TOPIC_CATEGORY_CONFIG), |
|
355 | loaddoc('merge-tools'), TOPIC_CATEGORY_CONFIG), | |
356 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), |
|
356 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), | |
357 | loaddoc('templates'), TOPIC_CATEGORY_OUTPUT), |
|
357 | loaddoc('templates'), TOPIC_CATEGORY_OUTPUT), | |
358 | (['urls'], _('URL Paths'), loaddoc('urls'), TOPIC_CATEGORY_IDS), |
|
358 | (['urls'], _('URL Paths'), loaddoc('urls'), TOPIC_CATEGORY_IDS), | |
359 | (["extensions"], _("Using Additional Features"), extshelp, |
|
359 | (["extensions"], _("Using Additional Features"), extshelp, | |
360 | TOPIC_CATEGORY_CONFIG), |
|
360 | TOPIC_CATEGORY_CONFIG), | |
361 | (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos'), |
|
361 | (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos'), | |
362 | TOPIC_CATEGORY_CONCEPTS), |
|
362 | TOPIC_CATEGORY_CONCEPTS), | |
363 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb'), |
|
363 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb'), | |
364 | TOPIC_CATEGORY_CONFIG), |
|
364 | TOPIC_CATEGORY_CONFIG), | |
365 | (["glossary"], _("Glossary"), loaddoc('glossary'), TOPIC_CATEGORY_CONCEPTS), |
|
365 | (["glossary"], _("Glossary"), loaddoc('glossary'), TOPIC_CATEGORY_CONCEPTS), | |
366 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), |
|
366 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), | |
367 | loaddoc('hgignore'), TOPIC_CATEGORY_IDS), |
|
367 | loaddoc('hgignore'), TOPIC_CATEGORY_IDS), | |
368 | (["phases"], _("Working with Phases"), loaddoc('phases'), |
|
368 | (["phases"], _("Working with Phases"), loaddoc('phases'), | |
369 | TOPIC_CATEGORY_CONCEPTS), |
|
369 | TOPIC_CATEGORY_CONCEPTS), | |
370 | (['scripting'], _('Using Mercurial from scripts and automation'), |
|
370 | (['scripting'], _('Using Mercurial from scripts and automation'), | |
371 | loaddoc('scripting'), TOPIC_CATEGORY_MISC), |
|
371 | loaddoc('scripting'), TOPIC_CATEGORY_MISC), | |
372 | (['internals'], _("Technical implementation topics"), internalshelp, |
|
372 | (['internals'], _("Technical implementation topics"), internalshelp, | |
373 | TOPIC_CATEGORY_MISC), |
|
373 | TOPIC_CATEGORY_MISC), | |
374 | (['pager'], _("Pager Support"), loaddoc('pager'), TOPIC_CATEGORY_CONFIG), |
|
374 | (['pager'], _("Pager Support"), loaddoc('pager'), TOPIC_CATEGORY_CONFIG), | |
375 | ]) |
|
375 | ]) | |
376 |
|
376 | |||
377 | # Maps topics with sub-topics to a list of their sub-topics. |
|
377 | # Maps topics with sub-topics to a list of their sub-topics. | |
378 | subtopics = { |
|
378 | subtopics = { | |
379 | 'internals': internalstable, |
|
379 | 'internals': internalstable, | |
380 | } |
|
380 | } | |
381 |
|
381 | |||
382 | # Map topics to lists of callable taking the current topic help and |
|
382 | # Map topics to lists of callable taking the current topic help and | |
383 | # returning the updated version |
|
383 | # returning the updated version | |
384 | helphooks = {} |
|
384 | helphooks = {} | |
385 |
|
385 | |||
386 | def addtopichook(topic, rewriter): |
|
386 | def addtopichook(topic, rewriter): | |
387 | helphooks.setdefault(topic, []).append(rewriter) |
|
387 | helphooks.setdefault(topic, []).append(rewriter) | |
388 |
|
388 | |||
389 | def makeitemsdoc(ui, topic, doc, marker, items, dedent=False): |
|
389 | def makeitemsdoc(ui, topic, doc, marker, items, dedent=False): | |
390 | """Extract docstring from the items key to function mapping, build a |
|
390 | """Extract docstring from the items key to function mapping, build a | |
391 | single documentation block and use it to overwrite the marker in doc. |
|
391 | single documentation block and use it to overwrite the marker in doc. | |
392 | """ |
|
392 | """ | |
393 | entries = [] |
|
393 | entries = [] | |
394 | for name in sorted(items): |
|
394 | for name in sorted(items): | |
395 | text = (pycompat.getdoc(items[name]) or '').rstrip() |
|
395 | text = (pycompat.getdoc(items[name]) or '').rstrip() | |
396 | if (not text |
|
396 | if (not text | |
397 | or not ui.verbose and any(w in text for w in _exclkeywords)): |
|
397 | or not ui.verbose and any(w in text for w in _exclkeywords)): | |
398 | continue |
|
398 | continue | |
399 | text = gettext(text) |
|
399 | text = gettext(text) | |
400 | if dedent: |
|
400 | if dedent: | |
401 | # Abuse latin1 to use textwrap.dedent() on bytes. |
|
401 | # Abuse latin1 to use textwrap.dedent() on bytes. | |
402 | text = textwrap.dedent(text.decode('latin1')).encode('latin1') |
|
402 | text = textwrap.dedent(text.decode('latin1')).encode('latin1') | |
403 | lines = text.splitlines() |
|
403 | lines = text.splitlines() | |
404 | doclines = [(lines[0])] |
|
404 | doclines = [(lines[0])] | |
405 | for l in lines[1:]: |
|
405 | for l in lines[1:]: | |
406 | # Stop once we find some Python doctest |
|
406 | # Stop once we find some Python doctest | |
407 | if l.strip().startswith('>>>'): |
|
407 | if l.strip().startswith('>>>'): | |
408 | break |
|
408 | break | |
409 | if dedent: |
|
409 | if dedent: | |
410 | doclines.append(l.rstrip()) |
|
410 | doclines.append(l.rstrip()) | |
411 | else: |
|
411 | else: | |
412 | doclines.append(' ' + l.strip()) |
|
412 | doclines.append(' ' + l.strip()) | |
413 | entries.append('\n'.join(doclines)) |
|
413 | entries.append('\n'.join(doclines)) | |
414 | entries = '\n\n'.join(entries) |
|
414 | entries = '\n\n'.join(entries) | |
415 | return doc.replace(marker, entries) |
|
415 | return doc.replace(marker, entries) | |
416 |
|
416 | |||
417 | def addtopicsymbols(topic, marker, symbols, dedent=False): |
|
417 | def addtopicsymbols(topic, marker, symbols, dedent=False): | |
418 | def add(ui, topic, doc): |
|
418 | def add(ui, topic, doc): | |
419 | return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent) |
|
419 | return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent) | |
420 | addtopichook(topic, add) |
|
420 | addtopichook(topic, add) | |
421 |
|
421 | |||
422 | addtopicsymbols('bundlespec', '.. bundlecompressionmarker', |
|
422 | addtopicsymbols('bundlespec', '.. bundlecompressionmarker', | |
423 | util.bundlecompressiontopics()) |
|
423 | util.bundlecompressiontopics()) | |
424 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) |
|
424 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) | |
425 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', |
|
425 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', | |
426 | filemerge.internalsdoc) |
|
426 | filemerge.internalsdoc) | |
427 | addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols) |
|
427 | addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols) | |
428 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords) |
|
428 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords) | |
429 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) |
|
429 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) | |
430 | addtopicsymbols('templates', '.. functionsmarker', templatefuncs.funcs) |
|
430 | addtopicsymbols('templates', '.. functionsmarker', templatefuncs.funcs) | |
431 | addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, |
|
431 | addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, | |
432 | dedent=True) |
|
432 | dedent=True) | |
433 |
|
433 | |||
434 | def help_(ui, commands, name, unknowncmd=False, full=True, subtopic=None, |
|
434 | def help_(ui, commands, name, unknowncmd=False, full=True, subtopic=None, | |
435 | **opts): |
|
435 | **opts): | |
436 | ''' |
|
436 | ''' | |
437 | Generate the help for 'name' as unformatted restructured text. If |
|
437 | Generate the help for 'name' as unformatted restructured text. If | |
438 | 'name' is None, describe the commands available. |
|
438 | 'name' is None, describe the commands available. | |
439 | ''' |
|
439 | ''' | |
440 |
|
440 | |||
441 | opts = pycompat.byteskwargs(opts) |
|
441 | opts = pycompat.byteskwargs(opts) | |
442 |
|
442 | |||
443 | def helpcmd(name, subtopic=None): |
|
443 | def helpcmd(name, subtopic=None): | |
444 | try: |
|
444 | try: | |
445 | aliases, entry = cmdutil.findcmd(name, commands.table, |
|
445 | aliases, entry = cmdutil.findcmd(name, commands.table, | |
446 | strict=unknowncmd) |
|
446 | strict=unknowncmd) | |
447 | except error.AmbiguousCommand as inst: |
|
447 | except error.AmbiguousCommand as inst: | |
448 | # py3 fix: except vars can't be used outside the scope of the |
|
448 | # py3 fix: except vars can't be used outside the scope of the | |
449 | # except block, nor can be used inside a lambda. python issue4617 |
|
449 | # except block, nor can be used inside a lambda. python issue4617 | |
450 | prefix = inst.args[0] |
|
450 | prefix = inst.args[0] | |
451 | select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) |
|
451 | select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) | |
452 | rst = helplist(select) |
|
452 | rst = helplist(select) | |
453 | return rst |
|
453 | return rst | |
454 |
|
454 | |||
455 | rst = [] |
|
455 | rst = [] | |
456 |
|
456 | |||
457 | # check if it's an invalid alias and display its error if it is |
|
457 | # check if it's an invalid alias and display its error if it is | |
458 | if getattr(entry[0], 'badalias', None): |
|
458 | if getattr(entry[0], 'badalias', None): | |
459 | rst.append(entry[0].badalias + '\n') |
|
459 | rst.append(entry[0].badalias + '\n') | |
460 | if entry[0].unknowncmd: |
|
460 | if entry[0].unknowncmd: | |
461 | try: |
|
461 | try: | |
462 | rst.extend(helpextcmd(entry[0].cmdname)) |
|
462 | rst.extend(helpextcmd(entry[0].cmdname)) | |
463 | except error.UnknownCommand: |
|
463 | except error.UnknownCommand: | |
464 | pass |
|
464 | pass | |
465 | return rst |
|
465 | return rst | |
466 |
|
466 | |||
467 | # synopsis |
|
467 | # synopsis | |
468 | if len(entry) > 2: |
|
468 | if len(entry) > 2: | |
469 | if entry[2].startswith('hg'): |
|
469 | if entry[2].startswith('hg'): | |
470 | rst.append("%s\n" % entry[2]) |
|
470 | rst.append("%s\n" % entry[2]) | |
471 | else: |
|
471 | else: | |
472 | rst.append('hg %s %s\n' % (aliases[0], entry[2])) |
|
472 | rst.append('hg %s %s\n' % (aliases[0], entry[2])) | |
473 | else: |
|
473 | else: | |
474 | rst.append('hg %s\n' % aliases[0]) |
|
474 | rst.append('hg %s\n' % aliases[0]) | |
475 | # aliases |
|
475 | # aliases | |
476 | if full and not ui.quiet and len(aliases) > 1: |
|
476 | if full and not ui.quiet and len(aliases) > 1: | |
477 | rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:])) |
|
477 | rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:])) | |
478 | rst.append('\n') |
|
478 | rst.append('\n') | |
479 |
|
479 | |||
480 | # description |
|
480 | # description | |
481 | doc = gettext(pycompat.getdoc(entry[0])) |
|
481 | doc = gettext(pycompat.getdoc(entry[0])) | |
482 | if not doc: |
|
482 | if not doc: | |
483 | doc = _("(no help text available)") |
|
483 | doc = _("(no help text available)") | |
484 | if util.safehasattr(entry[0], 'definition'): # aliased command |
|
484 | if util.safehasattr(entry[0], 'definition'): # aliased command | |
485 | source = entry[0].source |
|
485 | source = entry[0].source | |
486 | if entry[0].definition.startswith('!'): # shell alias |
|
486 | if entry[0].definition.startswith('!'): # shell alias | |
487 | doc = (_('shell alias for: %s\n\n%s\n\ndefined by: %s\n') % |
|
487 | doc = (_('shell alias for: %s\n\n%s\n\ndefined by: %s\n') % | |
488 | (entry[0].definition[1:], doc, source)) |
|
488 | (entry[0].definition[1:], doc, source)) | |
489 | else: |
|
489 | else: | |
490 | doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') % |
|
490 | doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') % | |
491 | (entry[0].definition, doc, source)) |
|
491 | (entry[0].definition, doc, source)) | |
492 | doc = doc.splitlines(True) |
|
492 | doc = doc.splitlines(True) | |
493 | if ui.quiet or not full: |
|
493 | if ui.quiet or not full: | |
494 | rst.append(doc[0]) |
|
494 | rst.append(doc[0]) | |
495 | else: |
|
495 | else: | |
496 | rst.extend(doc) |
|
496 | rst.extend(doc) | |
497 | rst.append('\n') |
|
497 | rst.append('\n') | |
498 |
|
498 | |||
499 | # check if this command shadows a non-trivial (multi-line) |
|
499 | # check if this command shadows a non-trivial (multi-line) | |
500 | # extension help text |
|
500 | # extension help text | |
501 | try: |
|
501 | try: | |
502 | mod = extensions.find(name) |
|
502 | mod = extensions.find(name) | |
503 | doc = gettext(pycompat.getdoc(mod)) or '' |
|
503 | doc = gettext(pycompat.getdoc(mod)) or '' | |
504 | if '\n' in doc.strip(): |
|
504 | if '\n' in doc.strip(): | |
505 | msg = _("(use 'hg help -e %s' to show help for " |
|
505 | msg = _("(use 'hg help -e %s' to show help for " | |
506 | "the %s extension)") % (name, name) |
|
506 | "the %s extension)") % (name, name) | |
507 | rst.append('\n%s\n' % msg) |
|
507 | rst.append('\n%s\n' % msg) | |
508 | except KeyError: |
|
508 | except KeyError: | |
509 | pass |
|
509 | pass | |
510 |
|
510 | |||
511 | # options |
|
511 | # options | |
512 | if not ui.quiet and entry[1]: |
|
512 | if not ui.quiet and entry[1]: | |
513 | rst.append(optrst(_("options"), entry[1], ui.verbose)) |
|
513 | rst.append(optrst(_("options"), entry[1], ui.verbose)) | |
514 |
|
514 | |||
515 | if ui.verbose: |
|
515 | if ui.verbose: | |
516 | rst.append(optrst(_("global options"), |
|
516 | rst.append(optrst(_("global options"), | |
517 | commands.globalopts, ui.verbose)) |
|
517 | commands.globalopts, ui.verbose)) | |
518 |
|
518 | |||
519 | if not ui.verbose: |
|
519 | if not ui.verbose: | |
520 | if not full: |
|
520 | if not full: | |
521 | rst.append(_("\n(use 'hg %s -h' to show more help)\n") |
|
521 | rst.append(_("\n(use 'hg %s -h' to show more help)\n") | |
522 | % name) |
|
522 | % name) | |
523 | elif not ui.quiet: |
|
523 | elif not ui.quiet: | |
524 | rst.append(_('\n(some details hidden, use --verbose ' |
|
524 | rst.append(_('\n(some details hidden, use --verbose ' | |
525 | 'to show complete help)')) |
|
525 | 'to show complete help)')) | |
526 |
|
526 | |||
527 | return rst |
|
527 | return rst | |
528 |
|
528 | |||
529 | def helplist(select=None, **opts): |
|
529 | def helplist(select=None, **opts): | |
530 | # Category -> list of commands |
|
530 | # Category -> list of commands | |
531 | cats = {} |
|
531 | cats = {} | |
532 | # Command -> short description |
|
532 | # Command -> short description | |
533 | h = {} |
|
533 | h = {} | |
534 | # Command -> string showing synonyms |
|
534 | # Command -> string showing synonyms | |
535 | syns = {} |
|
535 | syns = {} | |
536 | for c, e in commands.table.iteritems(): |
|
536 | for c, e in commands.table.iteritems(): | |
537 | fs = cmdutil.parsealiases(c) |
|
537 | fs = cmdutil.parsealiases(c) | |
538 | f = fs[0] |
|
538 | f = fs[0] | |
539 | syns[f] = ', '.join(fs) |
|
539 | syns[f] = ', '.join(fs) | |
540 | func = e[0] |
|
540 | func = e[0] | |
541 | if select and not select(f): |
|
541 | if select and not select(f): | |
542 | continue |
|
542 | continue | |
543 | # Only list built-in commands (defined in commands.py) and aliases |
|
|||
544 | # (defined in dispatch.py), but not any other extensions. |
|
|||
545 | # We don't want a circular dependency between this file and |
|
|||
546 | # dispatch, so reference that by name. |
|
|||
547 | # TODO(rdamazio): Just show commands from all extensions. |
|
|||
548 | if (not select and name != 'shortlist' and |
|
|||
549 | func.__module__ != commands.__name__ and |
|
|||
550 | func.__module__ != 'mercurial.dispatch'): |
|
|||
551 | continue |
|
|||
552 | doc = pycompat.getdoc(func) |
|
543 | doc = pycompat.getdoc(func) | |
553 | if filtercmd(ui, f, func, name, doc): |
|
544 | if filtercmd(ui, f, func, name, doc): | |
554 | continue |
|
545 | continue | |
555 | doc = gettext(doc) |
|
546 | doc = gettext(doc) | |
556 | if not doc: |
|
547 | if not doc: | |
557 | doc = _("(no help text available)") |
|
548 | doc = _("(no help text available)") | |
558 | h[f] = doc.splitlines()[0].rstrip() |
|
549 | h[f] = doc.splitlines()[0].rstrip() | |
559 |
|
550 | |||
560 | cat = getattr(func, 'helpcategory', None) or ( |
|
551 | cat = getattr(func, 'helpcategory', None) or ( | |
561 | registrar.command.CATEGORY_NONE) |
|
552 | registrar.command.CATEGORY_NONE) | |
562 | cats.setdefault(cat, []).append(f) |
|
553 | cats.setdefault(cat, []).append(f) | |
563 |
|
554 | |||
564 | rst = [] |
|
555 | rst = [] | |
565 | if not h: |
|
556 | if not h: | |
566 | if not ui.quiet: |
|
557 | if not ui.quiet: | |
567 | rst.append(_('no commands defined\n')) |
|
558 | rst.append(_('no commands defined\n')) | |
568 | return rst |
|
559 | return rst | |
569 |
|
560 | |||
570 | # Output top header. |
|
561 | # Output top header. | |
571 | if not ui.quiet: |
|
562 | if not ui.quiet: | |
572 | if name == "shortlist": |
|
563 | if name == "shortlist": | |
573 | rst.append(_('basic commands:\n\n')) |
|
564 | rst.append(_('basic commands:\n\n')) | |
574 | elif name == "debug": |
|
565 | elif name == "debug": | |
575 | rst.append(_('debug commands (internal and unsupported):\n\n')) |
|
566 | rst.append(_('debug commands (internal and unsupported):\n\n')) | |
576 | else: |
|
567 | else: | |
577 | rst.append(_('list of commands:\n')) |
|
568 | rst.append(_('list of commands:\n')) | |
578 |
|
569 | |||
579 | def appendcmds(cmds): |
|
570 | def appendcmds(cmds): | |
580 | cmds = sorted(cmds) |
|
571 | cmds = sorted(cmds) | |
581 | for c in cmds: |
|
572 | for c in cmds: | |
582 | if ui.verbose: |
|
573 | if ui.verbose: | |
583 | rst.append(" :%s: %s\n" % (syns[c], h[c])) |
|
574 | rst.append(" :%s: %s\n" % (syns[c], h[c])) | |
584 | else: |
|
575 | else: | |
585 | rst.append(' :%s: %s\n' % (c, h[c])) |
|
576 | rst.append(' :%s: %s\n' % (c, h[c])) | |
586 |
|
577 | |||
587 | if name in ('shortlist', 'debug'): |
|
578 | if name in ('shortlist', 'debug'): | |
588 | # List without categories. |
|
579 | # List without categories. | |
589 | appendcmds(h) |
|
580 | appendcmds(h) | |
590 | else: |
|
581 | else: | |
591 | # Check that all categories have an order. |
|
582 | # Check that all categories have an order. | |
592 | missing_order = set(cats.keys()) - set(CATEGORY_ORDER) |
|
583 | missing_order = set(cats.keys()) - set(CATEGORY_ORDER) | |
593 | if missing_order: |
|
584 | if missing_order: | |
594 | ui.develwarn('help categories missing from CATEGORY_ORDER: %s' % |
|
585 | ui.develwarn('help categories missing from CATEGORY_ORDER: %s' % | |
595 | missing_order) |
|
586 | missing_order) | |
596 |
|
587 | |||
597 | # List per category. |
|
588 | # List per category. | |
598 | for cat in CATEGORY_ORDER: |
|
589 | for cat in CATEGORY_ORDER: | |
599 | catfns = cats.get(cat, []) |
|
590 | catfns = cats.get(cat, []) | |
600 | if catfns: |
|
591 | if catfns: | |
601 | if len(cats) > 1: |
|
592 | if len(cats) > 1: | |
602 | catname = gettext(CATEGORY_NAMES[cat]) |
|
593 | catname = gettext(CATEGORY_NAMES[cat]) | |
603 | rst.append("\n%s:\n" % catname) |
|
594 | rst.append("\n%s:\n" % catname) | |
604 | rst.append("\n") |
|
595 | rst.append("\n") | |
605 | appendcmds(catfns) |
|
596 | appendcmds(catfns) | |
606 |
|
597 | |||
607 | ex = opts.get |
|
598 | ex = opts.get | |
608 | anyopts = (ex(r'keyword') or not (ex(r'command') or ex(r'extension'))) |
|
599 | anyopts = (ex(r'keyword') or not (ex(r'command') or ex(r'extension'))) | |
609 | if not name and anyopts: |
|
600 | if not name and anyopts: | |
610 | exts = listexts(_('enabled extensions:'), extensions.enabled()) |
|
601 | exts = listexts(_('enabled extensions:'), extensions.enabled()) | |
611 | if exts: |
|
602 | if exts: | |
612 | rst.append('\n') |
|
603 | rst.append('\n') | |
613 | rst.extend(exts) |
|
604 | rst.extend(exts) | |
614 |
|
605 | |||
615 | rst.append(_("\nadditional help topics:\n")) |
|
606 | rst.append(_("\nadditional help topics:\n")) | |
616 | # Group commands by category. |
|
607 | # Group commands by category. | |
617 | topiccats = {} |
|
608 | topiccats = {} | |
618 | for topic in helptable: |
|
609 | for topic in helptable: | |
619 | names, header, doc = topic[0:3] |
|
610 | names, header, doc = topic[0:3] | |
620 | if len(topic) > 3 and topic[3]: |
|
611 | if len(topic) > 3 and topic[3]: | |
621 | category = topic[3] |
|
612 | category = topic[3] | |
622 | else: |
|
613 | else: | |
623 | category = TOPIC_CATEGORY_NONE |
|
614 | category = TOPIC_CATEGORY_NONE | |
624 |
|
615 | |||
625 | topicname = names[0] |
|
616 | topicname = names[0] | |
626 | if not filtertopic(ui, topicname): |
|
617 | if not filtertopic(ui, topicname): | |
627 | topiccats.setdefault(category, []).append( |
|
618 | topiccats.setdefault(category, []).append( | |
628 | (topicname, header)) |
|
619 | (topicname, header)) | |
629 |
|
620 | |||
630 | # Check that all categories have an order. |
|
621 | # Check that all categories have an order. | |
631 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) |
|
622 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) | |
632 | if missing_order: |
|
623 | if missing_order: | |
633 | ui.develwarn( |
|
624 | ui.develwarn( | |
634 | 'help categories missing from TOPIC_CATEGORY_ORDER: %s' % |
|
625 | 'help categories missing from TOPIC_CATEGORY_ORDER: %s' % | |
635 | missing_order) |
|
626 | missing_order) | |
636 |
|
627 | |||
637 | # Output topics per category. |
|
628 | # Output topics per category. | |
638 | for cat in TOPIC_CATEGORY_ORDER: |
|
629 | for cat in TOPIC_CATEGORY_ORDER: | |
639 | topics = topiccats.get(cat, []) |
|
630 | topics = topiccats.get(cat, []) | |
640 | if topics: |
|
631 | if topics: | |
641 | if len(topiccats) > 1: |
|
632 | if len(topiccats) > 1: | |
642 | catname = gettext(TOPIC_CATEGORY_NAMES[cat]) |
|
633 | catname = gettext(TOPIC_CATEGORY_NAMES[cat]) | |
643 | rst.append("\n%s:\n" % catname) |
|
634 | rst.append("\n%s:\n" % catname) | |
644 | rst.append("\n") |
|
635 | rst.append("\n") | |
645 | for t, desc in topics: |
|
636 | for t, desc in topics: | |
646 | rst.append(" :%s: %s\n" % (t, desc)) |
|
637 | rst.append(" :%s: %s\n" % (t, desc)) | |
647 |
|
638 | |||
648 | if ui.quiet: |
|
639 | if ui.quiet: | |
649 | pass |
|
640 | pass | |
650 | elif ui.verbose: |
|
641 | elif ui.verbose: | |
651 | rst.append('\n%s\n' % optrst(_("global options"), |
|
642 | rst.append('\n%s\n' % optrst(_("global options"), | |
652 | commands.globalopts, ui.verbose)) |
|
643 | commands.globalopts, ui.verbose)) | |
653 | if name == 'shortlist': |
|
644 | if name == 'shortlist': | |
654 | rst.append(_("\n(use 'hg help' for the full list " |
|
645 | rst.append(_("\n(use 'hg help' for the full list " | |
655 | "of commands)\n")) |
|
646 | "of commands)\n")) | |
656 | else: |
|
647 | else: | |
657 | if name == 'shortlist': |
|
648 | if name == 'shortlist': | |
658 | rst.append(_("\n(use 'hg help' for the full list of commands " |
|
649 | rst.append(_("\n(use 'hg help' for the full list of commands " | |
659 | "or 'hg -v' for details)\n")) |
|
650 | "or 'hg -v' for details)\n")) | |
660 | elif name and not full: |
|
651 | elif name and not full: | |
661 | rst.append(_("\n(use 'hg help %s' to show the full help " |
|
652 | rst.append(_("\n(use 'hg help %s' to show the full help " | |
662 | "text)\n") % name) |
|
653 | "text)\n") % name) | |
663 | elif name and syns and name in syns.keys(): |
|
654 | elif name and syns and name in syns.keys(): | |
664 | rst.append(_("\n(use 'hg help -v -e %s' to show built-in " |
|
655 | rst.append(_("\n(use 'hg help -v -e %s' to show built-in " | |
665 | "aliases and global options)\n") % name) |
|
656 | "aliases and global options)\n") % name) | |
666 | else: |
|
657 | else: | |
667 | rst.append(_("\n(use 'hg help -v%s' to show built-in aliases " |
|
658 | rst.append(_("\n(use 'hg help -v%s' to show built-in aliases " | |
668 | "and global options)\n") |
|
659 | "and global options)\n") | |
669 | % (name and " " + name or "")) |
|
660 | % (name and " " + name or "")) | |
670 | return rst |
|
661 | return rst | |
671 |
|
662 | |||
672 | def helptopic(name, subtopic=None): |
|
663 | def helptopic(name, subtopic=None): | |
673 | # Look for sub-topic entry first. |
|
664 | # Look for sub-topic entry first. | |
674 | header, doc = None, None |
|
665 | header, doc = None, None | |
675 | if subtopic and name in subtopics: |
|
666 | if subtopic and name in subtopics: | |
676 | for names, header, doc in subtopics[name]: |
|
667 | for names, header, doc in subtopics[name]: | |
677 | if subtopic in names: |
|
668 | if subtopic in names: | |
678 | break |
|
669 | break | |
679 |
|
670 | |||
680 | if not header: |
|
671 | if not header: | |
681 | for topic in helptable: |
|
672 | for topic in helptable: | |
682 | names, header, doc = topic[0:3] |
|
673 | names, header, doc = topic[0:3] | |
683 | if name in names: |
|
674 | if name in names: | |
684 | break |
|
675 | break | |
685 | else: |
|
676 | else: | |
686 | raise error.UnknownCommand(name) |
|
677 | raise error.UnknownCommand(name) | |
687 |
|
678 | |||
688 | rst = [minirst.section(header)] |
|
679 | rst = [minirst.section(header)] | |
689 |
|
680 | |||
690 | # description |
|
681 | # description | |
691 | if not doc: |
|
682 | if not doc: | |
692 | rst.append(" %s\n" % _("(no help text available)")) |
|
683 | rst.append(" %s\n" % _("(no help text available)")) | |
693 | if callable(doc): |
|
684 | if callable(doc): | |
694 | rst += [" %s\n" % l for l in doc(ui).splitlines()] |
|
685 | rst += [" %s\n" % l for l in doc(ui).splitlines()] | |
695 |
|
686 | |||
696 | if not ui.verbose: |
|
687 | if not ui.verbose: | |
697 | omitted = _('(some details hidden, use --verbose' |
|
688 | omitted = _('(some details hidden, use --verbose' | |
698 | ' to show complete help)') |
|
689 | ' to show complete help)') | |
699 | indicateomitted(rst, omitted) |
|
690 | indicateomitted(rst, omitted) | |
700 |
|
691 | |||
701 | try: |
|
692 | try: | |
702 | cmdutil.findcmd(name, commands.table) |
|
693 | cmdutil.findcmd(name, commands.table) | |
703 | rst.append(_("\nuse 'hg help -c %s' to see help for " |
|
694 | rst.append(_("\nuse 'hg help -c %s' to see help for " | |
704 | "the %s command\n") % (name, name)) |
|
695 | "the %s command\n") % (name, name)) | |
705 | except error.UnknownCommand: |
|
696 | except error.UnknownCommand: | |
706 | pass |
|
697 | pass | |
707 | return rst |
|
698 | return rst | |
708 |
|
699 | |||
709 | def helpext(name, subtopic=None): |
|
700 | def helpext(name, subtopic=None): | |
710 | try: |
|
701 | try: | |
711 | mod = extensions.find(name) |
|
702 | mod = extensions.find(name) | |
712 | doc = gettext(pycompat.getdoc(mod)) or _('no help text available') |
|
703 | doc = gettext(pycompat.getdoc(mod)) or _('no help text available') | |
713 | except KeyError: |
|
704 | except KeyError: | |
714 | mod = None |
|
705 | mod = None | |
715 | doc = extensions.disabledext(name) |
|
706 | doc = extensions.disabledext(name) | |
716 | if not doc: |
|
707 | if not doc: | |
717 | raise error.UnknownCommand(name) |
|
708 | raise error.UnknownCommand(name) | |
718 |
|
709 | |||
719 | if '\n' not in doc: |
|
710 | if '\n' not in doc: | |
720 | head, tail = doc, "" |
|
711 | head, tail = doc, "" | |
721 | else: |
|
712 | else: | |
722 | head, tail = doc.split('\n', 1) |
|
713 | head, tail = doc.split('\n', 1) | |
723 | rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)] |
|
714 | rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)] | |
724 | if tail: |
|
715 | if tail: | |
725 | rst.extend(tail.splitlines(True)) |
|
716 | rst.extend(tail.splitlines(True)) | |
726 | rst.append('\n') |
|
717 | rst.append('\n') | |
727 |
|
718 | |||
728 | if not ui.verbose: |
|
719 | if not ui.verbose: | |
729 | omitted = _('(some details hidden, use --verbose' |
|
720 | omitted = _('(some details hidden, use --verbose' | |
730 | ' to show complete help)') |
|
721 | ' to show complete help)') | |
731 | indicateomitted(rst, omitted) |
|
722 | indicateomitted(rst, omitted) | |
732 |
|
723 | |||
733 | if mod: |
|
724 | if mod: | |
734 | try: |
|
725 | try: | |
735 | ct = mod.cmdtable |
|
726 | ct = mod.cmdtable | |
736 | except AttributeError: |
|
727 | except AttributeError: | |
737 | ct = {} |
|
728 | ct = {} | |
738 | modcmds = set([c.partition('|')[0] for c in ct]) |
|
729 | modcmds = set([c.partition('|')[0] for c in ct]) | |
739 | rst.extend(helplist(modcmds.__contains__)) |
|
730 | rst.extend(helplist(modcmds.__contains__)) | |
740 | else: |
|
731 | else: | |
741 | rst.append(_("(use 'hg help extensions' for information on enabling" |
|
732 | rst.append(_("(use 'hg help extensions' for information on enabling" | |
742 | " extensions)\n")) |
|
733 | " extensions)\n")) | |
743 | return rst |
|
734 | return rst | |
744 |
|
735 | |||
745 | def helpextcmd(name, subtopic=None): |
|
736 | def helpextcmd(name, subtopic=None): | |
746 | cmd, ext, doc = extensions.disabledcmd(ui, name, |
|
737 | cmd, ext, doc = extensions.disabledcmd(ui, name, | |
747 | ui.configbool('ui', 'strict')) |
|
738 | ui.configbool('ui', 'strict')) | |
748 | doc = doc.splitlines()[0] |
|
739 | doc = doc.splitlines()[0] | |
749 |
|
740 | |||
750 | rst = listexts(_("'%s' is provided by the following " |
|
741 | rst = listexts(_("'%s' is provided by the following " | |
751 | "extension:") % cmd, {ext: doc}, indent=4, |
|
742 | "extension:") % cmd, {ext: doc}, indent=4, | |
752 | showdeprecated=True) |
|
743 | showdeprecated=True) | |
753 | rst.append('\n') |
|
744 | rst.append('\n') | |
754 | rst.append(_("(use 'hg help extensions' for information on enabling " |
|
745 | rst.append(_("(use 'hg help extensions' for information on enabling " | |
755 | "extensions)\n")) |
|
746 | "extensions)\n")) | |
756 | return rst |
|
747 | return rst | |
757 |
|
748 | |||
758 |
|
749 | |||
759 | rst = [] |
|
750 | rst = [] | |
760 | kw = opts.get('keyword') |
|
751 | kw = opts.get('keyword') | |
761 | if kw or name is None and any(opts[o] for o in opts): |
|
752 | if kw or name is None and any(opts[o] for o in opts): | |
762 | matches = topicmatch(ui, commands, name or '') |
|
753 | matches = topicmatch(ui, commands, name or '') | |
763 | helpareas = [] |
|
754 | helpareas = [] | |
764 | if opts.get('extension'): |
|
755 | if opts.get('extension'): | |
765 | helpareas += [('extensions', _('Extensions'))] |
|
756 | helpareas += [('extensions', _('Extensions'))] | |
766 | if opts.get('command'): |
|
757 | if opts.get('command'): | |
767 | helpareas += [('commands', _('Commands'))] |
|
758 | helpareas += [('commands', _('Commands'))] | |
768 | if not helpareas: |
|
759 | if not helpareas: | |
769 | helpareas = [('topics', _('Topics')), |
|
760 | helpareas = [('topics', _('Topics')), | |
770 | ('commands', _('Commands')), |
|
761 | ('commands', _('Commands')), | |
771 | ('extensions', _('Extensions')), |
|
762 | ('extensions', _('Extensions')), | |
772 | ('extensioncommands', _('Extension Commands'))] |
|
763 | ('extensioncommands', _('Extension Commands'))] | |
773 | for t, title in helpareas: |
|
764 | for t, title in helpareas: | |
774 | if matches[t]: |
|
765 | if matches[t]: | |
775 | rst.append('%s:\n\n' % title) |
|
766 | rst.append('%s:\n\n' % title) | |
776 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) |
|
767 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) | |
777 | rst.append('\n') |
|
768 | rst.append('\n') | |
778 | if not rst: |
|
769 | if not rst: | |
779 | msg = _('no matches') |
|
770 | msg = _('no matches') | |
780 | hint = _("try 'hg help' for a list of topics") |
|
771 | hint = _("try 'hg help' for a list of topics") | |
781 | raise error.Abort(msg, hint=hint) |
|
772 | raise error.Abort(msg, hint=hint) | |
782 | elif name and name != 'shortlist': |
|
773 | elif name and name != 'shortlist': | |
783 | queries = [] |
|
774 | queries = [] | |
784 | if unknowncmd: |
|
775 | if unknowncmd: | |
785 | queries += [helpextcmd] |
|
776 | queries += [helpextcmd] | |
786 | if opts.get('extension'): |
|
777 | if opts.get('extension'): | |
787 | queries += [helpext] |
|
778 | queries += [helpext] | |
788 | if opts.get('command'): |
|
779 | if opts.get('command'): | |
789 | queries += [helpcmd] |
|
780 | queries += [helpcmd] | |
790 | if not queries: |
|
781 | if not queries: | |
791 | queries = (helptopic, helpcmd, helpext, helpextcmd) |
|
782 | queries = (helptopic, helpcmd, helpext, helpextcmd) | |
792 | for f in queries: |
|
783 | for f in queries: | |
793 | try: |
|
784 | try: | |
794 | rst = f(name, subtopic) |
|
785 | rst = f(name, subtopic) | |
795 | break |
|
786 | break | |
796 | except error.UnknownCommand: |
|
787 | except error.UnknownCommand: | |
797 | pass |
|
788 | pass | |
798 | else: |
|
789 | else: | |
799 | if unknowncmd: |
|
790 | if unknowncmd: | |
800 | raise error.UnknownCommand(name) |
|
791 | raise error.UnknownCommand(name) | |
801 | else: |
|
792 | else: | |
802 | msg = _('no such help topic: %s') % name |
|
793 | msg = _('no such help topic: %s') % name | |
803 | hint = _("try 'hg help --keyword %s'") % name |
|
794 | hint = _("try 'hg help --keyword %s'") % name | |
804 | raise error.Abort(msg, hint=hint) |
|
795 | raise error.Abort(msg, hint=hint) | |
805 | else: |
|
796 | else: | |
806 | # program name |
|
797 | # program name | |
807 | if not ui.quiet: |
|
798 | if not ui.quiet: | |
808 | rst = [_("Mercurial Distributed SCM\n"), '\n'] |
|
799 | rst = [_("Mercurial Distributed SCM\n"), '\n'] | |
809 | rst.extend(helplist(None, **pycompat.strkwargs(opts))) |
|
800 | rst.extend(helplist(None, **pycompat.strkwargs(opts))) | |
810 |
|
801 | |||
811 | return ''.join(rst) |
|
802 | return ''.join(rst) | |
812 |
|
803 | |||
813 | def formattedhelp(ui, commands, fullname, keep=None, unknowncmd=False, |
|
804 | def formattedhelp(ui, commands, fullname, keep=None, unknowncmd=False, | |
814 | full=True, **opts): |
|
805 | full=True, **opts): | |
815 | """get help for a given topic (as a dotted name) as rendered rst |
|
806 | """get help for a given topic (as a dotted name) as rendered rst | |
816 |
|
807 | |||
817 | Either returns the rendered help text or raises an exception. |
|
808 | Either returns the rendered help text or raises an exception. | |
818 | """ |
|
809 | """ | |
819 | if keep is None: |
|
810 | if keep is None: | |
820 | keep = [] |
|
811 | keep = [] | |
821 | else: |
|
812 | else: | |
822 | keep = list(keep) # make a copy so we can mutate this later |
|
813 | keep = list(keep) # make a copy so we can mutate this later | |
823 |
|
814 | |||
824 | # <fullname> := <name>[.<subtopic][.<section>] |
|
815 | # <fullname> := <name>[.<subtopic][.<section>] | |
825 | name = subtopic = section = None |
|
816 | name = subtopic = section = None | |
826 | if fullname is not None: |
|
817 | if fullname is not None: | |
827 | nameparts = fullname.split('.') |
|
818 | nameparts = fullname.split('.') | |
828 | name = nameparts.pop(0) |
|
819 | name = nameparts.pop(0) | |
829 | if nameparts and name in subtopics: |
|
820 | if nameparts and name in subtopics: | |
830 | subtopic = nameparts.pop(0) |
|
821 | subtopic = nameparts.pop(0) | |
831 | if nameparts: |
|
822 | if nameparts: | |
832 | section = encoding.lower('.'.join(nameparts)) |
|
823 | section = encoding.lower('.'.join(nameparts)) | |
833 |
|
824 | |||
834 | textwidth = ui.configint('ui', 'textwidth') |
|
825 | textwidth = ui.configint('ui', 'textwidth') | |
835 | termwidth = ui.termwidth() - 2 |
|
826 | termwidth = ui.termwidth() - 2 | |
836 | if textwidth <= 0 or termwidth < textwidth: |
|
827 | if textwidth <= 0 or termwidth < textwidth: | |
837 | textwidth = termwidth |
|
828 | textwidth = termwidth | |
838 | text = help_(ui, commands, name, |
|
829 | text = help_(ui, commands, name, | |
839 | subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts) |
|
830 | subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts) | |
840 |
|
831 | |||
841 | blocks, pruned = minirst.parse(text, keep=keep) |
|
832 | blocks, pruned = minirst.parse(text, keep=keep) | |
842 | if 'verbose' in pruned: |
|
833 | if 'verbose' in pruned: | |
843 | keep.append('omitted') |
|
834 | keep.append('omitted') | |
844 | else: |
|
835 | else: | |
845 | keep.append('notomitted') |
|
836 | keep.append('notomitted') | |
846 | blocks, pruned = minirst.parse(text, keep=keep) |
|
837 | blocks, pruned = minirst.parse(text, keep=keep) | |
847 | if section: |
|
838 | if section: | |
848 | blocks = minirst.filtersections(blocks, section) |
|
839 | blocks = minirst.filtersections(blocks, section) | |
849 |
|
840 | |||
850 | # We could have been given a weird ".foo" section without a name |
|
841 | # We could have been given a weird ".foo" section without a name | |
851 | # to look for, or we could have simply failed to found "foo.bar" |
|
842 | # to look for, or we could have simply failed to found "foo.bar" | |
852 | # because bar isn't a section of foo |
|
843 | # because bar isn't a section of foo | |
853 | if section and not (blocks and name): |
|
844 | if section and not (blocks and name): | |
854 | raise error.Abort(_("help section not found: %s") % fullname) |
|
845 | raise error.Abort(_("help section not found: %s") % fullname) | |
855 |
|
846 | |||
856 | return minirst.formatplain(blocks, textwidth) |
|
847 | return minirst.formatplain(blocks, textwidth) |
@@ -1,3930 +1,3814 | |||||
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 | Extra extensions will be printed in help output in a non-reliable order since |
|
47 | Extra extensions will be printed in help output in a non-reliable order since | |
48 | the extension is unknown. |
|
48 | the extension is unknown. | |
49 | #if no-extraextensions |
|
49 | #if no-extraextensions | |
50 |
|
50 | |||
51 | $ hg help |
|
51 | $ hg help | |
52 | Mercurial Distributed SCM |
|
52 | Mercurial Distributed SCM | |
53 |
|
53 | |||
54 | list of commands: |
|
54 | list of commands: | |
55 |
|
55 | |||
56 | Repository creation: |
|
56 | Repository creation: | |
57 |
|
57 | |||
58 | clone make a copy of an existing repository |
|
58 | clone make a copy of an existing repository | |
59 | init create a new repository in the given directory |
|
59 | init create a new repository in the given directory | |
60 |
|
60 | |||
61 | Remote repository management: |
|
61 | Remote repository management: | |
62 |
|
62 | |||
63 | incoming show new changesets found in source |
|
63 | incoming show new changesets found in source | |
64 | outgoing show changesets not found in the destination |
|
64 | outgoing show changesets not found in the destination | |
65 | paths show aliases for remote repositories |
|
65 | paths show aliases for remote repositories | |
66 | pull pull changes from the specified source |
|
66 | pull pull changes from the specified source | |
67 | push push changes to the specified destination |
|
67 | push push changes to the specified destination | |
68 | serve start stand-alone webserver |
|
68 | serve start stand-alone webserver | |
69 |
|
69 | |||
70 | Change creation: |
|
70 | Change creation: | |
71 |
|
71 | |||
72 | commit commit the specified files or all outstanding changes |
|
72 | commit commit the specified files or all outstanding changes | |
73 |
|
73 | |||
74 | Change manipulation: |
|
74 | Change manipulation: | |
75 |
|
75 | |||
76 | backout reverse effect of earlier changeset |
|
76 | backout reverse effect of earlier changeset | |
77 | graft copy changes from other branches onto the current branch |
|
77 | graft copy changes from other branches onto the current branch | |
78 | merge merge another revision into working directory |
|
78 | merge merge another revision into working directory | |
79 |
|
79 | |||
80 | Change organization: |
|
80 | Change organization: | |
81 |
|
81 | |||
82 | bookmarks create a new bookmark or list existing bookmarks |
|
82 | bookmarks create a new bookmark or list existing bookmarks | |
83 | branch set or show the current branch name |
|
83 | branch set or show the current branch name | |
84 | branches list repository named branches |
|
84 | branches list repository named branches | |
85 | phase set or show the current phase name |
|
85 | phase set or show the current phase name | |
86 | tag add one or more tags for the current or given revision |
|
86 | tag add one or more tags for the current or given revision | |
87 | tags list repository tags |
|
87 | tags list repository tags | |
88 |
|
88 | |||
89 | File content management: |
|
89 | File content management: | |
90 |
|
90 | |||
91 | annotate show changeset information by line for each file |
|
91 | annotate show changeset information by line for each file | |
92 | cat output the current or given revision of files |
|
92 | cat output the current or given revision of files | |
93 | copy mark files as copied for the next commit |
|
93 | copy mark files as copied for the next commit | |
94 | diff diff repository (or selected files) |
|
94 | diff diff repository (or selected files) | |
95 | grep search revision history for a pattern in specified files |
|
95 | grep search revision history for a pattern in specified files | |
96 |
|
96 | |||
97 | Change navigation: |
|
97 | Change navigation: | |
98 |
|
98 | |||
99 | bisect subdivision search of changesets |
|
99 | bisect subdivision search of changesets | |
100 | heads show branch heads |
|
100 | heads show branch heads | |
101 | identify identify the working directory or specified revision |
|
101 | identify identify the working directory or specified revision | |
102 | log show revision history of entire repository or files |
|
102 | log show revision history of entire repository or files | |
103 |
|
103 | |||
104 | Working directory management: |
|
104 | Working directory management: | |
105 |
|
105 | |||
106 | add add the specified files on the next commit |
|
106 | add add the specified files on the next commit | |
107 | addremove add all new files, delete all missing files |
|
107 | addremove add all new files, delete all missing files | |
108 | files list tracked files |
|
108 | files list tracked files | |
109 | forget forget the specified files on the next commit |
|
109 | forget forget the specified files on the next commit | |
110 | remove remove the specified files on the next commit |
|
110 | remove remove the specified files on the next commit | |
111 | rename rename files; equivalent of copy + remove |
|
111 | rename rename files; equivalent of copy + remove | |
112 | resolve redo merges or set/view the merge status of files |
|
112 | resolve redo merges or set/view the merge status of files | |
113 | revert restore files to their checkout state |
|
113 | revert restore files to their checkout state | |
114 | root print the root (top) of the current working directory |
|
114 | root print the root (top) of the current working directory | |
115 | status show changed files in the working directory |
|
115 | status show changed files in the working directory | |
116 | summary summarize working directory state |
|
116 | summary summarize working directory state | |
117 | update update working directory (or switch revisions) |
|
117 | update update working directory (or switch revisions) | |
118 |
|
118 | |||
119 | Change import/export: |
|
119 | Change import/export: | |
120 |
|
120 | |||
121 | archive create an unversioned archive of a repository revision |
|
121 | archive create an unversioned archive of a repository revision | |
122 | bundle create a bundle file |
|
122 | bundle create a bundle file | |
123 | export dump the header and diffs for one or more changesets |
|
123 | export dump the header and diffs for one or more changesets | |
124 | import import an ordered set of patches |
|
124 | import import an ordered set of patches | |
125 | unbundle apply one or more bundle files |
|
125 | unbundle apply one or more bundle files | |
126 |
|
126 | |||
127 | Repository maintenance: |
|
127 | Repository maintenance: | |
128 |
|
128 | |||
129 | manifest output the current or given revision of the project manifest |
|
129 | manifest output the current or given revision of the project manifest | |
130 | recover roll back an interrupted transaction |
|
130 | recover roll back an interrupted transaction | |
131 | verify verify the integrity of the repository |
|
131 | verify verify the integrity of the repository | |
132 |
|
132 | |||
133 | Help: |
|
133 | Help: | |
134 |
|
134 | |||
135 | config show combined config settings from all hgrc files |
|
135 | config show combined config settings from all hgrc files | |
136 | help show help for a given topic or a help overview |
|
136 | help show help for a given topic or a help overview | |
137 | version output version and copyright information |
|
137 | version output version and copyright information | |
138 |
|
138 | |||
139 | additional help topics: |
|
139 | additional help topics: | |
140 |
|
140 | |||
141 | Mercurial identifiers: |
|
141 | Mercurial identifiers: | |
142 |
|
142 | |||
143 | filesets Specifying File Sets |
|
143 | filesets Specifying File Sets | |
144 | hgignore Syntax for Mercurial Ignore Files |
|
144 | hgignore Syntax for Mercurial Ignore Files | |
145 | patterns File Name Patterns |
|
145 | patterns File Name Patterns | |
146 | revisions Specifying Revisions |
|
146 | revisions Specifying Revisions | |
147 | urls URL Paths |
|
147 | urls URL Paths | |
148 |
|
148 | |||
149 | Mercurial output: |
|
149 | Mercurial output: | |
150 |
|
150 | |||
151 | color Colorizing Outputs |
|
151 | color Colorizing Outputs | |
152 | dates Date Formats |
|
152 | dates Date Formats | |
153 | diffs Diff Formats |
|
153 | diffs Diff Formats | |
154 | templating Template Usage |
|
154 | templating Template Usage | |
155 |
|
155 | |||
156 | Mercurial configuration: |
|
156 | Mercurial configuration: | |
157 |
|
157 | |||
158 | config Configuration Files |
|
158 | config Configuration Files | |
159 | environment Environment Variables |
|
159 | environment Environment Variables | |
160 | extensions Using Additional Features |
|
160 | extensions Using Additional Features | |
161 | flags Command-line flags |
|
161 | flags Command-line flags | |
162 | hgweb Configuring hgweb |
|
162 | hgweb Configuring hgweb | |
163 | merge-tools Merge Tools |
|
163 | merge-tools Merge Tools | |
164 | pager Pager Support |
|
164 | pager Pager Support | |
165 |
|
165 | |||
166 | Concepts: |
|
166 | Concepts: | |
167 |
|
167 | |||
168 | bundlespec Bundle File Formats |
|
168 | bundlespec Bundle File Formats | |
169 | glossary Glossary |
|
169 | glossary Glossary | |
170 | phases Working with Phases |
|
170 | phases Working with Phases | |
171 | subrepos Subrepositories |
|
171 | subrepos Subrepositories | |
172 |
|
172 | |||
173 | Miscellaneous: |
|
173 | Miscellaneous: | |
174 |
|
174 | |||
175 | deprecated Deprecated Features |
|
175 | deprecated Deprecated Features | |
176 | internals Technical implementation topics |
|
176 | internals Technical implementation topics | |
177 | scripting Using Mercurial from scripts and automation |
|
177 | scripting Using Mercurial from scripts and automation | |
178 |
|
178 | |||
179 | (use 'hg help -v' to show built-in aliases and global options) |
|
179 | (use 'hg help -v' to show built-in aliases and global options) | |
180 |
|
180 | |||
181 | $ hg -q help |
|
181 | $ hg -q help | |
182 | Repository creation: |
|
182 | Repository creation: | |
183 |
|
183 | |||
184 | clone make a copy of an existing repository |
|
184 | clone make a copy of an existing repository | |
185 | init create a new repository in the given directory |
|
185 | init create a new repository in the given directory | |
186 |
|
186 | |||
187 | Remote repository management: |
|
187 | Remote repository management: | |
188 |
|
188 | |||
189 | incoming show new changesets found in source |
|
189 | incoming show new changesets found in source | |
190 | outgoing show changesets not found in the destination |
|
190 | outgoing show changesets not found in the destination | |
191 | paths show aliases for remote repositories |
|
191 | paths show aliases for remote repositories | |
192 | pull pull changes from the specified source |
|
192 | pull pull changes from the specified source | |
193 | push push changes to the specified destination |
|
193 | push push changes to the specified destination | |
194 | serve start stand-alone webserver |
|
194 | serve start stand-alone webserver | |
195 |
|
195 | |||
196 | Change creation: |
|
196 | Change creation: | |
197 |
|
197 | |||
198 | commit commit the specified files or all outstanding changes |
|
198 | commit commit the specified files or all outstanding changes | |
199 |
|
199 | |||
200 | Change manipulation: |
|
200 | Change manipulation: | |
201 |
|
201 | |||
202 | backout reverse effect of earlier changeset |
|
202 | backout reverse effect of earlier changeset | |
203 | graft copy changes from other branches onto the current branch |
|
203 | graft copy changes from other branches onto the current branch | |
204 | merge merge another revision into working directory |
|
204 | merge merge another revision into working directory | |
205 |
|
205 | |||
206 | Change organization: |
|
206 | Change organization: | |
207 |
|
207 | |||
208 | bookmarks create a new bookmark or list existing bookmarks |
|
208 | bookmarks create a new bookmark or list existing bookmarks | |
209 | branch set or show the current branch name |
|
209 | branch set or show the current branch name | |
210 | branches list repository named branches |
|
210 | branches list repository named branches | |
211 | phase set or show the current phase name |
|
211 | phase set or show the current phase name | |
212 | tag add one or more tags for the current or given revision |
|
212 | tag add one or more tags for the current or given revision | |
213 | tags list repository tags |
|
213 | tags list repository tags | |
214 |
|
214 | |||
215 | File content management: |
|
215 | File content management: | |
216 |
|
216 | |||
217 | annotate show changeset information by line for each file |
|
217 | annotate show changeset information by line for each file | |
218 | cat output the current or given revision of files |
|
218 | cat output the current or given revision of files | |
219 | copy mark files as copied for the next commit |
|
219 | copy mark files as copied for the next commit | |
220 | diff diff repository (or selected files) |
|
220 | diff diff repository (or selected files) | |
221 | grep search revision history for a pattern in specified files |
|
221 | grep search revision history for a pattern in specified files | |
222 |
|
222 | |||
223 | Change navigation: |
|
223 | Change navigation: | |
224 |
|
224 | |||
225 | bisect subdivision search of changesets |
|
225 | bisect subdivision search of changesets | |
226 | heads show branch heads |
|
226 | heads show branch heads | |
227 | identify identify the working directory or specified revision |
|
227 | identify identify the working directory or specified revision | |
228 | log show revision history of entire repository or files |
|
228 | log show revision history of entire repository or files | |
229 |
|
229 | |||
230 | Working directory management: |
|
230 | Working directory management: | |
231 |
|
231 | |||
232 | add add the specified files on the next commit |
|
232 | add add the specified files on the next commit | |
233 | addremove add all new files, delete all missing files |
|
233 | addremove add all new files, delete all missing files | |
234 | files list tracked files |
|
234 | files list tracked files | |
235 | forget forget the specified files on the next commit |
|
235 | forget forget the specified files on the next commit | |
236 | remove remove the specified files on the next commit |
|
236 | remove remove the specified files on the next commit | |
237 | rename rename files; equivalent of copy + remove |
|
237 | rename rename files; equivalent of copy + remove | |
238 | resolve redo merges or set/view the merge status of files |
|
238 | resolve redo merges or set/view the merge status of files | |
239 | revert restore files to their checkout state |
|
239 | revert restore files to their checkout state | |
240 | root print the root (top) of the current working directory |
|
240 | root print the root (top) of the current working directory | |
241 | status show changed files in the working directory |
|
241 | status show changed files in the working directory | |
242 | summary summarize working directory state |
|
242 | summary summarize working directory state | |
243 | update update working directory (or switch revisions) |
|
243 | update update working directory (or switch revisions) | |
244 |
|
244 | |||
245 | Change import/export: |
|
245 | Change import/export: | |
246 |
|
246 | |||
247 | archive create an unversioned archive of a repository revision |
|
247 | archive create an unversioned archive of a repository revision | |
248 | bundle create a bundle file |
|
248 | bundle create a bundle file | |
249 | export dump the header and diffs for one or more changesets |
|
249 | export dump the header and diffs for one or more changesets | |
250 | import import an ordered set of patches |
|
250 | import import an ordered set of patches | |
251 | unbundle apply one or more bundle files |
|
251 | unbundle apply one or more bundle files | |
252 |
|
252 | |||
253 | Repository maintenance: |
|
253 | Repository maintenance: | |
254 |
|
254 | |||
255 | manifest output the current or given revision of the project manifest |
|
255 | manifest output the current or given revision of the project manifest | |
256 | recover roll back an interrupted transaction |
|
256 | recover roll back an interrupted transaction | |
257 | verify verify the integrity of the repository |
|
257 | verify verify the integrity of the repository | |
258 |
|
258 | |||
259 | Help: |
|
259 | Help: | |
260 |
|
260 | |||
261 | config show combined config settings from all hgrc files |
|
261 | config show combined config settings from all hgrc files | |
262 | help show help for a given topic or a help overview |
|
262 | help show help for a given topic or a help overview | |
263 | version output version and copyright information |
|
263 | version output version and copyright information | |
264 |
|
264 | |||
265 | additional help topics: |
|
265 | additional help topics: | |
266 |
|
266 | |||
267 | Mercurial identifiers: |
|
267 | Mercurial identifiers: | |
268 |
|
268 | |||
269 | filesets Specifying File Sets |
|
269 | filesets Specifying File Sets | |
270 | hgignore Syntax for Mercurial Ignore Files |
|
270 | hgignore Syntax for Mercurial Ignore Files | |
271 | patterns File Name Patterns |
|
271 | patterns File Name Patterns | |
272 | revisions Specifying Revisions |
|
272 | revisions Specifying Revisions | |
273 | urls URL Paths |
|
273 | urls URL Paths | |
274 |
|
274 | |||
275 | Mercurial output: |
|
275 | Mercurial output: | |
276 |
|
276 | |||
277 | color Colorizing Outputs |
|
277 | color Colorizing Outputs | |
278 | dates Date Formats |
|
278 | dates Date Formats | |
279 | diffs Diff Formats |
|
279 | diffs Diff Formats | |
280 | templating Template Usage |
|
280 | templating Template Usage | |
281 |
|
281 | |||
282 | Mercurial configuration: |
|
282 | Mercurial configuration: | |
283 |
|
283 | |||
284 | config Configuration Files |
|
284 | config Configuration Files | |
285 | environment Environment Variables |
|
285 | environment Environment Variables | |
286 | extensions Using Additional Features |
|
286 | extensions Using Additional Features | |
287 | flags Command-line flags |
|
287 | flags Command-line flags | |
288 | hgweb Configuring hgweb |
|
288 | hgweb Configuring hgweb | |
289 | merge-tools Merge Tools |
|
289 | merge-tools Merge Tools | |
290 | pager Pager Support |
|
290 | pager Pager Support | |
291 |
|
291 | |||
292 | Concepts: |
|
292 | Concepts: | |
293 |
|
293 | |||
294 | bundlespec Bundle File Formats |
|
294 | bundlespec Bundle File Formats | |
295 | glossary Glossary |
|
295 | glossary Glossary | |
296 | phases Working with Phases |
|
296 | phases Working with Phases | |
297 | subrepos Subrepositories |
|
297 | subrepos Subrepositories | |
298 |
|
298 | |||
299 | Miscellaneous: |
|
299 | Miscellaneous: | |
300 |
|
300 | |||
301 | deprecated Deprecated Features |
|
301 | deprecated Deprecated Features | |
302 | internals Technical implementation topics |
|
302 | internals Technical implementation topics | |
303 | scripting Using Mercurial from scripts and automation |
|
303 | scripting Using Mercurial from scripts and automation | |
304 |
|
304 | |||
305 | Test extension help: |
|
305 | Test extension help: | |
306 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
306 | $ hg help extensions --config extensions.rebase= --config extensions.children= | |
307 | Using Additional Features |
|
307 | Using Additional Features | |
308 | """"""""""""""""""""""""" |
|
308 | """"""""""""""""""""""""" | |
309 |
|
309 | |||
310 | Mercurial has the ability to add new features through the use of |
|
310 | Mercurial has the ability to add new features through the use of | |
311 | extensions. Extensions may add new commands, add options to existing |
|
311 | extensions. Extensions may add new commands, add options to existing | |
312 | commands, change the default behavior of commands, or implement hooks. |
|
312 | commands, change the default behavior of commands, or implement hooks. | |
313 |
|
313 | |||
314 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
314 | To enable the "foo" extension, either shipped with Mercurial or in the | |
315 | Python search path, create an entry for it in your configuration file, |
|
315 | Python search path, create an entry for it in your configuration file, | |
316 | like this: |
|
316 | like this: | |
317 |
|
317 | |||
318 | [extensions] |
|
318 | [extensions] | |
319 | foo = |
|
319 | foo = | |
320 |
|
320 | |||
321 | You may also specify the full path to an extension: |
|
321 | You may also specify the full path to an extension: | |
322 |
|
322 | |||
323 | [extensions] |
|
323 | [extensions] | |
324 | myfeature = ~/.hgext/myfeature.py |
|
324 | myfeature = ~/.hgext/myfeature.py | |
325 |
|
325 | |||
326 | See 'hg help config' for more information on configuration files. |
|
326 | See 'hg help config' for more information on configuration files. | |
327 |
|
327 | |||
328 | Extensions are not loaded by default for a variety of reasons: they can |
|
328 | Extensions are not loaded by default for a variety of reasons: they can | |
329 | increase startup overhead; they may be meant for advanced usage only; they |
|
329 | increase startup overhead; they may be meant for advanced usage only; they | |
330 | may provide potentially dangerous abilities (such as letting you destroy |
|
330 | may provide potentially dangerous abilities (such as letting you destroy | |
331 | or modify history); they might not be ready for prime time; or they may |
|
331 | or modify history); they might not be ready for prime time; or they may | |
332 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
332 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
333 | to activate extensions as needed. |
|
333 | to activate extensions as needed. | |
334 |
|
334 | |||
335 | To explicitly disable an extension enabled in a configuration file of |
|
335 | To explicitly disable an extension enabled in a configuration file of | |
336 | broader scope, prepend its path with !: |
|
336 | broader scope, prepend its path with !: | |
337 |
|
337 | |||
338 | [extensions] |
|
338 | [extensions] | |
339 | # disabling extension bar residing in /path/to/extension/bar.py |
|
339 | # disabling extension bar residing in /path/to/extension/bar.py | |
340 | bar = !/path/to/extension/bar.py |
|
340 | bar = !/path/to/extension/bar.py | |
341 | # ditto, but no path was supplied for extension baz |
|
341 | # ditto, but no path was supplied for extension baz | |
342 | baz = ! |
|
342 | baz = ! | |
343 |
|
343 | |||
344 | enabled extensions: |
|
344 | enabled extensions: | |
345 |
|
345 | |||
346 | children command to display child changesets (DEPRECATED) |
|
346 | children command to display child changesets (DEPRECATED) | |
347 | rebase command to move sets of revisions to a different ancestor |
|
347 | rebase command to move sets of revisions to a different ancestor | |
348 |
|
348 | |||
349 | disabled extensions: |
|
349 | disabled extensions: | |
350 |
|
350 | |||
351 | acl hooks for controlling repository access |
|
351 | acl hooks for controlling repository access | |
352 | blackbox log repository events to a blackbox for debugging |
|
352 | blackbox log repository events to a blackbox for debugging | |
353 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
353 | bugzilla hooks for integrating with the Bugzilla bug tracker | |
354 | censor erase file content at a given revision |
|
354 | censor erase file content at a given revision | |
355 | churn command to display statistics about repository history |
|
355 | churn command to display statistics about repository history | |
356 | clonebundles advertise pre-generated bundles to seed clones |
|
356 | clonebundles advertise pre-generated bundles to seed clones | |
357 | closehead close arbitrary heads without checking them out first |
|
357 | closehead close arbitrary heads without checking them out first | |
358 | convert import revisions from foreign VCS repositories into |
|
358 | convert import revisions from foreign VCS repositories into | |
359 | Mercurial |
|
359 | Mercurial | |
360 | eol automatically manage newlines in repository files |
|
360 | eol automatically manage newlines in repository files | |
361 | extdiff command to allow external programs to compare revisions |
|
361 | extdiff command to allow external programs to compare revisions | |
362 | factotum http authentication with factotum |
|
362 | factotum http authentication with factotum | |
363 | githelp try mapping git commands to Mercurial commands |
|
363 | githelp try mapping git commands to Mercurial commands | |
364 | gpg commands to sign and verify changesets |
|
364 | gpg commands to sign and verify changesets | |
365 | hgk browse the repository in a graphical way |
|
365 | hgk browse the repository in a graphical way | |
366 | highlight syntax highlighting for hgweb (requires Pygments) |
|
366 | highlight syntax highlighting for hgweb (requires Pygments) | |
367 | histedit interactive history editing |
|
367 | histedit interactive history editing | |
368 | keyword expand keywords in tracked files |
|
368 | keyword expand keywords in tracked files | |
369 | largefiles track large binary files |
|
369 | largefiles track large binary files | |
370 | mq manage a stack of patches |
|
370 | mq manage a stack of patches | |
371 | notify hooks for sending email push notifications |
|
371 | notify hooks for sending email push notifications | |
372 | patchbomb command to send changesets as (a series of) patch emails |
|
372 | patchbomb command to send changesets as (a series of) patch emails | |
373 | purge command to delete untracked files from the working |
|
373 | purge command to delete untracked files from the working | |
374 | directory |
|
374 | directory | |
375 | relink recreates hardlinks between repository clones |
|
375 | relink recreates hardlinks between repository clones | |
376 | schemes extend schemes with shortcuts to repository swarms |
|
376 | schemes extend schemes with shortcuts to repository swarms | |
377 | share share a common history between several working directories |
|
377 | share share a common history between several working directories | |
378 | shelve save and restore changes to the working directory |
|
378 | shelve save and restore changes to the working directory | |
379 | strip strip changesets and their descendants from history |
|
379 | strip strip changesets and their descendants from history | |
380 | transplant command to transplant changesets from another branch |
|
380 | transplant command to transplant changesets from another branch | |
381 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
381 | win32mbcs allow the use of MBCS paths with problematic encodings | |
382 | zeroconf discover and advertise repositories on the local network |
|
382 | zeroconf discover and advertise repositories on the local network | |
383 |
|
383 | |||
384 | #endif |
|
384 | #endif | |
385 |
|
385 | |||
386 | Verify that deprecated extensions are included if --verbose: |
|
386 | Verify that deprecated extensions are included if --verbose: | |
387 |
|
387 | |||
388 | $ hg -v help extensions | grep children |
|
388 | $ hg -v help extensions | grep children | |
389 | children command to display child changesets (DEPRECATED) |
|
389 | children command to display child changesets (DEPRECATED) | |
390 |
|
390 | |||
391 | Verify that extension keywords appear in help templates |
|
391 | Verify that extension keywords appear in help templates | |
392 |
|
392 | |||
393 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
393 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null | |
394 |
|
394 | |||
395 | Test short command list with verbose option |
|
395 | Test short command list with verbose option | |
396 |
|
396 | |||
397 | $ hg -v help shortlist |
|
397 | $ hg -v help shortlist | |
398 | Mercurial Distributed SCM |
|
398 | Mercurial Distributed SCM | |
399 |
|
399 | |||
400 | basic commands: |
|
400 | basic commands: | |
401 |
|
401 | |||
402 | add add the specified files on the next commit |
|
402 | add add the specified files on the next commit | |
403 | annotate, blame |
|
403 | annotate, blame | |
404 | show changeset information by line for each file |
|
404 | show changeset information by line for each file | |
405 | clone make a copy of an existing repository |
|
405 | clone make a copy of an existing repository | |
406 | commit, ci commit the specified files or all outstanding changes |
|
406 | commit, ci commit the specified files or all outstanding changes | |
407 | diff diff repository (or selected files) |
|
407 | diff diff repository (or selected files) | |
408 | export dump the header and diffs for one or more changesets |
|
408 | export dump the header and diffs for one or more changesets | |
409 | forget forget the specified files on the next commit |
|
409 | forget forget the specified files on the next commit | |
410 | init create a new repository in the given directory |
|
410 | init create a new repository in the given directory | |
411 | log, history show revision history of entire repository or files |
|
411 | log, history show revision history of entire repository or files | |
412 | merge merge another revision into working directory |
|
412 | merge merge another revision into working directory | |
413 | pull pull changes from the specified source |
|
413 | pull pull changes from the specified source | |
414 | push push changes to the specified destination |
|
414 | push push changes to the specified destination | |
415 | remove, rm remove the specified files on the next commit |
|
415 | remove, rm remove the specified files on the next commit | |
416 | serve start stand-alone webserver |
|
416 | serve start stand-alone webserver | |
417 | status, st show changed files in the working directory |
|
417 | status, st show changed files in the working directory | |
418 | summary, sum summarize working directory state |
|
418 | summary, sum summarize working directory state | |
419 | update, up, checkout, co |
|
419 | update, up, checkout, co | |
420 | update working directory (or switch revisions) |
|
420 | update working directory (or switch revisions) | |
421 |
|
421 | |||
422 | global options ([+] can be repeated): |
|
422 | global options ([+] can be repeated): | |
423 |
|
423 | |||
424 | -R --repository REPO repository root directory or name of overlay bundle |
|
424 | -R --repository REPO repository root directory or name of overlay bundle | |
425 | file |
|
425 | file | |
426 | --cwd DIR change working directory |
|
426 | --cwd DIR change working directory | |
427 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
427 | -y --noninteractive do not prompt, automatically pick the first choice for | |
428 | all prompts |
|
428 | all prompts | |
429 | -q --quiet suppress output |
|
429 | -q --quiet suppress output | |
430 | -v --verbose enable additional output |
|
430 | -v --verbose enable additional output | |
431 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
431 | --color TYPE when to colorize (boolean, always, auto, never, or | |
432 | debug) |
|
432 | debug) | |
433 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
433 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
434 | --debug enable debugging output |
|
434 | --debug enable debugging output | |
435 | --debugger start debugger |
|
435 | --debugger start debugger | |
436 | --encoding ENCODE set the charset encoding (default: ascii) |
|
436 | --encoding ENCODE set the charset encoding (default: ascii) | |
437 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
437 | --encodingmode MODE set the charset encoding mode (default: strict) | |
438 | --traceback always print a traceback on exception |
|
438 | --traceback always print a traceback on exception | |
439 | --time time how long the command takes |
|
439 | --time time how long the command takes | |
440 | --profile print command execution profile |
|
440 | --profile print command execution profile | |
441 | --version output version information and exit |
|
441 | --version output version information and exit | |
442 | -h --help display help and exit |
|
442 | -h --help display help and exit | |
443 | --hidden consider hidden changesets |
|
443 | --hidden consider hidden changesets | |
444 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
444 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
445 | (default: auto) |
|
445 | (default: auto) | |
446 |
|
446 | |||
447 | (use 'hg help' for the full list of commands) |
|
447 | (use 'hg help' for the full list of commands) | |
448 |
|
448 | |||
449 | $ hg add -h |
|
449 | $ hg add -h | |
450 | hg add [OPTION]... [FILE]... |
|
450 | hg add [OPTION]... [FILE]... | |
451 |
|
451 | |||
452 | add the specified files on the next commit |
|
452 | add the specified files on the next commit | |
453 |
|
453 | |||
454 | Schedule files to be version controlled and added to the repository. |
|
454 | Schedule files to be version controlled and added to the repository. | |
455 |
|
455 | |||
456 | The files will be added to the repository at the next commit. To undo an |
|
456 | The files will be added to the repository at the next commit. To undo an | |
457 | add before that, see 'hg forget'. |
|
457 | add before that, see 'hg forget'. | |
458 |
|
458 | |||
459 | If no names are given, add all files to the repository (except files |
|
459 | If no names are given, add all files to the repository (except files | |
460 | matching ".hgignore"). |
|
460 | matching ".hgignore"). | |
461 |
|
461 | |||
462 | Returns 0 if all files are successfully added. |
|
462 | Returns 0 if all files are successfully added. | |
463 |
|
463 | |||
464 | options ([+] can be repeated): |
|
464 | options ([+] can be repeated): | |
465 |
|
465 | |||
466 | -I --include PATTERN [+] include names matching the given patterns |
|
466 | -I --include PATTERN [+] include names matching the given patterns | |
467 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
467 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
468 | -S --subrepos recurse into subrepositories |
|
468 | -S --subrepos recurse into subrepositories | |
469 | -n --dry-run do not perform actions, just print output |
|
469 | -n --dry-run do not perform actions, just print output | |
470 |
|
470 | |||
471 | (some details hidden, use --verbose to show complete help) |
|
471 | (some details hidden, use --verbose to show complete help) | |
472 |
|
472 | |||
473 | Verbose help for add |
|
473 | Verbose help for add | |
474 |
|
474 | |||
475 | $ hg add -hv |
|
475 | $ hg add -hv | |
476 | hg add [OPTION]... [FILE]... |
|
476 | hg add [OPTION]... [FILE]... | |
477 |
|
477 | |||
478 | add the specified files on the next commit |
|
478 | add the specified files on the next commit | |
479 |
|
479 | |||
480 | Schedule files to be version controlled and added to the repository. |
|
480 | Schedule files to be version controlled and added to the repository. | |
481 |
|
481 | |||
482 | The files will be added to the repository at the next commit. To undo an |
|
482 | The files will be added to the repository at the next commit. To undo an | |
483 | add before that, see 'hg forget'. |
|
483 | add before that, see 'hg forget'. | |
484 |
|
484 | |||
485 | If no names are given, add all files to the repository (except files |
|
485 | If no names are given, add all files to the repository (except files | |
486 | matching ".hgignore"). |
|
486 | matching ".hgignore"). | |
487 |
|
487 | |||
488 | Examples: |
|
488 | Examples: | |
489 |
|
489 | |||
490 | - New (unknown) files are added automatically by 'hg add': |
|
490 | - New (unknown) files are added automatically by 'hg add': | |
491 |
|
491 | |||
492 | $ ls |
|
492 | $ ls | |
493 | foo.c |
|
493 | foo.c | |
494 | $ hg status |
|
494 | $ hg status | |
495 | ? foo.c |
|
495 | ? foo.c | |
496 | $ hg add |
|
496 | $ hg add | |
497 | adding foo.c |
|
497 | adding foo.c | |
498 | $ hg status |
|
498 | $ hg status | |
499 | A foo.c |
|
499 | A foo.c | |
500 |
|
500 | |||
501 | - Specific files to be added can be specified: |
|
501 | - Specific files to be added can be specified: | |
502 |
|
502 | |||
503 | $ ls |
|
503 | $ ls | |
504 | bar.c foo.c |
|
504 | bar.c foo.c | |
505 | $ hg status |
|
505 | $ hg status | |
506 | ? bar.c |
|
506 | ? bar.c | |
507 | ? foo.c |
|
507 | ? foo.c | |
508 | $ hg add bar.c |
|
508 | $ hg add bar.c | |
509 | $ hg status |
|
509 | $ hg status | |
510 | A bar.c |
|
510 | A bar.c | |
511 | ? foo.c |
|
511 | ? foo.c | |
512 |
|
512 | |||
513 | Returns 0 if all files are successfully added. |
|
513 | Returns 0 if all files are successfully added. | |
514 |
|
514 | |||
515 | options ([+] can be repeated): |
|
515 | options ([+] can be repeated): | |
516 |
|
516 | |||
517 | -I --include PATTERN [+] include names matching the given patterns |
|
517 | -I --include PATTERN [+] include names matching the given patterns | |
518 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
518 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
519 | -S --subrepos recurse into subrepositories |
|
519 | -S --subrepos recurse into subrepositories | |
520 | -n --dry-run do not perform actions, just print output |
|
520 | -n --dry-run do not perform actions, just print output | |
521 |
|
521 | |||
522 | global options ([+] can be repeated): |
|
522 | global options ([+] can be repeated): | |
523 |
|
523 | |||
524 | -R --repository REPO repository root directory or name of overlay bundle |
|
524 | -R --repository REPO repository root directory or name of overlay bundle | |
525 | file |
|
525 | file | |
526 | --cwd DIR change working directory |
|
526 | --cwd DIR change working directory | |
527 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
527 | -y --noninteractive do not prompt, automatically pick the first choice for | |
528 | all prompts |
|
528 | all prompts | |
529 | -q --quiet suppress output |
|
529 | -q --quiet suppress output | |
530 | -v --verbose enable additional output |
|
530 | -v --verbose enable additional output | |
531 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
531 | --color TYPE when to colorize (boolean, always, auto, never, or | |
532 | debug) |
|
532 | debug) | |
533 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
533 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
534 | --debug enable debugging output |
|
534 | --debug enable debugging output | |
535 | --debugger start debugger |
|
535 | --debugger start debugger | |
536 | --encoding ENCODE set the charset encoding (default: ascii) |
|
536 | --encoding ENCODE set the charset encoding (default: ascii) | |
537 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
537 | --encodingmode MODE set the charset encoding mode (default: strict) | |
538 | --traceback always print a traceback on exception |
|
538 | --traceback always print a traceback on exception | |
539 | --time time how long the command takes |
|
539 | --time time how long the command takes | |
540 | --profile print command execution profile |
|
540 | --profile print command execution profile | |
541 | --version output version information and exit |
|
541 | --version output version information and exit | |
542 | -h --help display help and exit |
|
542 | -h --help display help and exit | |
543 | --hidden consider hidden changesets |
|
543 | --hidden consider hidden changesets | |
544 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
544 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
545 | (default: auto) |
|
545 | (default: auto) | |
546 |
|
546 | |||
547 | Test the textwidth config option |
|
547 | Test the textwidth config option | |
548 |
|
548 | |||
549 | $ hg root -h --config ui.textwidth=50 |
|
549 | $ hg root -h --config ui.textwidth=50 | |
550 | hg root |
|
550 | hg root | |
551 |
|
551 | |||
552 | print the root (top) of the current working |
|
552 | print the root (top) of the current working | |
553 | directory |
|
553 | directory | |
554 |
|
554 | |||
555 | Print the root directory of the current |
|
555 | Print the root directory of the current | |
556 | repository. |
|
556 | repository. | |
557 |
|
557 | |||
558 | Returns 0 on success. |
|
558 | Returns 0 on success. | |
559 |
|
559 | |||
560 | (some details hidden, use --verbose to show |
|
560 | (some details hidden, use --verbose to show | |
561 | complete help) |
|
561 | complete help) | |
562 |
|
562 | |||
563 | Test help option with version option |
|
563 | Test help option with version option | |
564 |
|
564 | |||
565 | $ hg add -h --version |
|
565 | $ hg add -h --version | |
566 | Mercurial Distributed SCM (version *) (glob) |
|
566 | Mercurial Distributed SCM (version *) (glob) | |
567 | (see https://mercurial-scm.org for more information) |
|
567 | (see https://mercurial-scm.org for more information) | |
568 |
|
568 | |||
569 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
569 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
570 | This is free software; see the source for copying conditions. There is NO |
|
570 | This is free software; see the source for copying conditions. There is NO | |
571 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
571 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
572 |
|
572 | |||
573 | $ hg add --skjdfks |
|
573 | $ hg add --skjdfks | |
574 | hg add: option --skjdfks not recognized |
|
574 | hg add: option --skjdfks not recognized | |
575 | hg add [OPTION]... [FILE]... |
|
575 | hg add [OPTION]... [FILE]... | |
576 |
|
576 | |||
577 | add the specified files on the next commit |
|
577 | add the specified files on the next commit | |
578 |
|
578 | |||
579 | options ([+] can be repeated): |
|
579 | options ([+] can be repeated): | |
580 |
|
580 | |||
581 | -I --include PATTERN [+] include names matching the given patterns |
|
581 | -I --include PATTERN [+] include names matching the given patterns | |
582 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
582 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
583 | -S --subrepos recurse into subrepositories |
|
583 | -S --subrepos recurse into subrepositories | |
584 | -n --dry-run do not perform actions, just print output |
|
584 | -n --dry-run do not perform actions, just print output | |
585 |
|
585 | |||
586 | (use 'hg add -h' to show more help) |
|
586 | (use 'hg add -h' to show more help) | |
587 | [255] |
|
587 | [255] | |
588 |
|
588 | |||
589 | Test ambiguous command help |
|
589 | Test ambiguous command help | |
590 |
|
590 | |||
591 | $ hg help ad |
|
591 | $ hg help ad | |
592 | list of commands: |
|
592 | list of commands: | |
593 |
|
593 | |||
594 | add add the specified files on the next commit |
|
594 | add add the specified files on the next commit | |
595 | addremove add all new files, delete all missing files |
|
595 | addremove add all new files, delete all missing files | |
596 |
|
596 | |||
597 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
597 | (use 'hg help -v ad' to show built-in aliases and global options) | |
598 |
|
598 | |||
599 | Test command without options |
|
599 | Test command without options | |
600 |
|
600 | |||
601 | $ hg help verify |
|
601 | $ hg help verify | |
602 | hg verify |
|
602 | hg verify | |
603 |
|
603 | |||
604 | verify the integrity of the repository |
|
604 | verify the integrity of the repository | |
605 |
|
605 | |||
606 | Verify the integrity of the current repository. |
|
606 | Verify the integrity of the current repository. | |
607 |
|
607 | |||
608 | This will perform an extensive check of the repository's integrity, |
|
608 | This will perform an extensive check of the repository's integrity, | |
609 | validating the hashes and checksums of each entry in the changelog, |
|
609 | validating the hashes and checksums of each entry in the changelog, | |
610 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
610 | manifest, and tracked files, as well as the integrity of their crosslinks | |
611 | and indices. |
|
611 | and indices. | |
612 |
|
612 | |||
613 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
613 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more | |
614 | information about recovery from corruption of the repository. |
|
614 | information about recovery from corruption of the repository. | |
615 |
|
615 | |||
616 | Returns 0 on success, 1 if errors are encountered. |
|
616 | Returns 0 on success, 1 if errors are encountered. | |
617 |
|
617 | |||
618 | (some details hidden, use --verbose to show complete help) |
|
618 | (some details hidden, use --verbose to show complete help) | |
619 |
|
619 | |||
620 | $ hg help diff |
|
620 | $ hg help diff | |
621 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
621 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
622 |
|
622 | |||
623 | diff repository (or selected files) |
|
623 | diff repository (or selected files) | |
624 |
|
624 | |||
625 | Show differences between revisions for the specified files. |
|
625 | Show differences between revisions for the specified files. | |
626 |
|
626 | |||
627 | Differences between files are shown using the unified diff format. |
|
627 | Differences between files are shown using the unified diff format. | |
628 |
|
628 | |||
629 | Note: |
|
629 | Note: | |
630 | 'hg diff' may generate unexpected results for merges, as it will |
|
630 | 'hg diff' may generate unexpected results for merges, as it will | |
631 | default to comparing against the working directory's first parent |
|
631 | default to comparing against the working directory's first parent | |
632 | changeset if no revisions are specified. |
|
632 | changeset if no revisions are specified. | |
633 |
|
633 | |||
634 | When two revision arguments are given, then changes are shown between |
|
634 | When two revision arguments are given, then changes are shown between | |
635 | those revisions. If only one revision is specified then that revision is |
|
635 | those revisions. If only one revision is specified then that revision is | |
636 | compared to the working directory, and, when no revisions are specified, |
|
636 | compared to the working directory, and, when no revisions are specified, | |
637 | the working directory files are compared to its first parent. |
|
637 | the working directory files are compared to its first parent. | |
638 |
|
638 | |||
639 | Alternatively you can specify -c/--change with a revision to see the |
|
639 | Alternatively you can specify -c/--change with a revision to see the | |
640 | changes in that changeset relative to its first parent. |
|
640 | changes in that changeset relative to its first parent. | |
641 |
|
641 | |||
642 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
642 | Without the -a/--text option, diff will avoid generating diffs of files it | |
643 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
643 | detects as binary. With -a, diff will generate a diff anyway, probably | |
644 | with undesirable results. |
|
644 | with undesirable results. | |
645 |
|
645 | |||
646 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
646 | Use the -g/--git option to generate diffs in the git extended diff format. | |
647 | For more information, read 'hg help diffs'. |
|
647 | For more information, read 'hg help diffs'. | |
648 |
|
648 | |||
649 | Returns 0 on success. |
|
649 | Returns 0 on success. | |
650 |
|
650 | |||
651 | options ([+] can be repeated): |
|
651 | options ([+] can be repeated): | |
652 |
|
652 | |||
653 | -r --rev REV [+] revision |
|
653 | -r --rev REV [+] revision | |
654 | -c --change REV change made by revision |
|
654 | -c --change REV change made by revision | |
655 | -a --text treat all files as text |
|
655 | -a --text treat all files as text | |
656 | -g --git use git extended diff format |
|
656 | -g --git use git extended diff format | |
657 | --binary generate binary diffs in git mode (default) |
|
657 | --binary generate binary diffs in git mode (default) | |
658 | --nodates omit dates from diff headers |
|
658 | --nodates omit dates from diff headers | |
659 | --noprefix omit a/ and b/ prefixes from filenames |
|
659 | --noprefix omit a/ and b/ prefixes from filenames | |
660 | -p --show-function show which function each change is in |
|
660 | -p --show-function show which function each change is in | |
661 | --reverse produce a diff that undoes the changes |
|
661 | --reverse produce a diff that undoes the changes | |
662 | -w --ignore-all-space ignore white space when comparing lines |
|
662 | -w --ignore-all-space ignore white space when comparing lines | |
663 | -b --ignore-space-change ignore changes in the amount of white space |
|
663 | -b --ignore-space-change ignore changes in the amount of white space | |
664 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
664 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
665 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL |
|
665 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL | |
666 | -U --unified NUM number of lines of context to show |
|
666 | -U --unified NUM number of lines of context to show | |
667 | --stat output diffstat-style summary of changes |
|
667 | --stat output diffstat-style summary of changes | |
668 | --root DIR produce diffs relative to subdirectory |
|
668 | --root DIR produce diffs relative to subdirectory | |
669 | -I --include PATTERN [+] include names matching the given patterns |
|
669 | -I --include PATTERN [+] include names matching the given patterns | |
670 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
670 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
671 | -S --subrepos recurse into subrepositories |
|
671 | -S --subrepos recurse into subrepositories | |
672 |
|
672 | |||
673 | (some details hidden, use --verbose to show complete help) |
|
673 | (some details hidden, use --verbose to show complete help) | |
674 |
|
674 | |||
675 | $ hg help status |
|
675 | $ hg help status | |
676 | hg status [OPTION]... [FILE]... |
|
676 | hg status [OPTION]... [FILE]... | |
677 |
|
677 | |||
678 | aliases: st |
|
678 | aliases: st | |
679 |
|
679 | |||
680 | show changed files in the working directory |
|
680 | show changed files in the working directory | |
681 |
|
681 | |||
682 | Show status of files in the repository. If names are given, only files |
|
682 | Show status of files in the repository. If names are given, only files | |
683 | that match are shown. Files that are clean or ignored or the source of a |
|
683 | that match are shown. Files that are clean or ignored or the source of a | |
684 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
684 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
685 | -C/--copies or -A/--all are given. Unless options described with "show |
|
685 | -C/--copies or -A/--all are given. Unless options described with "show | |
686 | only ..." are given, the options -mardu are used. |
|
686 | only ..." are given, the options -mardu are used. | |
687 |
|
687 | |||
688 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
688 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
689 | explicitly requested with -u/--unknown or -i/--ignored. |
|
689 | explicitly requested with -u/--unknown or -i/--ignored. | |
690 |
|
690 | |||
691 | Note: |
|
691 | Note: | |
692 | 'hg status' may appear to disagree with diff if permissions have |
|
692 | 'hg status' may appear to disagree with diff if permissions have | |
693 | changed or a merge has occurred. The standard diff format does not |
|
693 | changed or a merge has occurred. The standard diff format does not | |
694 | report permission changes and diff only reports changes relative to one |
|
694 | report permission changes and diff only reports changes relative to one | |
695 | merge parent. |
|
695 | merge parent. | |
696 |
|
696 | |||
697 | If one revision is given, it is used as the base revision. If two |
|
697 | If one revision is given, it is used as the base revision. If two | |
698 | revisions are given, the differences between them are shown. The --change |
|
698 | revisions are given, the differences between them are shown. The --change | |
699 | option can also be used as a shortcut to list the changed files of a |
|
699 | option can also be used as a shortcut to list the changed files of a | |
700 | revision from its first parent. |
|
700 | revision from its first parent. | |
701 |
|
701 | |||
702 | The codes used to show the status of files are: |
|
702 | The codes used to show the status of files are: | |
703 |
|
703 | |||
704 | M = modified |
|
704 | M = modified | |
705 | A = added |
|
705 | A = added | |
706 | R = removed |
|
706 | R = removed | |
707 | C = clean |
|
707 | C = clean | |
708 | ! = missing (deleted by non-hg command, but still tracked) |
|
708 | ! = missing (deleted by non-hg command, but still tracked) | |
709 | ? = not tracked |
|
709 | ? = not tracked | |
710 | I = ignored |
|
710 | I = ignored | |
711 | = origin of the previous file (with --copies) |
|
711 | = origin of the previous file (with --copies) | |
712 |
|
712 | |||
713 | Returns 0 on success. |
|
713 | Returns 0 on success. | |
714 |
|
714 | |||
715 | options ([+] can be repeated): |
|
715 | options ([+] can be repeated): | |
716 |
|
716 | |||
717 | -A --all show status of all files |
|
717 | -A --all show status of all files | |
718 | -m --modified show only modified files |
|
718 | -m --modified show only modified files | |
719 | -a --added show only added files |
|
719 | -a --added show only added files | |
720 | -r --removed show only removed files |
|
720 | -r --removed show only removed files | |
721 | -d --deleted show only deleted (but tracked) files |
|
721 | -d --deleted show only deleted (but tracked) files | |
722 | -c --clean show only files without changes |
|
722 | -c --clean show only files without changes | |
723 | -u --unknown show only unknown (not tracked) files |
|
723 | -u --unknown show only unknown (not tracked) files | |
724 | -i --ignored show only ignored files |
|
724 | -i --ignored show only ignored files | |
725 | -n --no-status hide status prefix |
|
725 | -n --no-status hide status prefix | |
726 | -C --copies show source of copied files |
|
726 | -C --copies show source of copied files | |
727 | -0 --print0 end filenames with NUL, for use with xargs |
|
727 | -0 --print0 end filenames with NUL, for use with xargs | |
728 | --rev REV [+] show difference from revision |
|
728 | --rev REV [+] show difference from revision | |
729 | --change REV list the changed files of a revision |
|
729 | --change REV list the changed files of a revision | |
730 | -I --include PATTERN [+] include names matching the given patterns |
|
730 | -I --include PATTERN [+] include names matching the given patterns | |
731 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
731 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
732 | -S --subrepos recurse into subrepositories |
|
732 | -S --subrepos recurse into subrepositories | |
733 | -T --template TEMPLATE display with template |
|
733 | -T --template TEMPLATE display with template | |
734 |
|
734 | |||
735 | (some details hidden, use --verbose to show complete help) |
|
735 | (some details hidden, use --verbose to show complete help) | |
736 |
|
736 | |||
737 | $ hg -q help status |
|
737 | $ hg -q help status | |
738 | hg status [OPTION]... [FILE]... |
|
738 | hg status [OPTION]... [FILE]... | |
739 |
|
739 | |||
740 | show changed files in the working directory |
|
740 | show changed files in the working directory | |
741 |
|
741 | |||
742 | $ hg help foo |
|
742 | $ hg help foo | |
743 | abort: no such help topic: foo |
|
743 | abort: no such help topic: foo | |
744 | (try 'hg help --keyword foo') |
|
744 | (try 'hg help --keyword foo') | |
745 | [255] |
|
745 | [255] | |
746 |
|
746 | |||
747 | $ hg skjdfks |
|
747 | $ hg skjdfks | |
748 | hg: unknown command 'skjdfks' |
|
748 | hg: unknown command 'skjdfks' | |
749 | (use 'hg help' for a list of commands) |
|
749 | (use 'hg help' for a list of commands) | |
750 | [255] |
|
750 | [255] | |
751 |
|
751 | |||
752 | Typoed command gives suggestion |
|
752 | Typoed command gives suggestion | |
753 | $ hg puls |
|
753 | $ hg puls | |
754 | hg: unknown command 'puls' |
|
754 | hg: unknown command 'puls' | |
755 | (did you mean one of pull, push?) |
|
755 | (did you mean one of pull, push?) | |
756 | [255] |
|
756 | [255] | |
757 |
|
757 | |||
758 | Not enabled extension gets suggested |
|
758 | Not enabled extension gets suggested | |
759 |
|
759 | |||
760 | $ hg rebase |
|
760 | $ hg rebase | |
761 | hg: unknown command 'rebase' |
|
761 | hg: unknown command 'rebase' | |
762 | 'rebase' is provided by the following extension: |
|
762 | 'rebase' is provided by the following extension: | |
763 |
|
763 | |||
764 | rebase command to move sets of revisions to a different ancestor |
|
764 | rebase command to move sets of revisions to a different ancestor | |
765 |
|
765 | |||
766 | (use 'hg help extensions' for information on enabling extensions) |
|
766 | (use 'hg help extensions' for information on enabling extensions) | |
767 | [255] |
|
767 | [255] | |
768 |
|
768 | |||
769 | Disabled extension gets suggested |
|
769 | Disabled extension gets suggested | |
770 | $ hg --config extensions.rebase=! rebase |
|
770 | $ hg --config extensions.rebase=! rebase | |
771 | hg: unknown command 'rebase' |
|
771 | hg: unknown command 'rebase' | |
772 | 'rebase' is provided by the following extension: |
|
772 | 'rebase' is provided by the following extension: | |
773 |
|
773 | |||
774 | rebase command to move sets of revisions to a different ancestor |
|
774 | rebase command to move sets of revisions to a different ancestor | |
775 |
|
775 | |||
776 | (use 'hg help extensions' for information on enabling extensions) |
|
776 | (use 'hg help extensions' for information on enabling extensions) | |
777 | [255] |
|
777 | [255] | |
778 |
|
778 | |||
779 | Make sure that we don't run afoul of the help system thinking that |
|
779 | Make sure that we don't run afoul of the help system thinking that | |
780 | this is a section and erroring out weirdly. |
|
780 | this is a section and erroring out weirdly. | |
781 |
|
781 | |||
782 | $ hg .log |
|
782 | $ hg .log | |
783 | hg: unknown command '.log' |
|
783 | hg: unknown command '.log' | |
784 | (did you mean log?) |
|
784 | (did you mean log?) | |
785 | [255] |
|
785 | [255] | |
786 |
|
786 | |||
787 | $ hg log. |
|
787 | $ hg log. | |
788 | hg: unknown command 'log.' |
|
788 | hg: unknown command 'log.' | |
789 | (did you mean log?) |
|
789 | (did you mean log?) | |
790 | [255] |
|
790 | [255] | |
791 | $ hg pu.lh |
|
791 | $ hg pu.lh | |
792 | hg: unknown command 'pu.lh' |
|
792 | hg: unknown command 'pu.lh' | |
793 | (did you mean one of pull, push?) |
|
793 | (did you mean one of pull, push?) | |
794 | [255] |
|
794 | [255] | |
795 |
|
795 | |||
796 | $ cat > helpext.py <<EOF |
|
796 | $ cat > helpext.py <<EOF | |
797 | > import os |
|
797 | > import os | |
798 | > from mercurial import commands, fancyopts, registrar |
|
798 | > from mercurial import commands, fancyopts, registrar | |
799 | > |
|
799 | > | |
800 | > def func(arg): |
|
800 | > def func(arg): | |
801 | > return '%sfoo' % arg |
|
801 | > return '%sfoo' % arg | |
802 | > class customopt(fancyopts.customopt): |
|
802 | > class customopt(fancyopts.customopt): | |
803 | > def newstate(self, oldstate, newparam, abort): |
|
803 | > def newstate(self, oldstate, newparam, abort): | |
804 | > return '%sbar' % oldstate |
|
804 | > return '%sbar' % oldstate | |
805 | > cmdtable = {} |
|
805 | > cmdtable = {} | |
806 | > command = registrar.command(cmdtable) |
|
806 | > command = registrar.command(cmdtable) | |
807 | > |
|
807 | > | |
808 | > @command(b'nohelp', |
|
808 | > @command(b'nohelp', | |
809 | > [(b'', b'longdesc', 3, b'x'*67), |
|
809 | > [(b'', b'longdesc', 3, b'x'*67), | |
810 | > (b'n', b'', None, b'normal desc'), |
|
810 | > (b'n', b'', None, b'normal desc'), | |
811 | > (b'', b'newline', b'', b'line1\nline2'), |
|
811 | > (b'', b'newline', b'', b'line1\nline2'), | |
812 | > (b'', b'callableopt', func, b'adds foo'), |
|
812 | > (b'', b'callableopt', func, b'adds foo'), | |
813 | > (b'', b'customopt', customopt(''), b'adds bar'), |
|
813 | > (b'', b'customopt', customopt(''), b'adds bar'), | |
814 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], |
|
814 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], | |
815 | > b'hg nohelp', |
|
815 | > b'hg nohelp', | |
816 | > norepo=True) |
|
816 | > norepo=True) | |
817 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) |
|
817 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) | |
818 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) |
|
818 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) | |
819 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) |
|
819 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) | |
820 | > def nohelp(ui, *args, **kwargs): |
|
820 | > def nohelp(ui, *args, **kwargs): | |
821 | > pass |
|
821 | > pass | |
822 | > |
|
822 | > | |
|
823 | > @command(b'hashelp', [], b'hg hashelp', norepo=True) | |||
|
824 | > def hashelp(ui, *args, **kwargs): | |||
|
825 | > """Extension command's help""" | |||
|
826 | > pass | |||
|
827 | > | |||
823 | > def uisetup(ui): |
|
828 | > def uisetup(ui): | |
824 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') |
|
829 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') | |
825 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') |
|
830 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') | |
826 | > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') |
|
831 | > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') | |
827 | > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') |
|
832 | > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') | |
828 | > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext') |
|
833 | > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext') | |
829 | > |
|
834 | > | |
830 | > EOF |
|
835 | > EOF | |
831 | $ echo '[extensions]' >> $HGRCPATH |
|
836 | $ echo '[extensions]' >> $HGRCPATH | |
832 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
837 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
833 |
|
838 | |||
834 | Test for aliases |
|
839 | Test for aliases | |
835 |
|
840 | |||
836 | $ hg help | grep hgalias |
|
841 | $ hg help | grep hgalias | |
837 | hgalias My doc |
|
842 | hgalias My doc | |
838 |
|
843 | |||
839 | $ hg help hgalias |
|
844 | $ hg help hgalias | |
840 | hg hgalias [--remote] |
|
845 | hg hgalias [--remote] | |
841 |
|
846 | |||
842 | alias for: hg summary |
|
847 | alias for: hg summary | |
843 |
|
848 | |||
844 | My doc |
|
849 | My doc | |
845 |
|
850 | |||
846 | defined by: helpext |
|
851 | defined by: helpext | |
847 |
|
852 | |||
848 | options: |
|
853 | options: | |
849 |
|
854 | |||
850 | --remote check for push and pull |
|
855 | --remote check for push and pull | |
851 |
|
856 | |||
852 | (some details hidden, use --verbose to show complete help) |
|
857 | (some details hidden, use --verbose to show complete help) | |
853 | $ hg help hgaliasnodoc |
|
858 | $ hg help hgaliasnodoc | |
854 | hg hgaliasnodoc [--remote] |
|
859 | hg hgaliasnodoc [--remote] | |
855 |
|
860 | |||
856 | alias for: hg summary |
|
861 | alias for: hg summary | |
857 |
|
862 | |||
858 | summarize working directory state |
|
863 | summarize working directory state | |
859 |
|
864 | |||
860 | This generates a brief summary of the working directory state, including |
|
865 | This generates a brief summary of the working directory state, including | |
861 | parents, branch, commit status, phase and available updates. |
|
866 | parents, branch, commit status, phase and available updates. | |
862 |
|
867 | |||
863 | With the --remote option, this will check the default paths for incoming |
|
868 | With the --remote option, this will check the default paths for incoming | |
864 | and outgoing changes. This can be time-consuming. |
|
869 | and outgoing changes. This can be time-consuming. | |
865 |
|
870 | |||
866 | Returns 0 on success. |
|
871 | Returns 0 on success. | |
867 |
|
872 | |||
868 | defined by: helpext |
|
873 | defined by: helpext | |
869 |
|
874 | |||
870 | options: |
|
875 | options: | |
871 |
|
876 | |||
872 | --remote check for push and pull |
|
877 | --remote check for push and pull | |
873 |
|
878 | |||
874 | (some details hidden, use --verbose to show complete help) |
|
879 | (some details hidden, use --verbose to show complete help) | |
875 |
|
880 | |||
876 | $ hg help shellalias |
|
881 | $ hg help shellalias | |
877 | hg shellalias |
|
882 | hg shellalias | |
878 |
|
883 | |||
879 | shell alias for: echo hi |
|
884 | shell alias for: echo hi | |
880 |
|
885 | |||
881 | (no help text available) |
|
886 | (no help text available) | |
882 |
|
887 | |||
883 | defined by: helpext |
|
888 | defined by: helpext | |
884 |
|
889 | |||
885 | (some details hidden, use --verbose to show complete help) |
|
890 | (some details hidden, use --verbose to show complete help) | |
886 |
|
891 | |||
887 | Test command with no help text |
|
892 | Test command with no help text | |
888 |
|
893 | |||
889 | $ hg help nohelp |
|
894 | $ hg help nohelp | |
890 | hg nohelp |
|
895 | hg nohelp | |
891 |
|
896 | |||
892 | (no help text available) |
|
897 | (no help text available) | |
893 |
|
898 | |||
894 | options: |
|
899 | options: | |
895 |
|
900 | |||
896 | --longdesc VALUE |
|
901 | --longdesc VALUE | |
897 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
902 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
898 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
903 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) | |
899 | -n -- normal desc |
|
904 | -n -- normal desc | |
900 | --newline VALUE line1 line2 |
|
905 | --newline VALUE line1 line2 | |
901 | --callableopt VALUE adds foo |
|
906 | --callableopt VALUE adds foo | |
902 | --customopt VALUE adds bar |
|
907 | --customopt VALUE adds bar | |
903 | --customopt-withdefault VALUE adds bar (default: foo) |
|
908 | --customopt-withdefault VALUE adds bar (default: foo) | |
904 |
|
909 | |||
905 | (some details hidden, use --verbose to show complete help) |
|
910 | (some details hidden, use --verbose to show complete help) | |
906 |
|
911 | |||
|
912 | Test that default list of commands includes extension commands that have help, | |||
|
913 | but not those that don't, except in verbose mode, when a keyword is passed, or | |||
|
914 | when help about the extension is requested. | |||
|
915 | ||||
|
916 | #if no-extraextensions | |||
|
917 | ||||
|
918 | $ hg help | grep hashelp | |||
|
919 | hashelp Extension command's help | |||
|
920 | $ hg help | grep nohelp | |||
|
921 | [1] | |||
|
922 | $ hg help -v | grep nohelp | |||
|
923 | nohelp (no help text available) | |||
|
924 | ||||
907 | $ hg help -k nohelp |
|
925 | $ hg help -k nohelp | |
908 | Commands: |
|
926 | Commands: | |
909 |
|
927 | |||
910 | nohelp hg nohelp |
|
928 | nohelp hg nohelp | |
911 |
|
929 | |||
912 | Extension Commands: |
|
930 | Extension Commands: | |
913 |
|
931 | |||
914 | nohelp (no help text available) |
|
932 | nohelp (no help text available) | |
915 |
|
933 | |||
916 | Test that default list of commands omits extension commands |
|
934 | $ hg help helpext | |
917 |
|
935 | helpext extension - no help text available | ||
918 | #if no-extraextensions |
|
|||
919 |
|
||||
920 | $ hg help |
|
|||
921 | Mercurial Distributed SCM |
|
|||
922 |
|
936 | |||
923 | list of commands: |
|
937 | list of commands: | |
924 |
|
938 | |||
925 | Repository creation: |
|
939 | hashelp Extension command's help | |
926 |
|
940 | nohelp (no help text available) | ||
927 | clone make a copy of an existing repository |
|
941 | ||
928 | init create a new repository in the given directory |
|
942 | (use 'hg help -v helpext' to show built-in aliases and global options) | |
929 |
|
||||
930 | Remote repository management: |
|
|||
931 |
|
||||
932 | incoming show new changesets found in source |
|
|||
933 | outgoing show changesets not found in the destination |
|
|||
934 | paths show aliases for remote repositories |
|
|||
935 | pull pull changes from the specified source |
|
|||
936 | push push changes to the specified destination |
|
|||
937 | serve start stand-alone webserver |
|
|||
938 |
|
||||
939 | Change creation: |
|
|||
940 |
|
||||
941 | commit commit the specified files or all outstanding changes |
|
|||
942 |
|
||||
943 | Change manipulation: |
|
|||
944 |
|
||||
945 | backout reverse effect of earlier changeset |
|
|||
946 | graft copy changes from other branches onto the current branch |
|
|||
947 | merge merge another revision into working directory |
|
|||
948 |
|
||||
949 | Change organization: |
|
|||
950 |
|
||||
951 | bookmarks create a new bookmark or list existing bookmarks |
|
|||
952 | branch set or show the current branch name |
|
|||
953 | branches list repository named branches |
|
|||
954 | phase set or show the current phase name |
|
|||
955 | tag add one or more tags for the current or given revision |
|
|||
956 | tags list repository tags |
|
|||
957 |
|
||||
958 | File content management: |
|
|||
959 |
|
||||
960 | annotate show changeset information by line for each file |
|
|||
961 | cat output the current or given revision of files |
|
|||
962 | copy mark files as copied for the next commit |
|
|||
963 | diff diff repository (or selected files) |
|
|||
964 | grep search revision history for a pattern in specified files |
|
|||
965 |
|
||||
966 | Change navigation: |
|
|||
967 |
|
||||
968 | bisect subdivision search of changesets |
|
|||
969 | heads show branch heads |
|
|||
970 | hgalias My doc |
|
|||
971 | identify identify the working directory or specified revision |
|
|||
972 | log show revision history of entire repository or files |
|
|||
973 |
|
||||
974 | Working directory management: |
|
|||
975 |
|
||||
976 | add add the specified files on the next commit |
|
|||
977 | addremove add all new files, delete all missing files |
|
|||
978 | files list tracked files |
|
|||
979 | forget forget the specified files on the next commit |
|
|||
980 | remove remove the specified files on the next commit |
|
|||
981 | rename rename files; equivalent of copy + remove |
|
|||
982 | resolve redo merges or set/view the merge status of files |
|
|||
983 | revert restore files to their checkout state |
|
|||
984 | root print the root (top) of the current working directory |
|
|||
985 | status show changed files in the working directory |
|
|||
986 | summary summarize working directory state |
|
|||
987 | update update working directory (or switch revisions) |
|
|||
988 |
|
||||
989 | Change import/export: |
|
|||
990 |
|
||||
991 | archive create an unversioned archive of a repository revision |
|
|||
992 | bundle create a bundle file |
|
|||
993 | export dump the header and diffs for one or more changesets |
|
|||
994 | import import an ordered set of patches |
|
|||
995 | unbundle apply one or more bundle files |
|
|||
996 |
|
||||
997 | Repository maintenance: |
|
|||
998 |
|
||||
999 | manifest output the current or given revision of the project manifest |
|
|||
1000 | recover roll back an interrupted transaction |
|
|||
1001 | verify verify the integrity of the repository |
|
|||
1002 |
|
||||
1003 | Help: |
|
|||
1004 |
|
||||
1005 | config show combined config settings from all hgrc files |
|
|||
1006 | help show help for a given topic or a help overview |
|
|||
1007 | version output version and copyright information |
|
|||
1008 |
|
||||
1009 | enabled extensions: |
|
|||
1010 |
|
||||
1011 | helpext (no help text available) |
|
|||
1012 |
|
||||
1013 | additional help topics: |
|
|||
1014 |
|
||||
1015 | Mercurial identifiers: |
|
|||
1016 |
|
||||
1017 | filesets Specifying File Sets |
|
|||
1018 | hgignore Syntax for Mercurial Ignore Files |
|
|||
1019 | patterns File Name Patterns |
|
|||
1020 | revisions Specifying Revisions |
|
|||
1021 | urls URL Paths |
|
|||
1022 |
|
||||
1023 | Mercurial output: |
|
|||
1024 |
|
||||
1025 | color Colorizing Outputs |
|
|||
1026 | dates Date Formats |
|
|||
1027 | diffs Diff Formats |
|
|||
1028 | templating Template Usage |
|
|||
1029 |
|
||||
1030 | Mercurial configuration: |
|
|||
1031 |
|
||||
1032 | config Configuration Files |
|
|||
1033 | environment Environment Variables |
|
|||
1034 | extensions Using Additional Features |
|
|||
1035 | flags Command-line flags |
|
|||
1036 | hgweb Configuring hgweb |
|
|||
1037 | merge-tools Merge Tools |
|
|||
1038 | pager Pager Support |
|
|||
1039 |
|
||||
1040 | Concepts: |
|
|||
1041 |
|
||||
1042 | bundlespec Bundle File Formats |
|
|||
1043 | glossary Glossary |
|
|||
1044 | phases Working with Phases |
|
|||
1045 | subrepos Subrepositories |
|
|||
1046 |
|
||||
1047 | Miscellaneous: |
|
|||
1048 |
|
||||
1049 | deprecated Deprecated Features |
|
|||
1050 | internals Technical implementation topics |
|
|||
1051 | scripting Using Mercurial from scripts and automation |
|
|||
1052 |
|
||||
1053 | (use 'hg help -v' to show built-in aliases and global options) |
|
|||
1054 |
|
943 | |||
1055 | #endif |
|
944 | #endif | |
1056 |
|
945 | |||
1057 | Test list of internal help commands |
|
946 | Test list of internal help commands | |
1058 |
|
947 | |||
1059 | $ hg help debug |
|
948 | $ hg help debug | |
1060 | debug commands (internal and unsupported): |
|
949 | debug commands (internal and unsupported): | |
1061 |
|
950 | |||
1062 | debugancestor |
|
951 | debugancestor | |
1063 | find the ancestor revision of two revisions in a given index |
|
952 | find the ancestor revision of two revisions in a given index | |
1064 | debugapplystreamclonebundle |
|
953 | debugapplystreamclonebundle | |
1065 | apply a stream clone bundle file |
|
954 | apply a stream clone bundle file | |
1066 | debugbuilddag |
|
955 | debugbuilddag | |
1067 | builds a repo with a given DAG from scratch in the current |
|
956 | builds a repo with a given DAG from scratch in the current | |
1068 | empty repo |
|
957 | empty repo | |
1069 | debugbundle lists the contents of a bundle |
|
958 | debugbundle lists the contents of a bundle | |
1070 | debugcapabilities |
|
959 | debugcapabilities | |
1071 | lists the capabilities of a remote peer |
|
960 | lists the capabilities of a remote peer | |
1072 | debugcheckstate |
|
961 | debugcheckstate | |
1073 | validate the correctness of the current dirstate |
|
962 | validate the correctness of the current dirstate | |
1074 | debugcolor show available color, effects or style |
|
963 | debugcolor show available color, effects or style | |
1075 | debugcommands |
|
964 | debugcommands | |
1076 | list all available commands and options |
|
965 | list all available commands and options | |
1077 | debugcomplete |
|
966 | debugcomplete | |
1078 | returns the completion list associated with the given command |
|
967 | returns the completion list associated with the given command | |
1079 | debugcreatestreamclonebundle |
|
968 | debugcreatestreamclonebundle | |
1080 | create a stream clone bundle file |
|
969 | create a stream clone bundle file | |
1081 | debugdag format the changelog or an index DAG as a concise textual |
|
970 | debugdag format the changelog or an index DAG as a concise textual | |
1082 | description |
|
971 | description | |
1083 | debugdata dump the contents of a data file revision |
|
972 | debugdata dump the contents of a data file revision | |
1084 | debugdate parse and display a date |
|
973 | debugdate parse and display a date | |
1085 | debugdeltachain |
|
974 | debugdeltachain | |
1086 | dump information about delta chains in a revlog |
|
975 | dump information about delta chains in a revlog | |
1087 | debugdirstate |
|
976 | debugdirstate | |
1088 | show the contents of the current dirstate |
|
977 | show the contents of the current dirstate | |
1089 | debugdiscovery |
|
978 | debugdiscovery | |
1090 | runs the changeset discovery protocol in isolation |
|
979 | runs the changeset discovery protocol in isolation | |
1091 | debugdownload |
|
980 | debugdownload | |
1092 | download a resource using Mercurial logic and config |
|
981 | download a resource using Mercurial logic and config | |
1093 | debugextensions |
|
982 | debugextensions | |
1094 | show information about active extensions |
|
983 | show information about active extensions | |
1095 | debugfileset parse and apply a fileset specification |
|
984 | debugfileset parse and apply a fileset specification | |
1096 | debugformat display format information about the current repository |
|
985 | debugformat display format information about the current repository | |
1097 | debugfsinfo show information detected about current filesystem |
|
986 | debugfsinfo show information detected about current filesystem | |
1098 | debuggetbundle |
|
987 | debuggetbundle | |
1099 | retrieves a bundle from a repo |
|
988 | retrieves a bundle from a repo | |
1100 | debugignore display the combined ignore pattern and information about |
|
989 | debugignore display the combined ignore pattern and information about | |
1101 | ignored files |
|
990 | ignored files | |
1102 | debugindex dump index data for a storage primitive |
|
991 | debugindex dump index data for a storage primitive | |
1103 | debugindexdot |
|
992 | debugindexdot | |
1104 | dump an index DAG as a graphviz dot file |
|
993 | dump an index DAG as a graphviz dot file | |
1105 | debugindexstats |
|
994 | debugindexstats | |
1106 | show stats related to the changelog index |
|
995 | show stats related to the changelog index | |
1107 | debuginstall test Mercurial installation |
|
996 | debuginstall test Mercurial installation | |
1108 | debugknown test whether node ids are known to a repo |
|
997 | debugknown test whether node ids are known to a repo | |
1109 | debuglocks show or modify state of locks |
|
998 | debuglocks show or modify state of locks | |
1110 | debugmanifestfulltextcache |
|
999 | debugmanifestfulltextcache | |
1111 | show, clear or amend the contents of the manifest fulltext |
|
1000 | show, clear or amend the contents of the manifest fulltext | |
1112 | cache |
|
1001 | cache | |
1113 | debugmergestate |
|
1002 | debugmergestate | |
1114 | print merge state |
|
1003 | print merge state | |
1115 | debugnamecomplete |
|
1004 | debugnamecomplete | |
1116 | complete "names" - tags, open branch names, bookmark names |
|
1005 | complete "names" - tags, open branch names, bookmark names | |
1117 | debugobsolete |
|
1006 | debugobsolete | |
1118 | create arbitrary obsolete marker |
|
1007 | create arbitrary obsolete marker | |
1119 | debugoptADV (no help text available) |
|
1008 | debugoptADV (no help text available) | |
1120 | debugoptDEP (no help text available) |
|
1009 | debugoptDEP (no help text available) | |
1121 | debugoptEXP (no help text available) |
|
1010 | debugoptEXP (no help text available) | |
1122 | debugpathcomplete |
|
1011 | debugpathcomplete | |
1123 | complete part or all of a tracked path |
|
1012 | complete part or all of a tracked path | |
1124 | debugpeer establish a connection to a peer repository |
|
1013 | debugpeer establish a connection to a peer repository | |
1125 | debugpickmergetool |
|
1014 | debugpickmergetool | |
1126 | examine which merge tool is chosen for specified file |
|
1015 | examine which merge tool is chosen for specified file | |
1127 | debugpushkey access the pushkey key/value protocol |
|
1016 | debugpushkey access the pushkey key/value protocol | |
1128 | debugpvec (no help text available) |
|
1017 | debugpvec (no help text available) | |
1129 | debugrebuilddirstate |
|
1018 | debugrebuilddirstate | |
1130 | rebuild the dirstate as it would look like for the given |
|
1019 | rebuild the dirstate as it would look like for the given | |
1131 | revision |
|
1020 | revision | |
1132 | debugrebuildfncache |
|
1021 | debugrebuildfncache | |
1133 | rebuild the fncache file |
|
1022 | rebuild the fncache file | |
1134 | debugrename dump rename information |
|
1023 | debugrename dump rename information | |
1135 | debugrevlog show data and statistics about a revlog |
|
1024 | debugrevlog show data and statistics about a revlog | |
1136 | debugrevlogindex |
|
1025 | debugrevlogindex | |
1137 | dump the contents of a revlog index |
|
1026 | dump the contents of a revlog index | |
1138 | debugrevspec parse and apply a revision specification |
|
1027 | debugrevspec parse and apply a revision specification | |
1139 | debugserve run a server with advanced settings |
|
1028 | debugserve run a server with advanced settings | |
1140 | debugsetparents |
|
1029 | debugsetparents | |
1141 | manually set the parents of the current working directory |
|
1030 | manually set the parents of the current working directory | |
1142 | debugssl test a secure connection to a server |
|
1031 | debugssl test a secure connection to a server | |
1143 | debugsub (no help text available) |
|
1032 | debugsub (no help text available) | |
1144 | debugsuccessorssets |
|
1033 | debugsuccessorssets | |
1145 | show set of successors for revision |
|
1034 | show set of successors for revision | |
1146 | debugtemplate |
|
1035 | debugtemplate | |
1147 | parse and apply a template |
|
1036 | parse and apply a template | |
1148 | debuguigetpass |
|
1037 | debuguigetpass | |
1149 | show prompt to type password |
|
1038 | show prompt to type password | |
1150 | debuguiprompt |
|
1039 | debuguiprompt | |
1151 | show plain prompt |
|
1040 | show plain prompt | |
1152 | debugupdatecaches |
|
1041 | debugupdatecaches | |
1153 | warm all known caches in the repository |
|
1042 | warm all known caches in the repository | |
1154 | debugupgraderepo |
|
1043 | debugupgraderepo | |
1155 | upgrade a repository to use different features |
|
1044 | upgrade a repository to use different features | |
1156 | debugwalk show how files match on given patterns |
|
1045 | debugwalk show how files match on given patterns | |
1157 | debugwhyunstable |
|
1046 | debugwhyunstable | |
1158 | explain instabilities of a changeset |
|
1047 | explain instabilities of a changeset | |
1159 | debugwireargs |
|
1048 | debugwireargs | |
1160 | (no help text available) |
|
1049 | (no help text available) | |
1161 | debugwireproto |
|
1050 | debugwireproto | |
1162 | send wire protocol commands to a server |
|
1051 | send wire protocol commands to a server | |
1163 |
|
1052 | |||
1164 |
(use 'hg |
|
1053 | (use 'hg help -v debug' to show built-in aliases and global options) | |
1165 |
|
1054 | |||
1166 | internals topic renders index of available sub-topics |
|
1055 | internals topic renders index of available sub-topics | |
1167 |
|
1056 | |||
1168 | $ hg help internals |
|
1057 | $ hg help internals | |
1169 | Technical implementation topics |
|
1058 | Technical implementation topics | |
1170 | """"""""""""""""""""""""""""""" |
|
1059 | """"""""""""""""""""""""""""""" | |
1171 |
|
1060 | |||
1172 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
1061 | To access a subtopic, use "hg help internals.{subtopic-name}" | |
1173 |
|
1062 | |||
1174 | bundle2 Bundle2 |
|
1063 | bundle2 Bundle2 | |
1175 | bundles Bundles |
|
1064 | bundles Bundles | |
1176 | cbor CBOR |
|
1065 | cbor CBOR | |
1177 | censor Censor |
|
1066 | censor Censor | |
1178 | changegroups Changegroups |
|
1067 | changegroups Changegroups | |
1179 | config Config Registrar |
|
1068 | config Config Registrar | |
1180 | requirements Repository Requirements |
|
1069 | requirements Repository Requirements | |
1181 | revlogs Revision Logs |
|
1070 | revlogs Revision Logs | |
1182 | wireprotocol Wire Protocol |
|
1071 | wireprotocol Wire Protocol | |
1183 | wireprotocolrpc |
|
1072 | wireprotocolrpc | |
1184 | Wire Protocol RPC |
|
1073 | Wire Protocol RPC | |
1185 | wireprotocolv2 |
|
1074 | wireprotocolv2 | |
1186 | Wire Protocol Version 2 |
|
1075 | Wire Protocol Version 2 | |
1187 |
|
1076 | |||
1188 | sub-topics can be accessed |
|
1077 | sub-topics can be accessed | |
1189 |
|
1078 | |||
1190 | $ hg help internals.changegroups |
|
1079 | $ hg help internals.changegroups | |
1191 | Changegroups |
|
1080 | Changegroups | |
1192 | """""""""""" |
|
1081 | """""""""""" | |
1193 |
|
1082 | |||
1194 | Changegroups are representations of repository revlog data, specifically |
|
1083 | Changegroups are representations of repository revlog data, specifically | |
1195 | the changelog data, root/flat manifest data, treemanifest data, and |
|
1084 | the changelog data, root/flat manifest data, treemanifest data, and | |
1196 | filelogs. |
|
1085 | filelogs. | |
1197 |
|
1086 | |||
1198 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
1087 | There are 3 versions of changegroups: "1", "2", and "3". From a high- | |
1199 | level, versions "1" and "2" are almost exactly the same, with the only |
|
1088 | level, versions "1" and "2" are almost exactly the same, with the only | |
1200 | difference being an additional item in the *delta header*. Version "3" |
|
1089 | difference being an additional item in the *delta header*. Version "3" | |
1201 | adds support for storage flags in the *delta header* and optionally |
|
1090 | adds support for storage flags in the *delta header* and optionally | |
1202 | exchanging treemanifests (enabled by setting an option on the |
|
1091 | exchanging treemanifests (enabled by setting an option on the | |
1203 | "changegroup" part in the bundle2). |
|
1092 | "changegroup" part in the bundle2). | |
1204 |
|
1093 | |||
1205 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
1094 | Changegroups when not exchanging treemanifests consist of 3 logical | |
1206 | segments: |
|
1095 | segments: | |
1207 |
|
1096 | |||
1208 | +---------------------------------+ |
|
1097 | +---------------------------------+ | |
1209 | | | | | |
|
1098 | | | | | | |
1210 | | changeset | manifest | filelogs | |
|
1099 | | changeset | manifest | filelogs | | |
1211 | | | | | |
|
1100 | | | | | | |
1212 | | | | | |
|
1101 | | | | | | |
1213 | +---------------------------------+ |
|
1102 | +---------------------------------+ | |
1214 |
|
1103 | |||
1215 | When exchanging treemanifests, there are 4 logical segments: |
|
1104 | When exchanging treemanifests, there are 4 logical segments: | |
1216 |
|
1105 | |||
1217 | +-------------------------------------------------+ |
|
1106 | +-------------------------------------------------+ | |
1218 | | | | | | |
|
1107 | | | | | | | |
1219 | | changeset | root | treemanifests | filelogs | |
|
1108 | | changeset | root | treemanifests | filelogs | | |
1220 | | | manifest | | | |
|
1109 | | | manifest | | | | |
1221 | | | | | | |
|
1110 | | | | | | | |
1222 | +-------------------------------------------------+ |
|
1111 | +-------------------------------------------------+ | |
1223 |
|
1112 | |||
1224 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
1113 | The principle building block of each segment is a *chunk*. A *chunk* is a | |
1225 | framed piece of data: |
|
1114 | framed piece of data: | |
1226 |
|
1115 | |||
1227 | +---------------------------------------+ |
|
1116 | +---------------------------------------+ | |
1228 | | | | |
|
1117 | | | | | |
1229 | | length | data | |
|
1118 | | length | data | | |
1230 | | (4 bytes) | (<length - 4> bytes) | |
|
1119 | | (4 bytes) | (<length - 4> bytes) | | |
1231 | | | | |
|
1120 | | | | | |
1232 | +---------------------------------------+ |
|
1121 | +---------------------------------------+ | |
1233 |
|
1122 | |||
1234 | All integers are big-endian signed integers. Each chunk starts with a |
|
1123 | All integers are big-endian signed integers. Each chunk starts with a | |
1235 | 32-bit integer indicating the length of the entire chunk (including the |
|
1124 | 32-bit integer indicating the length of the entire chunk (including the | |
1236 | length field itself). |
|
1125 | length field itself). | |
1237 |
|
1126 | |||
1238 | There is a special case chunk that has a value of 0 for the length |
|
1127 | There is a special case chunk that has a value of 0 for the length | |
1239 | ("0x00000000"). We call this an *empty chunk*. |
|
1128 | ("0x00000000"). We call this an *empty chunk*. | |
1240 |
|
1129 | |||
1241 | Delta Groups |
|
1130 | Delta Groups | |
1242 | ============ |
|
1131 | ============ | |
1243 |
|
1132 | |||
1244 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1133 | A *delta group* expresses the content of a revlog as a series of deltas, | |
1245 | or patches against previous revisions. |
|
1134 | or patches against previous revisions. | |
1246 |
|
1135 | |||
1247 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1136 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
1248 | to signal the end of the delta group: |
|
1137 | to signal the end of the delta group: | |
1249 |
|
1138 | |||
1250 | +------------------------------------------------------------------------+ |
|
1139 | +------------------------------------------------------------------------+ | |
1251 | | | | | | | |
|
1140 | | | | | | | | |
1252 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1141 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
1253 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1142 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
1254 | | | | | | | |
|
1143 | | | | | | | | |
1255 | +------------------------------------------------------------------------+ |
|
1144 | +------------------------------------------------------------------------+ | |
1256 |
|
1145 | |||
1257 | Each *chunk*'s data consists of the following: |
|
1146 | Each *chunk*'s data consists of the following: | |
1258 |
|
|
1147 | ||
1259 | +---------------------------------------+ |
|
1148 | +---------------------------------------+ | |
1260 | | | | |
|
1149 | | | | | |
1261 | | delta header | delta data | |
|
1150 | | delta header | delta data | | |
1262 | | (various by version) | (various) | |
|
1151 | | (various by version) | (various) | | |
1263 | | | | |
|
1152 | | | | | |
1264 | +---------------------------------------+ |
|
1153 | +---------------------------------------+ | |
1265 |
|
|
1154 | ||
1266 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1155 | The *delta data* is a series of *delta*s that describe a diff from an | |
1267 | existing entry (either that the recipient already has, or previously |
|
1156 | existing entry (either that the recipient already has, or previously | |
1268 | specified in the bundle/changegroup). |
|
1157 | specified in the bundle/changegroup). | |
1269 |
|
|
1158 | ||
1270 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1159 | The *delta header* is different between versions "1", "2", and "3" of the | |
1271 | changegroup format. |
|
1160 | changegroup format. | |
1272 |
|
|
1161 | ||
1273 | Version 1 (headerlen=80): |
|
1162 | Version 1 (headerlen=80): | |
1274 |
|
|
1163 | ||
1275 | +------------------------------------------------------+ |
|
1164 | +------------------------------------------------------+ | |
1276 | | | | | | |
|
1165 | | | | | | | |
1277 | | node | p1 node | p2 node | link node | |
|
1166 | | node | p1 node | p2 node | link node | | |
1278 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1167 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1279 | | | | | | |
|
1168 | | | | | | | |
1280 | +------------------------------------------------------+ |
|
1169 | +------------------------------------------------------+ | |
1281 |
|
|
1170 | ||
1282 | Version 2 (headerlen=100): |
|
1171 | Version 2 (headerlen=100): | |
1283 |
|
|
1172 | ||
1284 | +------------------------------------------------------------------+ |
|
1173 | +------------------------------------------------------------------+ | |
1285 | | | | | | | |
|
1174 | | | | | | | | |
1286 | | node | p1 node | p2 node | base node | link node | |
|
1175 | | node | p1 node | p2 node | base node | link node | | |
1287 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1176 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1288 | | | | | | | |
|
1177 | | | | | | | | |
1289 | +------------------------------------------------------------------+ |
|
1178 | +------------------------------------------------------------------+ | |
1290 |
|
|
1179 | ||
1291 | Version 3 (headerlen=102): |
|
1180 | Version 3 (headerlen=102): | |
1292 |
|
|
1181 | ||
1293 | +------------------------------------------------------------------------------+ |
|
1182 | +------------------------------------------------------------------------------+ | |
1294 | | | | | | | | |
|
1183 | | | | | | | | | |
1295 | | node | p1 node | p2 node | base node | link node | flags | |
|
1184 | | node | p1 node | p2 node | base node | link node | flags | | |
1296 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1185 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
1297 | | | | | | | | |
|
1186 | | | | | | | | | |
1298 | +------------------------------------------------------------------------------+ |
|
1187 | +------------------------------------------------------------------------------+ | |
1299 |
|
|
1188 | ||
1300 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1189 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which | |
1301 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1190 | contain a series of *delta*s, densely packed (no separators). These deltas | |
1302 | describe a diff from an existing entry (either that the recipient already |
|
1191 | describe a diff from an existing entry (either that the recipient already | |
1303 | has, or previously specified in the bundle/changegroup). The format is |
|
1192 | has, or previously specified in the bundle/changegroup). The format is | |
1304 | described more fully in "hg help internals.bdiff", but briefly: |
|
1193 | described more fully in "hg help internals.bdiff", but briefly: | |
1305 |
|
|
1194 | ||
1306 | +---------------------------------------------------------------+ |
|
1195 | +---------------------------------------------------------------+ | |
1307 | | | | | | |
|
1196 | | | | | | | |
1308 | | start offset | end offset | new length | content | |
|
1197 | | start offset | end offset | new length | content | | |
1309 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1198 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
1310 | | | | | | |
|
1199 | | | | | | | |
1311 | +---------------------------------------------------------------+ |
|
1200 | +---------------------------------------------------------------+ | |
1312 |
|
|
1201 | ||
1313 | Please note that the length field in the delta data does *not* include |
|
1202 | Please note that the length field in the delta data does *not* include | |
1314 | itself. |
|
1203 | itself. | |
1315 |
|
|
1204 | ||
1316 | In version 1, the delta is always applied against the previous node from |
|
1205 | In version 1, the delta is always applied against the previous node from | |
1317 | the changegroup or the first parent if this is the first entry in the |
|
1206 | the changegroup or the first parent if this is the first entry in the | |
1318 | changegroup. |
|
1207 | changegroup. | |
1319 |
|
|
1208 | ||
1320 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1209 | In version 2 and up, the delta base node is encoded in the entry in the | |
1321 | changegroup. This allows the delta to be expressed against any parent, |
|
1210 | changegroup. This allows the delta to be expressed against any parent, | |
1322 | which can result in smaller deltas and more efficient encoding of data. |
|
1211 | which can result in smaller deltas and more efficient encoding of data. | |
1323 |
|
|
1212 | ||
1324 | The *flags* field holds bitwise flags affecting the processing of revision |
|
1213 | The *flags* field holds bitwise flags affecting the processing of revision | |
1325 | data. The following flags are defined: |
|
1214 | data. The following flags are defined: | |
1326 |
|
|
1215 | ||
1327 | 32768 |
|
1216 | 32768 | |
1328 |
|
|
1217 | Censored revision. The revision's fulltext has been replaced by censor | |
1329 | metadata. May only occur on file revisions. |
|
1218 | metadata. May only occur on file revisions. | |
1330 |
|
1219 | |||
1331 | 16384 |
|
1220 | 16384 | |
1332 | Ellipsis revision. Revision hash does not match data (likely due to |
|
1221 | Ellipsis revision. Revision hash does not match data (likely due to | |
1333 | rewritten parents). |
|
1222 | rewritten parents). | |
1334 |
|
1223 | |||
1335 | 8192 |
|
1224 | 8192 | |
1336 | Externally stored. The revision fulltext contains "key:value" "\n" |
|
1225 | Externally stored. The revision fulltext contains "key:value" "\n" | |
1337 | delimited metadata defining an object stored elsewhere. Used by the LFS |
|
1226 | delimited metadata defining an object stored elsewhere. Used by the LFS | |
1338 | extension. |
|
1227 | extension. | |
1339 |
|
1228 | |||
1340 | For historical reasons, the integer values are identical to revlog version |
|
1229 | For historical reasons, the integer values are identical to revlog version | |
1341 | 1 per-revision storage flags and correspond to bits being set in this |
|
1230 | 1 per-revision storage flags and correspond to bits being set in this | |
1342 | 2-byte field. Bits were allocated starting from the most-significant bit, |
|
1231 | 2-byte field. Bits were allocated starting from the most-significant bit, | |
1343 | hence the reverse ordering and allocation of these flags. |
|
1232 | hence the reverse ordering and allocation of these flags. | |
1344 |
|
1233 | |||
1345 | Changeset Segment |
|
1234 | Changeset Segment | |
1346 | ================= |
|
1235 | ================= | |
1347 |
|
1236 | |||
1348 | The *changeset segment* consists of a single *delta group* holding |
|
1237 | The *changeset segment* consists of a single *delta group* holding | |
1349 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1238 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
1350 | the boundary to the *manifest segment*. |
|
1239 | the boundary to the *manifest segment*. | |
1351 |
|
1240 | |||
1352 | Manifest Segment |
|
1241 | Manifest Segment | |
1353 | ================ |
|
1242 | ================ | |
1354 |
|
1243 | |||
1355 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1244 | The *manifest segment* consists of a single *delta group* holding manifest | |
1356 | data. If treemanifests are in use, it contains only the manifest for the |
|
1245 | data. If treemanifests are in use, it contains only the manifest for the | |
1357 | root directory of the repository. Otherwise, it contains the entire |
|
1246 | root directory of the repository. Otherwise, it contains the entire | |
1358 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1247 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
1359 | the boundary to the next segment (either the *treemanifests segment* or |
|
1248 | the boundary to the next segment (either the *treemanifests segment* or | |
1360 | the *filelogs segment*, depending on version and the request options). |
|
1249 | the *filelogs segment*, depending on version and the request options). | |
1361 |
|
1250 | |||
1362 | Treemanifests Segment |
|
1251 | Treemanifests Segment | |
1363 | --------------------- |
|
1252 | --------------------- | |
1364 |
|
1253 | |||
1365 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1254 | The *treemanifests segment* only exists in changegroup version "3", and | |
1366 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1255 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
1367 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1256 | (it is not possible to use changegroup version 3 outside of bundle2). | |
1368 | Aside from the filenames in the *treemanifests segment* containing a |
|
1257 | Aside from the filenames in the *treemanifests segment* containing a | |
1369 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1258 | trailing "/" character, it behaves identically to the *filelogs segment* | |
1370 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1259 | (see below). The final sub-segment is followed by an *empty chunk* | |
1371 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1260 | (logically, a sub-segment with filename size 0). This denotes the boundary | |
1372 | to the *filelogs segment*. |
|
1261 | to the *filelogs segment*. | |
1373 |
|
1262 | |||
1374 | Filelogs Segment |
|
1263 | Filelogs Segment | |
1375 | ================ |
|
1264 | ================ | |
1376 |
|
1265 | |||
1377 | The *filelogs segment* consists of multiple sub-segments, each |
|
1266 | The *filelogs segment* consists of multiple sub-segments, each | |
1378 | corresponding to an individual file whose data is being described: |
|
1267 | corresponding to an individual file whose data is being described: | |
1379 |
|
1268 | |||
1380 | +--------------------------------------------------+ |
|
1269 | +--------------------------------------------------+ | |
1381 | | | | | | | |
|
1270 | | | | | | | | |
1382 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1271 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
1383 | | | | | | (4 bytes) | |
|
1272 | | | | | | (4 bytes) | | |
1384 | | | | | | | |
|
1273 | | | | | | | | |
1385 | +--------------------------------------------------+ |
|
1274 | +--------------------------------------------------+ | |
1386 |
|
1275 | |||
1387 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1276 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
1388 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1277 | a sub-segment with filename size 0). This denotes the end of the segment | |
1389 | and of the overall changegroup. |
|
1278 | and of the overall changegroup. | |
1390 |
|
1279 | |||
1391 | Each filelog sub-segment consists of the following: |
|
1280 | Each filelog sub-segment consists of the following: | |
1392 |
|
1281 | |||
1393 | +------------------------------------------------------+ |
|
1282 | +------------------------------------------------------+ | |
1394 | | | | | |
|
1283 | | | | | | |
1395 | | filename length | filename | delta group | |
|
1284 | | filename length | filename | delta group | | |
1396 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1285 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
1397 | | | | | |
|
1286 | | | | | | |
1398 | +------------------------------------------------------+ |
|
1287 | +------------------------------------------------------+ | |
1399 |
|
1288 | |||
1400 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1289 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
1401 | followed by N chunks constituting the *delta group* for this file. The |
|
1290 | followed by N chunks constituting the *delta group* for this file. The | |
1402 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1291 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
1403 | next filelog sub-segment. |
|
1292 | next filelog sub-segment. | |
1404 |
|
1293 | |||
1405 | Test list of commands with command with no help text |
|
|||
1406 |
|
||||
1407 | $ hg help helpext |
|
|||
1408 | helpext extension - no help text available |
|
|||
1409 |
|
||||
1410 | list of commands: |
|
|||
1411 |
|
||||
1412 | nohelp (no help text available) |
|
|||
1413 |
|
||||
1414 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
|||
1415 |
|
||||
1416 |
|
||||
1417 | test advanced, deprecated and experimental options are hidden in command help |
|
1294 | test advanced, deprecated and experimental options are hidden in command help | |
1418 | $ hg help debugoptADV |
|
1295 | $ hg help debugoptADV | |
1419 | hg debugoptADV |
|
1296 | hg debugoptADV | |
1420 |
|
1297 | |||
1421 | (no help text available) |
|
1298 | (no help text available) | |
1422 |
|
1299 | |||
1423 | options: |
|
1300 | options: | |
1424 |
|
1301 | |||
1425 | (some details hidden, use --verbose to show complete help) |
|
1302 | (some details hidden, use --verbose to show complete help) | |
1426 | $ hg help debugoptDEP |
|
1303 | $ hg help debugoptDEP | |
1427 | hg debugoptDEP |
|
1304 | hg debugoptDEP | |
1428 |
|
1305 | |||
1429 | (no help text available) |
|
1306 | (no help text available) | |
1430 |
|
1307 | |||
1431 | options: |
|
1308 | options: | |
1432 |
|
1309 | |||
1433 | (some details hidden, use --verbose to show complete help) |
|
1310 | (some details hidden, use --verbose to show complete help) | |
1434 |
|
1311 | |||
1435 | $ hg help debugoptEXP |
|
1312 | $ hg help debugoptEXP | |
1436 | hg debugoptEXP |
|
1313 | hg debugoptEXP | |
1437 |
|
1314 | |||
1438 | (no help text available) |
|
1315 | (no help text available) | |
1439 |
|
1316 | |||
1440 | options: |
|
1317 | options: | |
1441 |
|
1318 | |||
1442 | (some details hidden, use --verbose to show complete help) |
|
1319 | (some details hidden, use --verbose to show complete help) | |
1443 |
|
1320 | |||
1444 | test advanced, deprecated and experimental options are shown with -v |
|
1321 | test advanced, deprecated and experimental options are shown with -v | |
1445 | $ hg help -v debugoptADV | grep aopt |
|
1322 | $ hg help -v debugoptADV | grep aopt | |
1446 | --aopt option is (ADVANCED) |
|
1323 | --aopt option is (ADVANCED) | |
1447 | $ hg help -v debugoptDEP | grep dopt |
|
1324 | $ hg help -v debugoptDEP | grep dopt | |
1448 | --dopt option is (DEPRECATED) |
|
1325 | --dopt option is (DEPRECATED) | |
1449 | $ hg help -v debugoptEXP | grep eopt |
|
1326 | $ hg help -v debugoptEXP | grep eopt | |
1450 | --eopt option is (EXPERIMENTAL) |
|
1327 | --eopt option is (EXPERIMENTAL) | |
1451 |
|
1328 | |||
1452 | #if gettext |
|
1329 | #if gettext | |
1453 | test deprecated option is hidden with translation with untranslated description |
|
1330 | test deprecated option is hidden with translation with untranslated description | |
1454 | (use many globy for not failing on changed transaction) |
|
1331 | (use many globy for not failing on changed transaction) | |
1455 | $ LANGUAGE=sv hg help debugoptDEP |
|
1332 | $ LANGUAGE=sv hg help debugoptDEP | |
1456 | hg debugoptDEP |
|
1333 | hg debugoptDEP | |
1457 |
|
1334 | |||
1458 | (*) (glob) |
|
1335 | (*) (glob) | |
1459 |
|
1336 | |||
1460 | options: |
|
1337 | options: | |
1461 |
|
1338 | |||
1462 | (some details hidden, use --verbose to show complete help) |
|
1339 | (some details hidden, use --verbose to show complete help) | |
1463 | #endif |
|
1340 | #endif | |
1464 |
|
1341 | |||
1465 | Test commands that collide with topics (issue4240) |
|
1342 | Test commands that collide with topics (issue4240) | |
1466 |
|
1343 | |||
1467 | $ hg config -hq |
|
1344 | $ hg config -hq | |
1468 | hg config [-u] [NAME]... |
|
1345 | hg config [-u] [NAME]... | |
1469 |
|
1346 | |||
1470 | show combined config settings from all hgrc files |
|
1347 | show combined config settings from all hgrc files | |
1471 | $ hg showconfig -hq |
|
1348 | $ hg showconfig -hq | |
1472 | hg config [-u] [NAME]... |
|
1349 | hg config [-u] [NAME]... | |
1473 |
|
1350 | |||
1474 | show combined config settings from all hgrc files |
|
1351 | show combined config settings from all hgrc files | |
1475 |
|
1352 | |||
1476 | Test a help topic |
|
1353 | Test a help topic | |
1477 |
|
1354 | |||
1478 | $ hg help dates |
|
1355 | $ hg help dates | |
1479 | Date Formats |
|
1356 | Date Formats | |
1480 | """""""""""" |
|
1357 | """""""""""" | |
1481 |
|
1358 | |||
1482 | Some commands allow the user to specify a date, e.g.: |
|
1359 | Some commands allow the user to specify a date, e.g.: | |
1483 |
|
1360 | |||
1484 | - backout, commit, import, tag: Specify the commit date. |
|
1361 | - backout, commit, import, tag: Specify the commit date. | |
1485 | - log, revert, update: Select revision(s) by date. |
|
1362 | - log, revert, update: Select revision(s) by date. | |
1486 |
|
1363 | |||
1487 | Many date formats are valid. Here are some examples: |
|
1364 | Many date formats are valid. Here are some examples: | |
1488 |
|
1365 | |||
1489 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1366 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
1490 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1367 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
1491 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1368 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
1492 | - "Dec 6" (midnight) |
|
1369 | - "Dec 6" (midnight) | |
1493 | - "13:18" (today assumed) |
|
1370 | - "13:18" (today assumed) | |
1494 | - "3:39" (3:39AM assumed) |
|
1371 | - "3:39" (3:39AM assumed) | |
1495 | - "3:39pm" (15:39) |
|
1372 | - "3:39pm" (15:39) | |
1496 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1373 | - "2006-12-06 13:18:29" (ISO 8601 format) | |
1497 | - "2006-12-6 13:18" |
|
1374 | - "2006-12-6 13:18" | |
1498 | - "2006-12-6" |
|
1375 | - "2006-12-6" | |
1499 | - "12-6" |
|
1376 | - "12-6" | |
1500 | - "12/6" |
|
1377 | - "12/6" | |
1501 | - "12/6/6" (Dec 6 2006) |
|
1378 | - "12/6/6" (Dec 6 2006) | |
1502 | - "today" (midnight) |
|
1379 | - "today" (midnight) | |
1503 | - "yesterday" (midnight) |
|
1380 | - "yesterday" (midnight) | |
1504 | - "now" - right now |
|
1381 | - "now" - right now | |
1505 |
|
1382 | |||
1506 | Lastly, there is Mercurial's internal format: |
|
1383 | Lastly, there is Mercurial's internal format: | |
1507 |
|
|
1384 | ||
1508 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1385 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
1509 |
|
|
1386 | ||
1510 | This is the internal representation format for dates. The first number is |
|
1387 | This is the internal representation format for dates. The first number is | |
1511 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1388 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second | |
1512 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1389 | is the offset of the local timezone, in seconds west of UTC (negative if | |
1513 | the timezone is east of UTC). |
|
1390 | the timezone is east of UTC). | |
1514 |
|
|
1391 | ||
1515 | The log command also accepts date ranges: |
|
1392 | The log command also accepts date ranges: | |
1516 |
|
|
1393 | ||
1517 | - "<DATE" - at or before a given date/time |
|
1394 | - "<DATE" - at or before a given date/time | |
1518 |
|
|
1395 | - ">DATE" - on or after a given date/time | |
1519 | - "DATE to DATE" - a date range, inclusive |
|
1396 | - "DATE to DATE" - a date range, inclusive | |
1520 | - "-DAYS" - within a given number of days of today |
|
1397 | - "-DAYS" - within a given number of days of today | |
1521 |
|
1398 | |||
1522 | Test repeated config section name |
|
1399 | Test repeated config section name | |
1523 |
|
1400 | |||
1524 | $ hg help config.host |
|
1401 | $ hg help config.host | |
1525 | "http_proxy.host" |
|
1402 | "http_proxy.host" | |
1526 | Host name and (optional) port of the proxy server, for example |
|
1403 | Host name and (optional) port of the proxy server, for example | |
1527 | "myproxy:8000". |
|
1404 | "myproxy:8000". | |
1528 |
|
|
1405 | ||
1529 | "smtp.host" |
|
1406 | "smtp.host" | |
1530 | Host name of mail server, e.g. "mail.example.com". |
|
1407 | Host name of mail server, e.g. "mail.example.com". | |
1531 |
|
|
1408 | ||
1532 |
|
1409 | |||
1533 | Test section name with dot |
|
1410 | Test section name with dot | |
1534 |
|
1411 | |||
1535 | $ hg help config.ui.username |
|
1412 | $ hg help config.ui.username | |
1536 | "ui.username" |
|
1413 | "ui.username" | |
1537 | The committer of a changeset created when running "commit". Typically |
|
1414 | The committer of a changeset created when running "commit". Typically | |
1538 |
a |
|
1415 | a person's name and email address, e.g. "Fred Widget | |
1539 | <fred@example.com>". Environment variables in the username are |
|
1416 | <fred@example.com>". Environment variables in the username are | |
1540 | expanded. |
|
1417 | expanded. | |
1541 |
|
1418 | |||
1542 | (default: "$EMAIL" or "username@hostname". If the username in hgrc is |
|
1419 | (default: "$EMAIL" or "username@hostname". If the username in hgrc is | |
1543 | empty, e.g. if the system admin set "username =" in the system hgrc, |
|
1420 | empty, e.g. if the system admin set "username =" in the system hgrc, | |
1544 | it has to be specified manually or in a different hgrc file) |
|
1421 | it has to be specified manually or in a different hgrc file) | |
1545 |
|
1422 | |||
1546 |
|
1423 | |||
1547 | $ hg help config.annotate.git |
|
1424 | $ hg help config.annotate.git | |
1548 | abort: help section not found: config.annotate.git |
|
1425 | abort: help section not found: config.annotate.git | |
1549 | [255] |
|
1426 | [255] | |
1550 |
|
1427 | |||
1551 | $ hg help config.update.check |
|
1428 | $ hg help config.update.check | |
1552 | "commands.update.check" |
|
1429 | "commands.update.check" | |
1553 |
Determines what level of checking 'hg |
|
1430 | Determines what level of checking 'hg update' will perform before | |
1554 | moving to a destination revision. Valid values are "abort", "none", |
|
1431 | moving to a destination revision. Valid values are "abort", "none", | |
1555 | "linear", and "noconflict". "abort" always fails if the working |
|
1432 | "linear", and "noconflict". "abort" always fails if the working | |
1556 | directory has uncommitted changes. "none" performs no checking, and |
|
1433 | directory has uncommitted changes. "none" performs no checking, and | |
1557 | may result in a merge with uncommitted changes. "linear" allows any |
|
1434 | may result in a merge with uncommitted changes. "linear" allows any | |
1558 | update as long as it follows a straight line in the revision history, |
|
1435 | update as long as it follows a straight line in the revision history, | |
1559 | and may trigger a merge with uncommitted changes. "noconflict" will |
|
1436 | and may trigger a merge with uncommitted changes. "noconflict" will | |
1560 | allow any update which would not trigger a merge with uncommitted |
|
1437 | allow any update which would not trigger a merge with uncommitted | |
1561 | changes, if any are present. (default: "linear") |
|
1438 | changes, if any are present. (default: "linear") | |
1562 |
|
1439 | |||
1563 |
|
1440 | |||
1564 | $ hg help config.commands.update.check |
|
1441 | $ hg help config.commands.update.check | |
1565 | "commands.update.check" |
|
1442 | "commands.update.check" | |
1566 |
Determines what level of checking 'hg |
|
1443 | Determines what level of checking 'hg update' will perform before | |
1567 | moving to a destination revision. Valid values are "abort", "none", |
|
1444 | moving to a destination revision. Valid values are "abort", "none", | |
1568 | "linear", and "noconflict". "abort" always fails if the working |
|
1445 | "linear", and "noconflict". "abort" always fails if the working | |
1569 | directory has uncommitted changes. "none" performs no checking, and |
|
1446 | directory has uncommitted changes. "none" performs no checking, and | |
1570 | may result in a merge with uncommitted changes. "linear" allows any |
|
1447 | may result in a merge with uncommitted changes. "linear" allows any | |
1571 | update as long as it follows a straight line in the revision history, |
|
1448 | update as long as it follows a straight line in the revision history, | |
1572 | and may trigger a merge with uncommitted changes. "noconflict" will |
|
1449 | and may trigger a merge with uncommitted changes. "noconflict" will | |
1573 | allow any update which would not trigger a merge with uncommitted |
|
1450 | allow any update which would not trigger a merge with uncommitted | |
1574 | changes, if any are present. (default: "linear") |
|
1451 | changes, if any are present. (default: "linear") | |
1575 |
|
1452 | |||
1576 |
|
1453 | |||
1577 | $ hg help config.ommands.update.check |
|
1454 | $ hg help config.ommands.update.check | |
1578 | abort: help section not found: config.ommands.update.check |
|
1455 | abort: help section not found: config.ommands.update.check | |
1579 | [255] |
|
1456 | [255] | |
1580 |
|
1457 | |||
1581 | Unrelated trailing paragraphs shouldn't be included |
|
1458 | Unrelated trailing paragraphs shouldn't be included | |
1582 |
|
1459 | |||
1583 |
$ |
|
1460 | $ hg help config.extramsg | grep '^$' | |
1584 |
|
|
1461 | ||
1585 |
|
1462 | |||
1586 | Test capitalized section name |
|
1463 | Test capitalized section name | |
1587 |
|
1464 | |||
1588 | $ hg help scripting.HGPLAIN > /dev/null |
|
1465 | $ hg help scripting.HGPLAIN > /dev/null | |
1589 |
|
1466 | |||
1590 | Help subsection: |
|
1467 | Help subsection: | |
1591 |
|
1468 | |||
1592 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1469 | $ hg help config.charsets |grep "Email example:" > /dev/null | |
1593 | [1] |
|
1470 | [1] | |
1594 |
|
1471 | |||
1595 | Show nested definitions |
|
1472 | Show nested definitions | |
1596 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1473 | ("profiling.type"[break]"ls"[break]"stat"[break]) | |
1597 |
|
1474 | |||
1598 |
$ |
|
1475 | $ hg help config.type | egrep '^$'|wc -l | |
1599 | \s*3 (re) |
|
1476 | \s*3 (re) | |
1600 |
|
1477 | |||
1601 | $ hg help config.profiling.type.ls |
|
1478 | $ hg help config.profiling.type.ls | |
1602 | "profiling.type.ls" |
|
1479 | "profiling.type.ls" | |
1603 |
|
|
1480 | Use Python's built-in instrumenting profiler. This profiler works on | |
1604 | all platforms, but each line number it reports is the first line of |
|
1481 | all platforms, but each line number it reports is the first line of | |
1605 | a function. This restriction makes it difficult to identify the |
|
1482 | a function. This restriction makes it difficult to identify the | |
1606 | expensive parts of a non-trivial function. |
|
1483 | expensive parts of a non-trivial function. | |
1607 |
|
1484 | |||
1608 |
|
1485 | |||
1609 | Separate sections from subsections |
|
1486 | Separate sections from subsections | |
1610 |
|
1487 | |||
1611 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1488 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq | |
1612 | "format" |
|
1489 | "format" | |
1613 | -------- |
|
1490 | -------- | |
1614 |
|
1491 | |||
1615 | "usegeneraldelta" |
|
1492 | "usegeneraldelta" | |
1616 |
|
1493 | |||
1617 | "dotencode" |
|
1494 | "dotencode" | |
1618 |
|
1495 | |||
1619 | "usefncache" |
|
1496 | "usefncache" | |
1620 |
|
1497 | |||
1621 | "usestore" |
|
1498 | "usestore" | |
1622 |
|
1499 | |||
1623 | "profiling" |
|
1500 | "profiling" | |
1624 | ----------- |
|
1501 | ----------- | |
1625 |
|
1502 | |||
1626 | "format" |
|
1503 | "format" | |
1627 |
|
1504 | |||
1628 | "progress" |
|
1505 | "progress" | |
1629 | ---------- |
|
1506 | ---------- | |
1630 |
|
1507 | |||
1631 | "format" |
|
1508 | "format" | |
1632 |
|
1509 | |||
1633 |
|
1510 | |||
1634 | Last item in help config.*: |
|
1511 | Last item in help config.*: | |
1635 |
|
1512 | |||
1636 |
$ hg help config.`hg help config|grep |
|
1513 | $ hg help config.`hg help config|grep '^ "'| \ | |
1637 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1514 | > tail -1|sed 's![ "]*!!g'`| \ | |
1638 | > grep 'hg help -c config' > /dev/null |
|
1515 | > grep 'hg help -c config' > /dev/null | |
1639 | [1] |
|
1516 | [1] | |
1640 |
|
1517 | |||
1641 | note to use help -c for general hg help config: |
|
1518 | note to use help -c for general hg help config: | |
1642 |
|
1519 | |||
1643 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1520 | $ hg help config |grep 'hg help -c config' > /dev/null | |
1644 |
|
1521 | |||
1645 | Test templating help |
|
1522 | Test templating help | |
1646 |
|
1523 | |||
1647 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1524 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
1648 | desc String. The text of the changeset description. |
|
1525 | desc String. The text of the changeset description. | |
1649 | diffstat String. Statistics of changes with the following format: |
|
1526 | diffstat String. Statistics of changes with the following format: | |
1650 | firstline Any text. Returns the first line of text. |
|
1527 | firstline Any text. Returns the first line of text. | |
1651 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1528 | nonempty Any text. Returns '(none)' if the string is empty. | |
1652 |
|
1529 | |||
1653 | Test deprecated items |
|
1530 | Test deprecated items | |
1654 |
|
1531 | |||
1655 | $ hg help -v templating | grep currentbookmark |
|
1532 | $ hg help -v templating | grep currentbookmark | |
1656 | currentbookmark |
|
1533 | currentbookmark | |
1657 | $ hg help templating | (grep currentbookmark || true) |
|
1534 | $ hg help templating | (grep currentbookmark || true) | |
1658 |
|
1535 | |||
1659 | Test help hooks |
|
1536 | Test help hooks | |
1660 |
|
1537 | |||
1661 | $ cat > helphook1.py <<EOF |
|
1538 | $ cat > helphook1.py <<EOF | |
1662 |
> from |
|
1539 | > from mercurial import help | |
1663 | > |
|
1540 | > | |
1664 |
> def |
|
1541 | > def rewrite(ui, topic, doc): | |
1665 |
|
|
1542 | > return doc + b'\nhelphook1\n' | |
1666 | > |
|
1543 | > | |
1667 |
> def |
|
1544 | > def extsetup(ui): | |
1668 |
|
|
1545 | > help.addtopichook(b'revisions', rewrite) | |
1669 |
|
|
1546 | > EOF | |
1670 |
$ |
|
1547 | $ cat > helphook2.py <<EOF | |
1671 |
> from |
|
1548 | > from mercurial import help | |
1672 | > |
|
1549 | > | |
1673 |
> def |
|
1550 | > def rewrite(ui, topic, doc): | |
1674 |
|
|
1551 | > return doc + b'\nhelphook2\n' | |
1675 | > |
|
1552 | > | |
1676 |
> def |
|
1553 | > def extsetup(ui): | |
1677 |
|
|
1554 | > help.addtopichook(b'revisions', rewrite) | |
1678 |
|
|
1555 | > EOF | |
1679 |
$ |
|
1556 | $ echo '[extensions]' >> $HGRCPATH | |
1680 |
$ echo "helphook1 |
|
1557 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
1681 |
$ echo "helphook2 |
|
1558 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
1682 | $ hg help revsets | grep helphook |
|
1559 | $ hg help revsets | grep helphook | |
1683 | helphook1 |
|
1560 | helphook1 | |
1684 | helphook2 |
|
1561 | helphook2 | |
1685 |
|
1562 | |||
1686 | help -c should only show debug --debug |
|
1563 | help -c should only show debug --debug | |
1687 |
|
1564 | |||
1688 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1565 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' | |
1689 | [1] |
|
1566 | [1] | |
1690 |
|
1567 | |||
1691 | help -c should only show deprecated for -v |
|
1568 | help -c should only show deprecated for -v | |
1692 |
|
1569 | |||
1693 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1570 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' | |
1694 | [1] |
|
1571 | [1] | |
1695 |
|
1572 | |||
1696 | Test -s / --system |
|
1573 | Test -s / --system | |
1697 |
|
1574 | |||
1698 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1575 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ | |
1699 | > wc -l | sed -e 's/ //g' |
|
1576 | > wc -l | sed -e 's/ //g' | |
1700 | 0 |
|
1577 | 0 | |
1701 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1578 | $ hg help config.files --system unix | grep 'USER' | \ | |
1702 | > wc -l | sed -e 's/ //g' |
|
1579 | > wc -l | sed -e 's/ //g' | |
1703 | 0 |
|
1580 | 0 | |
1704 |
|
1581 | |||
1705 | Test -e / -c / -k combinations |
|
1582 | Test -e / -c / -k combinations | |
1706 |
|
1583 | |||
1707 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1584 | $ hg help -c|egrep '^[A-Z].*:|^ debug' | |
1708 | Commands: |
|
1585 | Commands: | |
1709 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1586 | $ hg help -e|egrep '^[A-Z].*:|^ debug' | |
1710 | Extensions: |
|
1587 | Extensions: | |
1711 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1588 | $ hg help -k|egrep '^[A-Z].*:|^ debug' | |
1712 | Topics: |
|
1589 | Topics: | |
1713 | Commands: |
|
1590 | Commands: | |
1714 | Extensions: |
|
1591 | Extensions: | |
1715 | Extension Commands: |
|
1592 | Extension Commands: | |
1716 | $ hg help -c schemes |
|
1593 | $ hg help -c schemes | |
1717 | abort: no such help topic: schemes |
|
1594 | abort: no such help topic: schemes | |
1718 | (try 'hg help --keyword schemes') |
|
1595 | (try 'hg help --keyword schemes') | |
1719 | [255] |
|
1596 | [255] | |
1720 | $ hg help -e schemes |head -1 |
|
1597 | $ hg help -e schemes |head -1 | |
1721 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1598 | schemes extension - extend schemes with shortcuts to repository swarms | |
1722 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1599 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' | |
1723 | Commands: |
|
1600 | Commands: | |
1724 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1601 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' | |
1725 | Extensions: |
|
1602 | Extensions: | |
1726 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1603 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' | |
1727 | Extensions: |
|
1604 | Extensions: | |
1728 | Commands: |
|
1605 | Commands: | |
1729 | $ hg help -c commit > /dev/null |
|
1606 | $ hg help -c commit > /dev/null | |
1730 | $ hg help -e -c commit > /dev/null |
|
1607 | $ hg help -e -c commit > /dev/null | |
1731 | $ hg help -e commit |
|
1608 | $ hg help -e commit | |
1732 | abort: no such help topic: commit |
|
1609 | abort: no such help topic: commit | |
1733 | (try 'hg help --keyword commit') |
|
1610 | (try 'hg help --keyword commit') | |
1734 | [255] |
|
1611 | [255] | |
1735 |
|
1612 | |||
1736 | Test keyword search help |
|
1613 | Test keyword search help | |
1737 |
|
1614 | |||
1738 | $ cat > prefixedname.py <<EOF |
|
1615 | $ cat > prefixedname.py <<EOF | |
1739 | > '''matched against word "clone" |
|
1616 | > '''matched against word "clone" | |
1740 | > ''' |
|
1617 | > ''' | |
1741 | > EOF |
|
1618 | > EOF | |
1742 |
$ |
|
1619 | $ echo '[extensions]' >> $HGRCPATH | |
1743 |
$ echo "dot.dot.prefixedname |
|
1620 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | |
1744 | $ hg help -k clone |
|
1621 | $ hg help -k clone | |
1745 | Topics: |
|
1622 | Topics: | |
1746 |
|
1623 | |||
1747 | config Configuration Files |
|
1624 | config Configuration Files | |
1748 | extensions Using Additional Features |
|
1625 | extensions Using Additional Features | |
1749 | glossary Glossary |
|
1626 | glossary Glossary | |
1750 | phases Working with Phases |
|
1627 | phases Working with Phases | |
1751 | subrepos Subrepositories |
|
1628 | subrepos Subrepositories | |
1752 | urls URL Paths |
|
1629 | urls URL Paths | |
1753 |
|
1630 | |||
1754 | Commands: |
|
1631 | Commands: | |
1755 |
|
1632 | |||
1756 | bookmarks create a new bookmark or list existing bookmarks |
|
1633 | bookmarks create a new bookmark or list existing bookmarks | |
1757 | clone make a copy of an existing repository |
|
1634 | clone make a copy of an existing repository | |
1758 | paths show aliases for remote repositories |
|
1635 | paths show aliases for remote repositories | |
1759 | pull pull changes from the specified source |
|
1636 | pull pull changes from the specified source | |
1760 | update update working directory (or switch revisions) |
|
1637 | update update working directory (or switch revisions) | |
1761 |
|
1638 | |||
1762 | Extensions: |
|
1639 | Extensions: | |
1763 |
|
1640 | |||
1764 | clonebundles advertise pre-generated bundles to seed clones |
|
1641 | clonebundles advertise pre-generated bundles to seed clones | |
1765 | narrow create clones which fetch history data for subset of files |
|
1642 | narrow create clones which fetch history data for subset of files | |
1766 | (EXPERIMENTAL) |
|
1643 | (EXPERIMENTAL) | |
1767 | prefixedname matched against word "clone" |
|
1644 | prefixedname matched against word "clone" | |
1768 | relink recreates hardlinks between repository clones |
|
1645 | relink recreates hardlinks between repository clones | |
1769 |
|
1646 | |||
1770 | Extension Commands: |
|
1647 | Extension Commands: | |
1771 |
|
1648 | |||
1772 | qclone clone main and patch repository at same time |
|
1649 | qclone clone main and patch repository at same time | |
1773 |
|
1650 | |||
1774 | Test unfound topic |
|
1651 | Test unfound topic | |
1775 |
|
1652 | |||
1776 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1653 | $ hg help nonexistingtopicthatwillneverexisteverever | |
1777 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1654 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever | |
1778 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1655 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') | |
1779 | [255] |
|
1656 | [255] | |
1780 |
|
1657 | |||
1781 | Test unfound keyword |
|
1658 | Test unfound keyword | |
1782 |
|
1659 | |||
1783 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1660 | $ hg help --keyword nonexistingwordthatwillneverexisteverever | |
1784 | abort: no matches |
|
1661 | abort: no matches | |
1785 | (try 'hg help' for a list of topics) |
|
1662 | (try 'hg help' for a list of topics) | |
1786 | [255] |
|
1663 | [255] | |
1787 |
|
1664 | |||
1788 | Test omit indicating for help |
|
1665 | Test omit indicating for help | |
1789 |
|
1666 | |||
1790 | $ cat > addverboseitems.py <<EOF |
|
1667 | $ cat > addverboseitems.py <<EOF | |
1791 | > '''extension to test omit indicating. |
|
1668 | > '''extension to test omit indicating. | |
1792 | > |
|
1669 | > | |
1793 | > This paragraph is never omitted (for extension) |
|
1670 | > This paragraph is never omitted (for extension) | |
1794 | > |
|
1671 | > | |
1795 | > .. container:: verbose |
|
1672 | > .. container:: verbose | |
1796 | > |
|
1673 | > | |
1797 | > This paragraph is omitted, |
|
1674 | > This paragraph is omitted, | |
1798 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1675 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | |
1799 | > |
|
1676 | > | |
1800 | > This paragraph is never omitted, too (for extension) |
|
1677 | > This paragraph is never omitted, too (for extension) | |
1801 | > ''' |
|
1678 | > ''' | |
1802 |
> from |
|
1679 | > from __future__ import absolute_import | |
1803 |
> from |
|
1680 | > from mercurial import commands, help | |
1804 |
> testtopic = b |
|
1681 | > testtopic = b"""This paragraph is never omitted (for topic). | |
1805 | > |
|
1682 | > | |
1806 | > .. container:: verbose |
|
1683 | > .. container:: verbose | |
1807 | > |
|
1684 | > | |
1808 | > This paragraph is omitted, |
|
1685 | > This paragraph is omitted, | |
1809 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1686 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | |
1810 | > |
|
1687 | > | |
1811 | > This paragraph is never omitted, too (for topic) |
|
1688 | > This paragraph is never omitted, too (for topic) | |
1812 | > """ |
|
1689 | > """ | |
1813 |
> def |
|
1690 | > def extsetup(ui): | |
1814 |
|
|
1691 | > help.helptable.append(([b"topic-containing-verbose"], | |
1815 |
> b |
|
1692 | > b"This is the topic to test omit indicating.", | |
1816 |
> lambda ui: |
|
1693 | > lambda ui: testtopic)) | |
1817 |
|
|
1694 | > EOF | |
1818 |
$ |
|
1695 | $ echo '[extensions]' >> $HGRCPATH | |
1819 |
$ echo "addverboseitems |
|
1696 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | |
1820 | $ hg help addverboseitems |
|
1697 | $ hg help addverboseitems | |
1821 | addverboseitems extension - extension to test omit indicating. |
|
1698 | addverboseitems extension - extension to test omit indicating. | |
1822 |
|
1699 | |||
1823 | This paragraph is never omitted (for extension) |
|
1700 | This paragraph is never omitted (for extension) | |
1824 |
|
1701 | |||
1825 | This paragraph is never omitted, too (for extension) |
|
1702 | This paragraph is never omitted, too (for extension) | |
1826 |
|
1703 | |||
1827 | (some details hidden, use --verbose to show complete help) |
|
1704 | (some details hidden, use --verbose to show complete help) | |
1828 |
|
1705 | |||
1829 | no commands defined |
|
1706 | no commands defined | |
1830 | $ hg help -v addverboseitems |
|
1707 | $ hg help -v addverboseitems | |
1831 | addverboseitems extension - extension to test omit indicating. |
|
1708 | addverboseitems extension - extension to test omit indicating. | |
1832 |
|
1709 | |||
1833 | This paragraph is never omitted (for extension) |
|
1710 | This paragraph is never omitted (for extension) | |
1834 |
|
1711 | |||
1835 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1712 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1836 | extension) |
|
1713 | extension) | |
1837 |
|
1714 | |||
1838 | This paragraph is never omitted, too (for extension) |
|
1715 | This paragraph is never omitted, too (for extension) | |
1839 |
|
1716 | |||
1840 | no commands defined |
|
1717 | no commands defined | |
1841 | $ hg help topic-containing-verbose |
|
1718 | $ hg help topic-containing-verbose | |
1842 | This is the topic to test omit indicating. |
|
1719 | This is the topic to test omit indicating. | |
1843 |
|
|
1720 | """""""""""""""""""""""""""""""""""""""""" | |
1844 |
|
1721 | |||
1845 | This paragraph is never omitted (for topic). |
|
1722 | This paragraph is never omitted (for topic). | |
1846 |
|
1723 | |||
1847 | This paragraph is never omitted, too (for topic) |
|
1724 | This paragraph is never omitted, too (for topic) | |
1848 |
|
1725 | |||
1849 | (some details hidden, use --verbose to show complete help) |
|
1726 | (some details hidden, use --verbose to show complete help) | |
1850 | $ hg help -v topic-containing-verbose |
|
1727 | $ hg help -v topic-containing-verbose | |
1851 | This is the topic to test omit indicating. |
|
1728 | This is the topic to test omit indicating. | |
1852 | """""""""""""""""""""""""""""""""""""""""" |
|
1729 | """""""""""""""""""""""""""""""""""""""""" | |
1853 |
|
1730 | |||
1854 | This paragraph is never omitted (for topic). |
|
1731 | This paragraph is never omitted (for topic). | |
1855 |
|
1732 | |||
1856 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1733 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1857 | topic) |
|
1734 | topic) | |
1858 |
|
1735 | |||
1859 | This paragraph is never omitted, too (for topic) |
|
1736 | This paragraph is never omitted, too (for topic) | |
1860 |
|
1737 | |||
1861 | Test section lookup |
|
1738 | Test section lookup | |
1862 |
|
1739 | |||
1863 | $ hg help revset.merge |
|
1740 | $ hg help revset.merge | |
1864 | "merge()" |
|
1741 | "merge()" | |
1865 | Changeset is a merge changeset. |
|
1742 | Changeset is a merge changeset. | |
1866 |
|
1743 | |||
1867 | $ hg help glossary.dag |
|
1744 | $ hg help glossary.dag | |
1868 | DAG |
|
1745 | DAG | |
1869 | The repository of changesets of a distributed version control system |
|
1746 | The repository of changesets of a distributed version control system | |
1870 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1747 | (DVCS) can be described as a directed acyclic graph (DAG), consisting | |
1871 | of nodes and edges, where nodes correspond to changesets and edges |
|
1748 | of nodes and edges, where nodes correspond to changesets and edges | |
1872 | imply a parent -> child relation. This graph can be visualized by |
|
1749 | imply a parent -> child relation. This graph can be visualized by | |
1873 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1750 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is | |
1874 | limited by the requirement for children to have at most two parents. |
|
1751 | limited by the requirement for children to have at most two parents. | |
1875 |
|
1752 | |||
1876 |
|
1753 | |||
1877 | $ hg help hgrc.paths |
|
1754 | $ hg help hgrc.paths | |
1878 | "paths" |
|
1755 | "paths" | |
1879 | ------- |
|
1756 | ------- | |
1880 |
|
1757 | |||
1881 | Assigns symbolic names and behavior to repositories. |
|
1758 | Assigns symbolic names and behavior to repositories. | |
1882 |
|
1759 | |||
1883 | Options are symbolic names defining the URL or directory that is the |
|
1760 | Options are symbolic names defining the URL or directory that is the | |
1884 | location of the repository. Example: |
|
1761 | location of the repository. Example: | |
1885 |
|
1762 | |||
1886 | [paths] |
|
1763 | [paths] | |
1887 | my_server = https://example.com/my_repo |
|
1764 | my_server = https://example.com/my_repo | |
1888 | local_path = /home/me/repo |
|
1765 | local_path = /home/me/repo | |
1889 |
|
1766 | |||
1890 | These symbolic names can be used from the command line. To pull from |
|
1767 | These symbolic names can be used from the command line. To pull from | |
1891 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1768 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push | |
1892 | local_path'. |
|
1769 | local_path'. | |
1893 |
|
1770 | |||
1894 | Options containing colons (":") denote sub-options that can influence |
|
1771 | Options containing colons (":") denote sub-options that can influence | |
1895 | behavior for that specific path. Example: |
|
1772 | behavior for that specific path. Example: | |
1896 |
|
1773 | |||
1897 | [paths] |
|
1774 | [paths] | |
1898 | my_server = https://example.com/my_path |
|
1775 | my_server = https://example.com/my_path | |
1899 | my_server:pushurl = ssh://example.com/my_path |
|
1776 | my_server:pushurl = ssh://example.com/my_path | |
1900 |
|
1777 | |||
1901 | The following sub-options can be defined: |
|
1778 | The following sub-options can be defined: | |
1902 |
|
1779 | |||
1903 | "pushurl" |
|
1780 | "pushurl" | |
1904 | The URL to use for push operations. If not defined, the location |
|
1781 | The URL to use for push operations. If not defined, the location | |
1905 | defined by the path's main entry is used. |
|
1782 | defined by the path's main entry is used. | |
1906 |
|
1783 | |||
1907 | "pushrev" |
|
1784 | "pushrev" | |
1908 | A revset defining which revisions to push by default. |
|
1785 | A revset defining which revisions to push by default. | |
1909 |
|
1786 | |||
1910 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1787 | When 'hg push' is executed without a "-r" argument, the revset defined | |
1911 | by this sub-option is evaluated to determine what to push. |
|
1788 | by this sub-option is evaluated to determine what to push. | |
1912 |
|
1789 | |||
1913 | For example, a value of "." will push the working directory's revision |
|
1790 | For example, a value of "." will push the working directory's revision | |
1914 | by default. |
|
1791 | by default. | |
1915 |
|
1792 | |||
1916 | Revsets specifying bookmarks will not result in the bookmark being |
|
1793 | Revsets specifying bookmarks will not result in the bookmark being | |
1917 | pushed. |
|
1794 | pushed. | |
1918 |
|
1795 | |||
1919 | The following special named paths exist: |
|
1796 | The following special named paths exist: | |
1920 |
|
1797 | |||
1921 | "default" |
|
1798 | "default" | |
1922 | The URL or directory to use when no source or remote is specified. |
|
1799 | The URL or directory to use when no source or remote is specified. | |
1923 |
|
1800 | |||
1924 | 'hg clone' will automatically define this path to the location the |
|
1801 | 'hg clone' will automatically define this path to the location the | |
1925 | repository was cloned from. |
|
1802 | repository was cloned from. | |
1926 |
|
1803 | |||
1927 | "default-push" |
|
1804 | "default-push" | |
1928 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1805 | (deprecated) The URL or directory for the default 'hg push' location. | |
1929 | "default:pushurl" should be used instead. |
|
1806 | "default:pushurl" should be used instead. | |
1930 |
|
1807 | |||
1931 | $ hg help glossary.mcguffin |
|
1808 | $ hg help glossary.mcguffin | |
1932 | abort: help section not found: glossary.mcguffin |
|
1809 | abort: help section not found: glossary.mcguffin | |
1933 | [255] |
|
1810 | [255] | |
1934 |
|
1811 | |||
1935 | $ hg help glossary.mc.guffin |
|
1812 | $ hg help glossary.mc.guffin | |
1936 | abort: help section not found: glossary.mc.guffin |
|
1813 | abort: help section not found: glossary.mc.guffin | |
1937 | [255] |
|
1814 | [255] | |
1938 |
|
1815 | |||
1939 | $ hg help template.files |
|
1816 | $ hg help template.files | |
1940 | files List of strings. All files modified, added, or removed by |
|
1817 | files List of strings. All files modified, added, or removed by | |
1941 | this changeset. |
|
1818 | this changeset. | |
1942 | files(pattern) |
|
1819 | files(pattern) | |
1943 | All files of the current changeset matching the pattern. See |
|
1820 | All files of the current changeset matching the pattern. See | |
1944 | 'hg help patterns'. |
|
1821 | 'hg help patterns'. | |
1945 |
|
1822 | |||
1946 | Test section lookup by translated message |
|
1823 | Test section lookup by translated message | |
1947 |
|
1824 | |||
1948 | str.lower() instead of encoding.lower(str) on translated message might |
|
1825 | str.lower() instead of encoding.lower(str) on translated message might | |
1949 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1826 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) | |
1950 | as the second or later byte of multi-byte character. |
|
1827 | as the second or later byte of multi-byte character. | |
1951 |
|
1828 | |||
1952 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1829 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) | |
1953 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1830 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this | |
1954 | replacement makes message meaningless. |
|
1831 | replacement makes message meaningless. | |
1955 |
|
1832 | |||
1956 | This tests that section lookup by translated string isn't broken by |
|
1833 | This tests that section lookup by translated string isn't broken by | |
1957 | such str.lower(). |
|
1834 | such str.lower(). | |
1958 |
|
1835 | |||
1959 | $ "$PYTHON" <<EOF |
|
1836 | $ "$PYTHON" <<EOF | |
1960 | > def escape(s): |
|
1837 | > def escape(s): | |
1961 | > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1838 | > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) | |
1962 | > # translation of "record" in ja_JP.cp932 |
|
1839 | > # translation of "record" in ja_JP.cp932 | |
1963 | > upper = b"\x8bL\x98^" |
|
1840 | > upper = b"\x8bL\x98^" | |
1964 | > # str.lower()-ed section name should be treated as different one |
|
1841 | > # str.lower()-ed section name should be treated as different one | |
1965 | > lower = b"\x8bl\x98^" |
|
1842 | > lower = b"\x8bl\x98^" | |
1966 | > with open('ambiguous.py', 'wb') as fp: |
|
1843 | > with open('ambiguous.py', 'wb') as fp: | |
1967 | > fp.write(b"""# ambiguous section names in ja_JP.cp932 |
|
1844 | > fp.write(b"""# ambiguous section names in ja_JP.cp932 | |
1968 | > u'''summary of extension |
|
1845 | > u'''summary of extension | |
1969 | > |
|
1846 | > | |
1970 | > %s |
|
1847 | > %s | |
1971 | > ---- |
|
1848 | > ---- | |
1972 | > |
|
1849 | > | |
1973 | > Upper name should show only this message |
|
1850 | > Upper name should show only this message | |
1974 | > |
|
1851 | > | |
1975 | > %s |
|
1852 | > %s | |
1976 | > ---- |
|
1853 | > ---- | |
1977 | > |
|
1854 | > | |
1978 | > Lower name should show only this message |
|
1855 | > Lower name should show only this message | |
1979 | > |
|
1856 | > | |
1980 | > subsequent section |
|
1857 | > subsequent section | |
1981 | > ------------------ |
|
1858 | > ------------------ | |
1982 | > |
|
1859 | > | |
1983 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1860 | > This should be hidden at 'hg help ambiguous' with section name. | |
1984 | > ''' |
|
1861 | > ''' | |
1985 | > """ % (escape(upper), escape(lower))) |
|
1862 | > """ % (escape(upper), escape(lower))) | |
1986 | > EOF |
|
1863 | > EOF | |
1987 |
|
1864 | |||
1988 | $ cat >> $HGRCPATH <<EOF |
|
1865 | $ cat >> $HGRCPATH <<EOF | |
1989 | > [extensions] |
|
1866 | > [extensions] | |
1990 | > ambiguous = ./ambiguous.py |
|
1867 | > ambiguous = ./ambiguous.py | |
1991 | > EOF |
|
1868 | > EOF | |
1992 |
|
1869 | |||
1993 | $ "$PYTHON" <<EOF | sh |
|
1870 | $ "$PYTHON" <<EOF | sh | |
1994 | > from mercurial import pycompat |
|
1871 | > from mercurial import pycompat | |
1995 | > upper = b"\x8bL\x98^" |
|
1872 | > upper = b"\x8bL\x98^" | |
1996 | > pycompat.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper) |
|
1873 | > pycompat.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper) | |
1997 | > EOF |
|
1874 | > EOF | |
1998 | \x8bL\x98^ (esc) |
|
1875 | \x8bL\x98^ (esc) | |
1999 | ---- |
|
1876 | ---- | |
2000 |
|
1877 | |||
2001 | Upper name should show only this message |
|
1878 | Upper name should show only this message | |
2002 |
|
1879 | |||
2003 |
|
1880 | |||
2004 | $ "$PYTHON" <<EOF | sh |
|
1881 | $ "$PYTHON" <<EOF | sh | |
2005 | > from mercurial import pycompat |
|
1882 | > from mercurial import pycompat | |
2006 | > lower = b"\x8bl\x98^" |
|
1883 | > lower = b"\x8bl\x98^" | |
2007 | > pycompat.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower) |
|
1884 | > pycompat.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower) | |
2008 | > EOF |
|
1885 | > EOF | |
2009 | \x8bl\x98^ (esc) |
|
1886 | \x8bl\x98^ (esc) | |
2010 | ---- |
|
1887 | ---- | |
2011 |
|
1888 | |||
2012 | Lower name should show only this message |
|
1889 | Lower name should show only this message | |
2013 |
|
1890 | |||
2014 |
|
1891 | |||
2015 | $ cat >> $HGRCPATH <<EOF |
|
1892 | $ cat >> $HGRCPATH <<EOF | |
2016 | > [extensions] |
|
1893 | > [extensions] | |
2017 | > ambiguous = ! |
|
1894 | > ambiguous = ! | |
2018 | > EOF |
|
1895 | > EOF | |
2019 |
|
1896 | |||
2020 | Show help content of disabled extensions |
|
1897 | Show help content of disabled extensions | |
2021 |
|
1898 | |||
2022 | $ cat >> $HGRCPATH <<EOF |
|
1899 | $ cat >> $HGRCPATH <<EOF | |
2023 | > [extensions] |
|
1900 | > [extensions] | |
2024 | > ambiguous = !./ambiguous.py |
|
1901 | > ambiguous = !./ambiguous.py | |
2025 | > EOF |
|
1902 | > EOF | |
2026 | $ hg help -e ambiguous |
|
1903 | $ hg help -e ambiguous | |
2027 | ambiguous extension - (no help text available) |
|
1904 | ambiguous extension - (no help text available) | |
2028 |
|
1905 | |||
2029 | (use 'hg help extensions' for information on enabling extensions) |
|
1906 | (use 'hg help extensions' for information on enabling extensions) | |
2030 |
|
1907 | |||
2031 | Test dynamic list of merge tools only shows up once |
|
1908 | Test dynamic list of merge tools only shows up once | |
2032 | $ hg help merge-tools |
|
1909 | $ hg help merge-tools | |
2033 | Merge Tools |
|
1910 | Merge Tools | |
2034 | """"""""""" |
|
1911 | """"""""""" | |
2035 |
|
1912 | |||
2036 | To merge files Mercurial uses merge tools. |
|
1913 | To merge files Mercurial uses merge tools. | |
2037 |
|
1914 | |||
2038 | A merge tool combines two different versions of a file into a merged file. |
|
1915 | A merge tool combines two different versions of a file into a merged file. | |
2039 | Merge tools are given the two files and the greatest common ancestor of |
|
1916 | Merge tools are given the two files and the greatest common ancestor of | |
2040 | the two file versions, so they can determine the changes made on both |
|
1917 | the two file versions, so they can determine the changes made on both | |
2041 | branches. |
|
1918 | branches. | |
2042 |
|
1919 | |||
2043 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1920 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg | |
2044 | backout' and in several extensions. |
|
1921 | backout' and in several extensions. | |
2045 |
|
1922 | |||
2046 | Usually, the merge tool tries to automatically reconcile the files by |
|
1923 | Usually, the merge tool tries to automatically reconcile the files by | |
2047 | combining all non-overlapping changes that occurred separately in the two |
|
1924 | combining all non-overlapping changes that occurred separately in the two | |
2048 | different evolutions of the same initial base file. Furthermore, some |
|
1925 | different evolutions of the same initial base file. Furthermore, some | |
2049 | interactive merge programs make it easier to manually resolve conflicting |
|
1926 | interactive merge programs make it easier to manually resolve conflicting | |
2050 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1927 | merges, either in a graphical way, or by inserting some conflict markers. | |
2051 | Mercurial does not include any interactive merge programs but relies on |
|
1928 | Mercurial does not include any interactive merge programs but relies on | |
2052 | external tools for that. |
|
1929 | external tools for that. | |
2053 |
|
1930 | |||
2054 | Available merge tools |
|
1931 | Available merge tools | |
2055 | ===================== |
|
1932 | ===================== | |
2056 |
|
1933 | |||
2057 | External merge tools and their properties are configured in the merge- |
|
1934 | External merge tools and their properties are configured in the merge- | |
2058 | tools configuration section - see hgrc(5) - but they can often just be |
|
1935 | tools configuration section - see hgrc(5) - but they can often just be | |
2059 | named by their executable. |
|
1936 | named by their executable. | |
2060 |
|
1937 | |||
2061 | A merge tool is generally usable if its executable can be found on the |
|
1938 | A merge tool is generally usable if its executable can be found on the | |
2062 | system and if it can handle the merge. The executable is found if it is an |
|
1939 | system and if it can handle the merge. The executable is found if it is an | |
2063 | absolute or relative executable path or the name of an application in the |
|
1940 | absolute or relative executable path or the name of an application in the | |
2064 | executable search path. The tool is assumed to be able to handle the merge |
|
1941 | executable search path. The tool is assumed to be able to handle the merge | |
2065 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1942 | if it can handle symlinks if the file is a symlink, if it can handle | |
2066 | binary files if the file is binary, and if a GUI is available if the tool |
|
1943 | binary files if the file is binary, and if a GUI is available if the tool | |
2067 | requires a GUI. |
|
1944 | requires a GUI. | |
2068 |
|
1945 | |||
2069 | There are some internal merge tools which can be used. The internal merge |
|
1946 | There are some internal merge tools which can be used. The internal merge | |
2070 | tools are: |
|
1947 | tools are: | |
2071 |
|
1948 | |||
2072 | ":dump" |
|
1949 | ":dump" | |
2073 | Creates three versions of the files to merge, containing the contents of |
|
1950 | Creates three versions of the files to merge, containing the contents of | |
2074 | local, other and base. These files can then be used to perform a merge |
|
1951 | local, other and base. These files can then be used to perform a merge | |
2075 | manually. If the file to be merged is named "a.txt", these files will |
|
1952 | manually. If the file to be merged is named "a.txt", these files will | |
2076 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
1953 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and | |
2077 | they will be placed in the same directory as "a.txt". |
|
1954 | they will be placed in the same directory as "a.txt". | |
2078 |
|
1955 | |||
2079 | This implies premerge. Therefore, files aren't dumped, if premerge runs |
|
1956 | This implies premerge. Therefore, files aren't dumped, if premerge runs | |
2080 | successfully. Use :forcedump to forcibly write files out. |
|
1957 | successfully. Use :forcedump to forcibly write files out. | |
2081 |
|
1958 | |||
2082 | (actual capabilities: binary, symlink) |
|
1959 | (actual capabilities: binary, symlink) | |
2083 |
|
1960 | |||
2084 | ":fail" |
|
1961 | ":fail" | |
2085 | Rather than attempting to merge files that were modified on both |
|
1962 | Rather than attempting to merge files that were modified on both | |
2086 | branches, it marks them as unresolved. The resolve command must be used |
|
1963 | branches, it marks them as unresolved. The resolve command must be used | |
2087 | to resolve these conflicts. |
|
1964 | to resolve these conflicts. | |
2088 |
|
1965 | |||
2089 | (actual capabilities: binary, symlink) |
|
1966 | (actual capabilities: binary, symlink) | |
2090 |
|
1967 | |||
2091 | ":forcedump" |
|
1968 | ":forcedump" | |
2092 | Creates three versions of the files as same as :dump, but omits |
|
1969 | Creates three versions of the files as same as :dump, but omits | |
2093 | premerge. |
|
1970 | premerge. | |
2094 |
|
1971 | |||
2095 | (actual capabilities: binary, symlink) |
|
1972 | (actual capabilities: binary, symlink) | |
2096 |
|
1973 | |||
2097 | ":local" |
|
1974 | ":local" | |
2098 | Uses the local 'p1()' version of files as the merged version. |
|
1975 | Uses the local 'p1()' version of files as the merged version. | |
2099 |
|
1976 | |||
2100 | (actual capabilities: binary, symlink) |
|
1977 | (actual capabilities: binary, symlink) | |
2101 |
|
1978 | |||
2102 | ":merge" |
|
1979 | ":merge" | |
2103 | Uses the internal non-interactive simple merge algorithm for merging |
|
1980 | Uses the internal non-interactive simple merge algorithm for merging | |
2104 | files. It will fail if there are any conflicts and leave markers in the |
|
1981 | files. It will fail if there are any conflicts and leave markers in the | |
2105 | partially merged file. Markers will have two sections, one for each side |
|
1982 | partially merged file. Markers will have two sections, one for each side | |
2106 | of merge. |
|
1983 | of merge. | |
2107 |
|
1984 | |||
2108 | ":merge-local" |
|
1985 | ":merge-local" | |
2109 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1986 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
2110 | local 'p1()' changes. |
|
1987 | local 'p1()' changes. | |
2111 |
|
1988 | |||
2112 | ":merge-other" |
|
1989 | ":merge-other" | |
2113 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1990 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
2114 | other 'p2()' changes. |
|
1991 | other 'p2()' changes. | |
2115 |
|
1992 | |||
2116 | ":merge3" |
|
1993 | ":merge3" | |
2117 | Uses the internal non-interactive simple merge algorithm for merging |
|
1994 | Uses the internal non-interactive simple merge algorithm for merging | |
2118 | files. It will fail if there are any conflicts and leave markers in the |
|
1995 | files. It will fail if there are any conflicts and leave markers in the | |
2119 | partially merged file. Marker will have three sections, one from each |
|
1996 | partially merged file. Marker will have three sections, one from each | |
2120 | side of the merge and one for the base content. |
|
1997 | side of the merge and one for the base content. | |
2121 |
|
1998 | |||
2122 | ":other" |
|
1999 | ":other" | |
2123 | Uses the other 'p2()' version of files as the merged version. |
|
2000 | Uses the other 'p2()' version of files as the merged version. | |
2124 |
|
2001 | |||
2125 | (actual capabilities: binary, symlink) |
|
2002 | (actual capabilities: binary, symlink) | |
2126 |
|
2003 | |||
2127 | ":prompt" |
|
2004 | ":prompt" | |
2128 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
2005 | Asks the user which of the local 'p1()' or the other 'p2()' version to | |
2129 | keep as the merged version. |
|
2006 | keep as the merged version. | |
2130 |
|
2007 | |||
2131 | (actual capabilities: binary, symlink) |
|
2008 | (actual capabilities: binary, symlink) | |
2132 |
|
2009 | |||
2133 | ":tagmerge" |
|
2010 | ":tagmerge" | |
2134 | Uses the internal tag merge algorithm (experimental). |
|
2011 | Uses the internal tag merge algorithm (experimental). | |
2135 |
|
2012 | |||
2136 | ":union" |
|
2013 | ":union" | |
2137 | Uses the internal non-interactive simple merge algorithm for merging |
|
2014 | Uses the internal non-interactive simple merge algorithm for merging | |
2138 | files. It will use both left and right sides for conflict regions. No |
|
2015 | files. It will use both left and right sides for conflict regions. No | |
2139 | markers are inserted. |
|
2016 | markers are inserted. | |
2140 |
|
2017 | |||
2141 | Internal tools are always available and do not require a GUI but will by |
|
2018 | Internal tools are always available and do not require a GUI but will by | |
2142 | default not handle symlinks or binary files. See next section for detail |
|
2019 | default not handle symlinks or binary files. See next section for detail | |
2143 | about "actual capabilities" described above. |
|
2020 | about "actual capabilities" described above. | |
2144 |
|
2021 | |||
2145 | Choosing a merge tool |
|
2022 | Choosing a merge tool | |
2146 | ===================== |
|
2023 | ===================== | |
2147 |
|
2024 | |||
2148 | Mercurial uses these rules when deciding which merge tool to use: |
|
2025 | Mercurial uses these rules when deciding which merge tool to use: | |
2149 |
|
2026 | |||
2150 | 1. If a tool has been specified with the --tool option to merge or |
|
2027 | 1. If a tool has been specified with the --tool option to merge or | |
2151 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
2028 | resolve, it is used. If it is the name of a tool in the merge-tools | |
2152 | configuration, its configuration is used. Otherwise the specified tool |
|
2029 | configuration, its configuration is used. Otherwise the specified tool | |
2153 | must be executable by the shell. |
|
2030 | must be executable by the shell. | |
2154 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
2031 | 2. If the "HGMERGE" environment variable is present, its value is used and | |
2155 | must be executable by the shell. |
|
2032 | must be executable by the shell. | |
2156 | 3. If the filename of the file to be merged matches any of the patterns in |
|
2033 | 3. If the filename of the file to be merged matches any of the patterns in | |
2157 | the merge-patterns configuration section, the first usable merge tool |
|
2034 | the merge-patterns configuration section, the first usable merge tool | |
2158 | corresponding to a matching pattern is used. |
|
2035 | corresponding to a matching pattern is used. | |
2159 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
2036 | 4. If ui.merge is set it will be considered next. If the value is not the | |
2160 | name of a configured tool, the specified value is used and must be |
|
2037 | name of a configured tool, the specified value is used and must be | |
2161 | executable by the shell. Otherwise the named tool is used if it is |
|
2038 | executable by the shell. Otherwise the named tool is used if it is | |
2162 | usable. |
|
2039 | usable. | |
2163 | 5. If any usable merge tools are present in the merge-tools configuration |
|
2040 | 5. If any usable merge tools are present in the merge-tools configuration | |
2164 | section, the one with the highest priority is used. |
|
2041 | section, the one with the highest priority is used. | |
2165 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
2042 | 6. If a program named "hgmerge" can be found on the system, it is used - | |
2166 | but it will by default not be used for symlinks and binary files. |
|
2043 | but it will by default not be used for symlinks and binary files. | |
2167 | 7. If the file to be merged is not binary and is not a symlink, then |
|
2044 | 7. If the file to be merged is not binary and is not a symlink, then | |
2168 | internal ":merge" is used. |
|
2045 | internal ":merge" is used. | |
2169 | 8. Otherwise, ":prompt" is used. |
|
2046 | 8. Otherwise, ":prompt" is used. | |
2170 |
|
2047 | |||
2171 | For historical reason, Mercurial treats merge tools as below while |
|
2048 | For historical reason, Mercurial treats merge tools as below while | |
2172 | examining rules above. |
|
2049 | examining rules above. | |
2173 |
|
2050 | |||
2174 | step specified via binary symlink |
|
2051 | step specified via binary symlink | |
2175 | ---------------------------------- |
|
2052 | ---------------------------------- | |
2176 | 1. --tool o/o o/o |
|
2053 | 1. --tool o/o o/o | |
2177 | 2. HGMERGE o/o o/o |
|
2054 | 2. HGMERGE o/o o/o | |
2178 | 3. merge-patterns o/o(*) x/?(*) |
|
2055 | 3. merge-patterns o/o(*) x/?(*) | |
2179 | 4. ui.merge x/?(*) x/?(*) |
|
2056 | 4. ui.merge x/?(*) x/?(*) | |
2180 |
|
2057 | |||
2181 | Each capability column indicates Mercurial behavior for internal/external |
|
2058 | Each capability column indicates Mercurial behavior for internal/external | |
2182 | merge tools at examining each rule. |
|
2059 | merge tools at examining each rule. | |
2183 |
|
2060 | |||
2184 | - "o": "assume that a tool has capability" |
|
2061 | - "o": "assume that a tool has capability" | |
2185 | - "x": "assume that a tool does not have capability" |
|
2062 | - "x": "assume that a tool does not have capability" | |
2186 | - "?": "check actual capability of a tool" |
|
2063 | - "?": "check actual capability of a tool" | |
2187 |
|
2064 | |||
2188 | If "merge.strict-capability-check" configuration is true, Mercurial checks |
|
2065 | If "merge.strict-capability-check" configuration is true, Mercurial checks | |
2189 | capabilities of merge tools strictly in (*) cases above (= each capability |
|
2066 | capabilities of merge tools strictly in (*) cases above (= each capability | |
2190 | column becomes "?/?"). It is false by default for backward compatibility. |
|
2067 | column becomes "?/?"). It is false by default for backward compatibility. | |
2191 |
|
2068 | |||
2192 | Note: |
|
2069 | Note: | |
2193 | After selecting a merge program, Mercurial will by default attempt to |
|
2070 | After selecting a merge program, Mercurial will by default attempt to | |
2194 | merge the files using a simple merge algorithm first. Only if it |
|
2071 | merge the files using a simple merge algorithm first. Only if it | |
2195 | doesn't succeed because of conflicting changes will Mercurial actually |
|
2072 | doesn't succeed because of conflicting changes will Mercurial actually | |
2196 | execute the merge program. Whether to use the simple merge algorithm |
|
2073 | execute the merge program. Whether to use the simple merge algorithm | |
2197 | first can be controlled by the premerge setting of the merge tool. |
|
2074 | first can be controlled by the premerge setting of the merge tool. | |
2198 | Premerge is enabled by default unless the file is binary or a symlink. |
|
2075 | Premerge is enabled by default unless the file is binary or a symlink. | |
2199 |
|
2076 | |||
2200 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
2077 | See the merge-tools and ui sections of hgrc(5) for details on the | |
2201 | configuration of merge tools. |
|
2078 | configuration of merge tools. | |
2202 |
|
2079 | |||
2203 | Compression engines listed in `hg help bundlespec` |
|
2080 | Compression engines listed in `hg help bundlespec` | |
2204 |
|
2081 | |||
2205 | $ hg help bundlespec | grep gzip |
|
2082 | $ hg help bundlespec | grep gzip | |
2206 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
2083 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression | |
2207 | An algorithm that produces smaller bundles than "gzip". |
|
2084 | An algorithm that produces smaller bundles than "gzip". | |
2208 | This engine will likely produce smaller bundles than "gzip" but will be |
|
2085 | This engine will likely produce smaller bundles than "gzip" but will be | |
2209 | "gzip" |
|
2086 | "gzip" | |
2210 | better compression than "gzip". It also frequently yields better (?) |
|
2087 | better compression than "gzip". It also frequently yields better (?) | |
2211 |
|
2088 | |||
2212 | Test usage of section marks in help documents |
|
2089 | Test usage of section marks in help documents | |
2213 |
|
2090 | |||
2214 | $ cd "$TESTDIR"/../doc |
|
2091 | $ cd "$TESTDIR"/../doc | |
2215 | $ "$PYTHON" check-seclevel.py |
|
2092 | $ "$PYTHON" check-seclevel.py | |
2216 | $ cd $TESTTMP |
|
2093 | $ cd $TESTTMP | |
2217 |
|
2094 | |||
2218 | #if serve |
|
2095 | #if serve | |
2219 |
|
2096 | |||
2220 | Test the help pages in hgweb. |
|
2097 | Test the help pages in hgweb. | |
2221 |
|
2098 | |||
2222 | Dish up an empty repo; serve it cold. |
|
2099 | Dish up an empty repo; serve it cold. | |
2223 |
|
2100 | |||
2224 | $ hg init "$TESTTMP/test" |
|
2101 | $ hg init "$TESTTMP/test" | |
2225 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
2102 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | |
2226 | $ cat hg.pid >> $DAEMON_PIDS |
|
2103 | $ cat hg.pid >> $DAEMON_PIDS | |
2227 |
|
2104 | |||
2228 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
2105 | $ get-with-headers.py $LOCALIP:$HGPORT "help" | |
2229 | 200 Script output follows |
|
2106 | 200 Script output follows | |
2230 |
|
2107 | |||
2231 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2108 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2232 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2109 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2233 | <head> |
|
2110 | <head> | |
2234 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2111 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2235 | <meta name="robots" content="index, nofollow" /> |
|
2112 | <meta name="robots" content="index, nofollow" /> | |
2236 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2113 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2237 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2114 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2238 |
|
2115 | |||
2239 | <title>Help: Index</title> |
|
2116 | <title>Help: Index</title> | |
2240 | </head> |
|
2117 | </head> | |
2241 | <body> |
|
2118 | <body> | |
2242 |
|
2119 | |||
2243 | <div class="container"> |
|
2120 | <div class="container"> | |
2244 | <div class="menu"> |
|
2121 | <div class="menu"> | |
2245 | <div class="logo"> |
|
2122 | <div class="logo"> | |
2246 | <a href="https://mercurial-scm.org/"> |
|
2123 | <a href="https://mercurial-scm.org/"> | |
2247 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2124 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2248 | </div> |
|
2125 | </div> | |
2249 | <ul> |
|
2126 | <ul> | |
2250 | <li><a href="/shortlog">log</a></li> |
|
2127 | <li><a href="/shortlog">log</a></li> | |
2251 | <li><a href="/graph">graph</a></li> |
|
2128 | <li><a href="/graph">graph</a></li> | |
2252 | <li><a href="/tags">tags</a></li> |
|
2129 | <li><a href="/tags">tags</a></li> | |
2253 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2130 | <li><a href="/bookmarks">bookmarks</a></li> | |
2254 | <li><a href="/branches">branches</a></li> |
|
2131 | <li><a href="/branches">branches</a></li> | |
2255 | </ul> |
|
2132 | </ul> | |
2256 | <ul> |
|
2133 | <ul> | |
2257 | <li class="active">help</li> |
|
2134 | <li class="active">help</li> | |
2258 | </ul> |
|
2135 | </ul> | |
2259 | </div> |
|
2136 | </div> | |
2260 |
|
2137 | |||
2261 | <div class="main"> |
|
2138 | <div class="main"> | |
2262 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2139 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2263 |
|
2140 | |||
2264 | <form class="search" action="/log"> |
|
2141 | <form class="search" action="/log"> | |
2265 |
|
2142 | |||
2266 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2143 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2267 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2144 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2268 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2145 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2269 | </form> |
|
2146 | </form> | |
2270 | <table class="bigtable"> |
|
2147 | <table class="bigtable"> | |
2271 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
2148 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
2272 |
|
2149 | |||
2273 | <tr><td> |
|
2150 | <tr><td> | |
2274 | <a href="/help/bundlespec"> |
|
2151 | <a href="/help/bundlespec"> | |
2275 | bundlespec |
|
2152 | bundlespec | |
2276 | </a> |
|
2153 | </a> | |
2277 | </td><td> |
|
2154 | </td><td> | |
2278 | Bundle File Formats |
|
2155 | Bundle File Formats | |
2279 | </td></tr> |
|
2156 | </td></tr> | |
2280 | <tr><td> |
|
2157 | <tr><td> | |
2281 | <a href="/help/color"> |
|
2158 | <a href="/help/color"> | |
2282 | color |
|
2159 | color | |
2283 | </a> |
|
2160 | </a> | |
2284 | </td><td> |
|
2161 | </td><td> | |
2285 | Colorizing Outputs |
|
2162 | Colorizing Outputs | |
2286 | </td></tr> |
|
2163 | </td></tr> | |
2287 | <tr><td> |
|
2164 | <tr><td> | |
2288 | <a href="/help/config"> |
|
2165 | <a href="/help/config"> | |
2289 | config |
|
2166 | config | |
2290 | </a> |
|
2167 | </a> | |
2291 | </td><td> |
|
2168 | </td><td> | |
2292 | Configuration Files |
|
2169 | Configuration Files | |
2293 | </td></tr> |
|
2170 | </td></tr> | |
2294 | <tr><td> |
|
2171 | <tr><td> | |
2295 | <a href="/help/dates"> |
|
2172 | <a href="/help/dates"> | |
2296 | dates |
|
2173 | dates | |
2297 | </a> |
|
2174 | </a> | |
2298 | </td><td> |
|
2175 | </td><td> | |
2299 | Date Formats |
|
2176 | Date Formats | |
2300 | </td></tr> |
|
2177 | </td></tr> | |
2301 | <tr><td> |
|
2178 | <tr><td> | |
2302 | <a href="/help/deprecated"> |
|
2179 | <a href="/help/deprecated"> | |
2303 | deprecated |
|
2180 | deprecated | |
2304 | </a> |
|
2181 | </a> | |
2305 | </td><td> |
|
2182 | </td><td> | |
2306 | Deprecated Features |
|
2183 | Deprecated Features | |
2307 | </td></tr> |
|
2184 | </td></tr> | |
2308 | <tr><td> |
|
2185 | <tr><td> | |
2309 | <a href="/help/diffs"> |
|
2186 | <a href="/help/diffs"> | |
2310 | diffs |
|
2187 | diffs | |
2311 | </a> |
|
2188 | </a> | |
2312 | </td><td> |
|
2189 | </td><td> | |
2313 | Diff Formats |
|
2190 | Diff Formats | |
2314 | </td></tr> |
|
2191 | </td></tr> | |
2315 | <tr><td> |
|
2192 | <tr><td> | |
2316 | <a href="/help/environment"> |
|
2193 | <a href="/help/environment"> | |
2317 | environment |
|
2194 | environment | |
2318 | </a> |
|
2195 | </a> | |
2319 | </td><td> |
|
2196 | </td><td> | |
2320 | Environment Variables |
|
2197 | Environment Variables | |
2321 | </td></tr> |
|
2198 | </td></tr> | |
2322 | <tr><td> |
|
2199 | <tr><td> | |
2323 | <a href="/help/extensions"> |
|
2200 | <a href="/help/extensions"> | |
2324 | extensions |
|
2201 | extensions | |
2325 | </a> |
|
2202 | </a> | |
2326 | </td><td> |
|
2203 | </td><td> | |
2327 | Using Additional Features |
|
2204 | Using Additional Features | |
2328 | </td></tr> |
|
2205 | </td></tr> | |
2329 | <tr><td> |
|
2206 | <tr><td> | |
2330 | <a href="/help/filesets"> |
|
2207 | <a href="/help/filesets"> | |
2331 | filesets |
|
2208 | filesets | |
2332 | </a> |
|
2209 | </a> | |
2333 | </td><td> |
|
2210 | </td><td> | |
2334 | Specifying File Sets |
|
2211 | Specifying File Sets | |
2335 | </td></tr> |
|
2212 | </td></tr> | |
2336 | <tr><td> |
|
2213 | <tr><td> | |
2337 | <a href="/help/flags"> |
|
2214 | <a href="/help/flags"> | |
2338 | flags |
|
2215 | flags | |
2339 | </a> |
|
2216 | </a> | |
2340 | </td><td> |
|
2217 | </td><td> | |
2341 | Command-line flags |
|
2218 | Command-line flags | |
2342 | </td></tr> |
|
2219 | </td></tr> | |
2343 | <tr><td> |
|
2220 | <tr><td> | |
2344 | <a href="/help/glossary"> |
|
2221 | <a href="/help/glossary"> | |
2345 | glossary |
|
2222 | glossary | |
2346 | </a> |
|
2223 | </a> | |
2347 | </td><td> |
|
2224 | </td><td> | |
2348 | Glossary |
|
2225 | Glossary | |
2349 | </td></tr> |
|
2226 | </td></tr> | |
2350 | <tr><td> |
|
2227 | <tr><td> | |
2351 | <a href="/help/hgignore"> |
|
2228 | <a href="/help/hgignore"> | |
2352 | hgignore |
|
2229 | hgignore | |
2353 | </a> |
|
2230 | </a> | |
2354 | </td><td> |
|
2231 | </td><td> | |
2355 | Syntax for Mercurial Ignore Files |
|
2232 | Syntax for Mercurial Ignore Files | |
2356 | </td></tr> |
|
2233 | </td></tr> | |
2357 | <tr><td> |
|
2234 | <tr><td> | |
2358 | <a href="/help/hgweb"> |
|
2235 | <a href="/help/hgweb"> | |
2359 | hgweb |
|
2236 | hgweb | |
2360 | </a> |
|
2237 | </a> | |
2361 | </td><td> |
|
2238 | </td><td> | |
2362 | Configuring hgweb |
|
2239 | Configuring hgweb | |
2363 | </td></tr> |
|
2240 | </td></tr> | |
2364 | <tr><td> |
|
2241 | <tr><td> | |
2365 | <a href="/help/internals"> |
|
2242 | <a href="/help/internals"> | |
2366 | internals |
|
2243 | internals | |
2367 | </a> |
|
2244 | </a> | |
2368 | </td><td> |
|
2245 | </td><td> | |
2369 | Technical implementation topics |
|
2246 | Technical implementation topics | |
2370 | </td></tr> |
|
2247 | </td></tr> | |
2371 | <tr><td> |
|
2248 | <tr><td> | |
2372 | <a href="/help/merge-tools"> |
|
2249 | <a href="/help/merge-tools"> | |
2373 | merge-tools |
|
2250 | merge-tools | |
2374 | </a> |
|
2251 | </a> | |
2375 | </td><td> |
|
2252 | </td><td> | |
2376 | Merge Tools |
|
2253 | Merge Tools | |
2377 | </td></tr> |
|
2254 | </td></tr> | |
2378 | <tr><td> |
|
2255 | <tr><td> | |
2379 | <a href="/help/pager"> |
|
2256 | <a href="/help/pager"> | |
2380 | pager |
|
2257 | pager | |
2381 | </a> |
|
2258 | </a> | |
2382 | </td><td> |
|
2259 | </td><td> | |
2383 | Pager Support |
|
2260 | Pager Support | |
2384 | </td></tr> |
|
2261 | </td></tr> | |
2385 | <tr><td> |
|
2262 | <tr><td> | |
2386 | <a href="/help/patterns"> |
|
2263 | <a href="/help/patterns"> | |
2387 | patterns |
|
2264 | patterns | |
2388 | </a> |
|
2265 | </a> | |
2389 | </td><td> |
|
2266 | </td><td> | |
2390 | File Name Patterns |
|
2267 | File Name Patterns | |
2391 | </td></tr> |
|
2268 | </td></tr> | |
2392 | <tr><td> |
|
2269 | <tr><td> | |
2393 | <a href="/help/phases"> |
|
2270 | <a href="/help/phases"> | |
2394 | phases |
|
2271 | phases | |
2395 | </a> |
|
2272 | </a> | |
2396 | </td><td> |
|
2273 | </td><td> | |
2397 | Working with Phases |
|
2274 | Working with Phases | |
2398 | </td></tr> |
|
2275 | </td></tr> | |
2399 | <tr><td> |
|
2276 | <tr><td> | |
2400 | <a href="/help/revisions"> |
|
2277 | <a href="/help/revisions"> | |
2401 | revisions |
|
2278 | revisions | |
2402 | </a> |
|
2279 | </a> | |
2403 | </td><td> |
|
2280 | </td><td> | |
2404 | Specifying Revisions |
|
2281 | Specifying Revisions | |
2405 | </td></tr> |
|
2282 | </td></tr> | |
2406 | <tr><td> |
|
2283 | <tr><td> | |
2407 | <a href="/help/scripting"> |
|
2284 | <a href="/help/scripting"> | |
2408 | scripting |
|
2285 | scripting | |
2409 | </a> |
|
2286 | </a> | |
2410 | </td><td> |
|
2287 | </td><td> | |
2411 | Using Mercurial from scripts and automation |
|
2288 | Using Mercurial from scripts and automation | |
2412 | </td></tr> |
|
2289 | </td></tr> | |
2413 | <tr><td> |
|
2290 | <tr><td> | |
2414 | <a href="/help/subrepos"> |
|
2291 | <a href="/help/subrepos"> | |
2415 | subrepos |
|
2292 | subrepos | |
2416 | </a> |
|
2293 | </a> | |
2417 | </td><td> |
|
2294 | </td><td> | |
2418 | Subrepositories |
|
2295 | Subrepositories | |
2419 | </td></tr> |
|
2296 | </td></tr> | |
2420 | <tr><td> |
|
2297 | <tr><td> | |
2421 | <a href="/help/templating"> |
|
2298 | <a href="/help/templating"> | |
2422 | templating |
|
2299 | templating | |
2423 | </a> |
|
2300 | </a> | |
2424 | </td><td> |
|
2301 | </td><td> | |
2425 | Template Usage |
|
2302 | Template Usage | |
2426 | </td></tr> |
|
2303 | </td></tr> | |
2427 | <tr><td> |
|
2304 | <tr><td> | |
2428 | <a href="/help/urls"> |
|
2305 | <a href="/help/urls"> | |
2429 | urls |
|
2306 | urls | |
2430 | </a> |
|
2307 | </a> | |
2431 | </td><td> |
|
2308 | </td><td> | |
2432 | URL Paths |
|
2309 | URL Paths | |
2433 | </td></tr> |
|
2310 | </td></tr> | |
2434 | <tr><td> |
|
2311 | <tr><td> | |
2435 | <a href="/help/topic-containing-verbose"> |
|
2312 | <a href="/help/topic-containing-verbose"> | |
2436 | topic-containing-verbose |
|
2313 | topic-containing-verbose | |
2437 | </a> |
|
2314 | </a> | |
2438 | </td><td> |
|
2315 | </td><td> | |
2439 | This is the topic to test omit indicating. |
|
2316 | This is the topic to test omit indicating. | |
2440 | </td></tr> |
|
2317 | </td></tr> | |
2441 |
|
2318 | |||
2442 |
|
2319 | |||
2443 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2320 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | |
2444 |
|
2321 | |||
2445 | <tr><td> |
|
2322 | <tr><td> | |
2446 | <a href="/help/add"> |
|
2323 | <a href="/help/add"> | |
2447 | add |
|
2324 | add | |
2448 | </a> |
|
2325 | </a> | |
2449 | </td><td> |
|
2326 | </td><td> | |
2450 | add the specified files on the next commit |
|
2327 | add the specified files on the next commit | |
2451 | </td></tr> |
|
2328 | </td></tr> | |
2452 | <tr><td> |
|
2329 | <tr><td> | |
2453 | <a href="/help/annotate"> |
|
2330 | <a href="/help/annotate"> | |
2454 | annotate |
|
2331 | annotate | |
2455 | </a> |
|
2332 | </a> | |
2456 | </td><td> |
|
2333 | </td><td> | |
2457 | show changeset information by line for each file |
|
2334 | show changeset information by line for each file | |
2458 | </td></tr> |
|
2335 | </td></tr> | |
2459 | <tr><td> |
|
2336 | <tr><td> | |
2460 | <a href="/help/clone"> |
|
2337 | <a href="/help/clone"> | |
2461 | clone |
|
2338 | clone | |
2462 | </a> |
|
2339 | </a> | |
2463 | </td><td> |
|
2340 | </td><td> | |
2464 | make a copy of an existing repository |
|
2341 | make a copy of an existing repository | |
2465 | </td></tr> |
|
2342 | </td></tr> | |
2466 | <tr><td> |
|
2343 | <tr><td> | |
2467 | <a href="/help/commit"> |
|
2344 | <a href="/help/commit"> | |
2468 | commit |
|
2345 | commit | |
2469 | </a> |
|
2346 | </a> | |
2470 | </td><td> |
|
2347 | </td><td> | |
2471 | commit the specified files or all outstanding changes |
|
2348 | commit the specified files or all outstanding changes | |
2472 | </td></tr> |
|
2349 | </td></tr> | |
2473 | <tr><td> |
|
2350 | <tr><td> | |
2474 | <a href="/help/diff"> |
|
2351 | <a href="/help/diff"> | |
2475 | diff |
|
2352 | diff | |
2476 | </a> |
|
2353 | </a> | |
2477 | </td><td> |
|
2354 | </td><td> | |
2478 | diff repository (or selected files) |
|
2355 | diff repository (or selected files) | |
2479 | </td></tr> |
|
2356 | </td></tr> | |
2480 | <tr><td> |
|
2357 | <tr><td> | |
2481 | <a href="/help/export"> |
|
2358 | <a href="/help/export"> | |
2482 | export |
|
2359 | export | |
2483 | </a> |
|
2360 | </a> | |
2484 | </td><td> |
|
2361 | </td><td> | |
2485 | dump the header and diffs for one or more changesets |
|
2362 | dump the header and diffs for one or more changesets | |
2486 | </td></tr> |
|
2363 | </td></tr> | |
2487 | <tr><td> |
|
2364 | <tr><td> | |
2488 | <a href="/help/forget"> |
|
2365 | <a href="/help/forget"> | |
2489 | forget |
|
2366 | forget | |
2490 | </a> |
|
2367 | </a> | |
2491 | </td><td> |
|
2368 | </td><td> | |
2492 | forget the specified files on the next commit |
|
2369 | forget the specified files on the next commit | |
2493 | </td></tr> |
|
2370 | </td></tr> | |
2494 | <tr><td> |
|
2371 | <tr><td> | |
2495 | <a href="/help/init"> |
|
2372 | <a href="/help/init"> | |
2496 | init |
|
2373 | init | |
2497 | </a> |
|
2374 | </a> | |
2498 | </td><td> |
|
2375 | </td><td> | |
2499 | create a new repository in the given directory |
|
2376 | create a new repository in the given directory | |
2500 | </td></tr> |
|
2377 | </td></tr> | |
2501 | <tr><td> |
|
2378 | <tr><td> | |
2502 | <a href="/help/log"> |
|
2379 | <a href="/help/log"> | |
2503 | log |
|
2380 | log | |
2504 | </a> |
|
2381 | </a> | |
2505 | </td><td> |
|
2382 | </td><td> | |
2506 | show revision history of entire repository or files |
|
2383 | show revision history of entire repository or files | |
2507 | </td></tr> |
|
2384 | </td></tr> | |
2508 | <tr><td> |
|
2385 | <tr><td> | |
2509 | <a href="/help/merge"> |
|
2386 | <a href="/help/merge"> | |
2510 | merge |
|
2387 | merge | |
2511 | </a> |
|
2388 | </a> | |
2512 | </td><td> |
|
2389 | </td><td> | |
2513 | merge another revision into working directory |
|
2390 | merge another revision into working directory | |
2514 | </td></tr> |
|
2391 | </td></tr> | |
2515 | <tr><td> |
|
2392 | <tr><td> | |
2516 | <a href="/help/pull"> |
|
2393 | <a href="/help/pull"> | |
2517 | pull |
|
2394 | pull | |
2518 | </a> |
|
2395 | </a> | |
2519 | </td><td> |
|
2396 | </td><td> | |
2520 | pull changes from the specified source |
|
2397 | pull changes from the specified source | |
2521 | </td></tr> |
|
2398 | </td></tr> | |
2522 | <tr><td> |
|
2399 | <tr><td> | |
2523 | <a href="/help/push"> |
|
2400 | <a href="/help/push"> | |
2524 | push |
|
2401 | push | |
2525 | </a> |
|
2402 | </a> | |
2526 | </td><td> |
|
2403 | </td><td> | |
2527 | push changes to the specified destination |
|
2404 | push changes to the specified destination | |
2528 | </td></tr> |
|
2405 | </td></tr> | |
2529 | <tr><td> |
|
2406 | <tr><td> | |
2530 | <a href="/help/remove"> |
|
2407 | <a href="/help/remove"> | |
2531 | remove |
|
2408 | remove | |
2532 | </a> |
|
2409 | </a> | |
2533 | </td><td> |
|
2410 | </td><td> | |
2534 | remove the specified files on the next commit |
|
2411 | remove the specified files on the next commit | |
2535 | </td></tr> |
|
2412 | </td></tr> | |
2536 | <tr><td> |
|
2413 | <tr><td> | |
2537 | <a href="/help/serve"> |
|
2414 | <a href="/help/serve"> | |
2538 | serve |
|
2415 | serve | |
2539 | </a> |
|
2416 | </a> | |
2540 | </td><td> |
|
2417 | </td><td> | |
2541 | start stand-alone webserver |
|
2418 | start stand-alone webserver | |
2542 | </td></tr> |
|
2419 | </td></tr> | |
2543 | <tr><td> |
|
2420 | <tr><td> | |
2544 | <a href="/help/status"> |
|
2421 | <a href="/help/status"> | |
2545 | status |
|
2422 | status | |
2546 | </a> |
|
2423 | </a> | |
2547 | </td><td> |
|
2424 | </td><td> | |
2548 | show changed files in the working directory |
|
2425 | show changed files in the working directory | |
2549 | </td></tr> |
|
2426 | </td></tr> | |
2550 | <tr><td> |
|
2427 | <tr><td> | |
2551 | <a href="/help/summary"> |
|
2428 | <a href="/help/summary"> | |
2552 | summary |
|
2429 | summary | |
2553 | </a> |
|
2430 | </a> | |
2554 | </td><td> |
|
2431 | </td><td> | |
2555 | summarize working directory state |
|
2432 | summarize working directory state | |
2556 | </td></tr> |
|
2433 | </td></tr> | |
2557 | <tr><td> |
|
2434 | <tr><td> | |
2558 | <a href="/help/update"> |
|
2435 | <a href="/help/update"> | |
2559 | update |
|
2436 | update | |
2560 | </a> |
|
2437 | </a> | |
2561 | </td><td> |
|
2438 | </td><td> | |
2562 | update working directory (or switch revisions) |
|
2439 | update working directory (or switch revisions) | |
2563 | </td></tr> |
|
2440 | </td></tr> | |
2564 |
|
2441 | |||
2565 |
|
2442 | |||
2566 |
|
2443 | |||
2567 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2444 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | |
2568 |
|
2445 | |||
2569 | <tr><td> |
|
2446 | <tr><td> | |
2570 | <a href="/help/addremove"> |
|
2447 | <a href="/help/addremove"> | |
2571 | addremove |
|
2448 | addremove | |
2572 | </a> |
|
2449 | </a> | |
2573 | </td><td> |
|
2450 | </td><td> | |
2574 | add all new files, delete all missing files |
|
2451 | add all new files, delete all missing files | |
2575 | </td></tr> |
|
2452 | </td></tr> | |
2576 | <tr><td> |
|
2453 | <tr><td> | |
2577 | <a href="/help/archive"> |
|
2454 | <a href="/help/archive"> | |
2578 | archive |
|
2455 | archive | |
2579 | </a> |
|
2456 | </a> | |
2580 | </td><td> |
|
2457 | </td><td> | |
2581 | create an unversioned archive of a repository revision |
|
2458 | create an unversioned archive of a repository revision | |
2582 | </td></tr> |
|
2459 | </td></tr> | |
2583 | <tr><td> |
|
2460 | <tr><td> | |
2584 | <a href="/help/backout"> |
|
2461 | <a href="/help/backout"> | |
2585 | backout |
|
2462 | backout | |
2586 | </a> |
|
2463 | </a> | |
2587 | </td><td> |
|
2464 | </td><td> | |
2588 | reverse effect of earlier changeset |
|
2465 | reverse effect of earlier changeset | |
2589 | </td></tr> |
|
2466 | </td></tr> | |
2590 | <tr><td> |
|
2467 | <tr><td> | |
2591 | <a href="/help/bisect"> |
|
2468 | <a href="/help/bisect"> | |
2592 | bisect |
|
2469 | bisect | |
2593 | </a> |
|
2470 | </a> | |
2594 | </td><td> |
|
2471 | </td><td> | |
2595 | subdivision search of changesets |
|
2472 | subdivision search of changesets | |
2596 | </td></tr> |
|
2473 | </td></tr> | |
2597 | <tr><td> |
|
2474 | <tr><td> | |
2598 | <a href="/help/bookmarks"> |
|
2475 | <a href="/help/bookmarks"> | |
2599 | bookmarks |
|
2476 | bookmarks | |
2600 | </a> |
|
2477 | </a> | |
2601 | </td><td> |
|
2478 | </td><td> | |
2602 | create a new bookmark or list existing bookmarks |
|
2479 | create a new bookmark or list existing bookmarks | |
2603 | </td></tr> |
|
2480 | </td></tr> | |
2604 | <tr><td> |
|
2481 | <tr><td> | |
2605 | <a href="/help/branch"> |
|
2482 | <a href="/help/branch"> | |
2606 | branch |
|
2483 | branch | |
2607 | </a> |
|
2484 | </a> | |
2608 | </td><td> |
|
2485 | </td><td> | |
2609 | set or show the current branch name |
|
2486 | set or show the current branch name | |
2610 | </td></tr> |
|
2487 | </td></tr> | |
2611 | <tr><td> |
|
2488 | <tr><td> | |
2612 | <a href="/help/branches"> |
|
2489 | <a href="/help/branches"> | |
2613 | branches |
|
2490 | branches | |
2614 | </a> |
|
2491 | </a> | |
2615 | </td><td> |
|
2492 | </td><td> | |
2616 | list repository named branches |
|
2493 | list repository named branches | |
2617 | </td></tr> |
|
2494 | </td></tr> | |
2618 | <tr><td> |
|
2495 | <tr><td> | |
2619 | <a href="/help/bundle"> |
|
2496 | <a href="/help/bundle"> | |
2620 | bundle |
|
2497 | bundle | |
2621 | </a> |
|
2498 | </a> | |
2622 | </td><td> |
|
2499 | </td><td> | |
2623 | create a bundle file |
|
2500 | create a bundle file | |
2624 | </td></tr> |
|
2501 | </td></tr> | |
2625 | <tr><td> |
|
2502 | <tr><td> | |
2626 | <a href="/help/cat"> |
|
2503 | <a href="/help/cat"> | |
2627 | cat |
|
2504 | cat | |
2628 | </a> |
|
2505 | </a> | |
2629 | </td><td> |
|
2506 | </td><td> | |
2630 | output the current or given revision of files |
|
2507 | output the current or given revision of files | |
2631 | </td></tr> |
|
2508 | </td></tr> | |
2632 | <tr><td> |
|
2509 | <tr><td> | |
2633 | <a href="/help/config"> |
|
2510 | <a href="/help/config"> | |
2634 | config |
|
2511 | config | |
2635 | </a> |
|
2512 | </a> | |
2636 | </td><td> |
|
2513 | </td><td> | |
2637 | show combined config settings from all hgrc files |
|
2514 | show combined config settings from all hgrc files | |
2638 | </td></tr> |
|
2515 | </td></tr> | |
2639 | <tr><td> |
|
2516 | <tr><td> | |
2640 | <a href="/help/copy"> |
|
2517 | <a href="/help/copy"> | |
2641 | copy |
|
2518 | copy | |
2642 | </a> |
|
2519 | </a> | |
2643 | </td><td> |
|
2520 | </td><td> | |
2644 | mark files as copied for the next commit |
|
2521 | mark files as copied for the next commit | |
2645 | </td></tr> |
|
2522 | </td></tr> | |
2646 | <tr><td> |
|
2523 | <tr><td> | |
2647 | <a href="/help/files"> |
|
2524 | <a href="/help/files"> | |
2648 | files |
|
2525 | files | |
2649 | </a> |
|
2526 | </a> | |
2650 | </td><td> |
|
2527 | </td><td> | |
2651 | list tracked files |
|
2528 | list tracked files | |
2652 | </td></tr> |
|
2529 | </td></tr> | |
2653 | <tr><td> |
|
2530 | <tr><td> | |
2654 | <a href="/help/graft"> |
|
2531 | <a href="/help/graft"> | |
2655 | graft |
|
2532 | graft | |
2656 | </a> |
|
2533 | </a> | |
2657 | </td><td> |
|
2534 | </td><td> | |
2658 | copy changes from other branches onto the current branch |
|
2535 | copy changes from other branches onto the current branch | |
2659 | </td></tr> |
|
2536 | </td></tr> | |
2660 | <tr><td> |
|
2537 | <tr><td> | |
2661 | <a href="/help/grep"> |
|
2538 | <a href="/help/grep"> | |
2662 | grep |
|
2539 | grep | |
2663 | </a> |
|
2540 | </a> | |
2664 | </td><td> |
|
2541 | </td><td> | |
2665 | search revision history for a pattern in specified files |
|
2542 | search revision history for a pattern in specified files | |
2666 | </td></tr> |
|
2543 | </td></tr> | |
2667 | <tr><td> |
|
2544 | <tr><td> | |
|
2545 | <a href="/help/hashelp"> | |||
|
2546 | hashelp | |||
|
2547 | </a> | |||
|
2548 | </td><td> | |||
|
2549 | Extension command's help | |||
|
2550 | </td></tr> | |||
|
2551 | <tr><td> | |||
2668 | <a href="/help/heads"> |
|
2552 | <a href="/help/heads"> | |
2669 | heads |
|
2553 | heads | |
2670 | </a> |
|
2554 | </a> | |
2671 | </td><td> |
|
2555 | </td><td> | |
2672 | show branch heads |
|
2556 | show branch heads | |
2673 | </td></tr> |
|
2557 | </td></tr> | |
2674 | <tr><td> |
|
2558 | <tr><td> | |
2675 | <a href="/help/help"> |
|
2559 | <a href="/help/help"> | |
2676 | help |
|
2560 | help | |
2677 | </a> |
|
2561 | </a> | |
2678 | </td><td> |
|
2562 | </td><td> | |
2679 | show help for a given topic or a help overview |
|
2563 | show help for a given topic or a help overview | |
2680 | </td></tr> |
|
2564 | </td></tr> | |
2681 | <tr><td> |
|
2565 | <tr><td> | |
2682 | <a href="/help/hgalias"> |
|
2566 | <a href="/help/hgalias"> | |
2683 | hgalias |
|
2567 | hgalias | |
2684 | </a> |
|
2568 | </a> | |
2685 | </td><td> |
|
2569 | </td><td> | |
2686 | My doc |
|
2570 | My doc | |
2687 | </td></tr> |
|
2571 | </td></tr> | |
2688 | <tr><td> |
|
2572 | <tr><td> | |
2689 | <a href="/help/hgaliasnodoc"> |
|
2573 | <a href="/help/hgaliasnodoc"> | |
2690 | hgaliasnodoc |
|
2574 | hgaliasnodoc | |
2691 | </a> |
|
2575 | </a> | |
2692 | </td><td> |
|
2576 | </td><td> | |
2693 | summarize working directory state |
|
2577 | summarize working directory state | |
2694 | </td></tr> |
|
2578 | </td></tr> | |
2695 | <tr><td> |
|
2579 | <tr><td> | |
2696 | <a href="/help/identify"> |
|
2580 | <a href="/help/identify"> | |
2697 | identify |
|
2581 | identify | |
2698 | </a> |
|
2582 | </a> | |
2699 | </td><td> |
|
2583 | </td><td> | |
2700 | identify the working directory or specified revision |
|
2584 | identify the working directory or specified revision | |
2701 | </td></tr> |
|
2585 | </td></tr> | |
2702 | <tr><td> |
|
2586 | <tr><td> | |
2703 | <a href="/help/import"> |
|
2587 | <a href="/help/import"> | |
2704 | import |
|
2588 | import | |
2705 | </a> |
|
2589 | </a> | |
2706 | </td><td> |
|
2590 | </td><td> | |
2707 | import an ordered set of patches |
|
2591 | import an ordered set of patches | |
2708 | </td></tr> |
|
2592 | </td></tr> | |
2709 | <tr><td> |
|
2593 | <tr><td> | |
2710 | <a href="/help/incoming"> |
|
2594 | <a href="/help/incoming"> | |
2711 | incoming |
|
2595 | incoming | |
2712 | </a> |
|
2596 | </a> | |
2713 | </td><td> |
|
2597 | </td><td> | |
2714 | show new changesets found in source |
|
2598 | show new changesets found in source | |
2715 | </td></tr> |
|
2599 | </td></tr> | |
2716 | <tr><td> |
|
2600 | <tr><td> | |
2717 | <a href="/help/manifest"> |
|
2601 | <a href="/help/manifest"> | |
2718 | manifest |
|
2602 | manifest | |
2719 | </a> |
|
2603 | </a> | |
2720 | </td><td> |
|
2604 | </td><td> | |
2721 | output the current or given revision of the project manifest |
|
2605 | output the current or given revision of the project manifest | |
2722 | </td></tr> |
|
2606 | </td></tr> | |
2723 | <tr><td> |
|
2607 | <tr><td> | |
2724 | <a href="/help/nohelp"> |
|
2608 | <a href="/help/nohelp"> | |
2725 | nohelp |
|
2609 | nohelp | |
2726 | </a> |
|
2610 | </a> | |
2727 | </td><td> |
|
2611 | </td><td> | |
2728 | (no help text available) |
|
2612 | (no help text available) | |
2729 | </td></tr> |
|
2613 | </td></tr> | |
2730 | <tr><td> |
|
2614 | <tr><td> | |
2731 | <a href="/help/outgoing"> |
|
2615 | <a href="/help/outgoing"> | |
2732 | outgoing |
|
2616 | outgoing | |
2733 | </a> |
|
2617 | </a> | |
2734 | </td><td> |
|
2618 | </td><td> | |
2735 | show changesets not found in the destination |
|
2619 | show changesets not found in the destination | |
2736 | </td></tr> |
|
2620 | </td></tr> | |
2737 | <tr><td> |
|
2621 | <tr><td> | |
2738 | <a href="/help/paths"> |
|
2622 | <a href="/help/paths"> | |
2739 | paths |
|
2623 | paths | |
2740 | </a> |
|
2624 | </a> | |
2741 | </td><td> |
|
2625 | </td><td> | |
2742 | show aliases for remote repositories |
|
2626 | show aliases for remote repositories | |
2743 | </td></tr> |
|
2627 | </td></tr> | |
2744 | <tr><td> |
|
2628 | <tr><td> | |
2745 | <a href="/help/phase"> |
|
2629 | <a href="/help/phase"> | |
2746 | phase |
|
2630 | phase | |
2747 | </a> |
|
2631 | </a> | |
2748 | </td><td> |
|
2632 | </td><td> | |
2749 | set or show the current phase name |
|
2633 | set or show the current phase name | |
2750 | </td></tr> |
|
2634 | </td></tr> | |
2751 | <tr><td> |
|
2635 | <tr><td> | |
2752 | <a href="/help/recover"> |
|
2636 | <a href="/help/recover"> | |
2753 | recover |
|
2637 | recover | |
2754 | </a> |
|
2638 | </a> | |
2755 | </td><td> |
|
2639 | </td><td> | |
2756 | roll back an interrupted transaction |
|
2640 | roll back an interrupted transaction | |
2757 | </td></tr> |
|
2641 | </td></tr> | |
2758 | <tr><td> |
|
2642 | <tr><td> | |
2759 | <a href="/help/rename"> |
|
2643 | <a href="/help/rename"> | |
2760 | rename |
|
2644 | rename | |
2761 | </a> |
|
2645 | </a> | |
2762 | </td><td> |
|
2646 | </td><td> | |
2763 | rename files; equivalent of copy + remove |
|
2647 | rename files; equivalent of copy + remove | |
2764 | </td></tr> |
|
2648 | </td></tr> | |
2765 | <tr><td> |
|
2649 | <tr><td> | |
2766 | <a href="/help/resolve"> |
|
2650 | <a href="/help/resolve"> | |
2767 | resolve |
|
2651 | resolve | |
2768 | </a> |
|
2652 | </a> | |
2769 | </td><td> |
|
2653 | </td><td> | |
2770 | redo merges or set/view the merge status of files |
|
2654 | redo merges or set/view the merge status of files | |
2771 | </td></tr> |
|
2655 | </td></tr> | |
2772 | <tr><td> |
|
2656 | <tr><td> | |
2773 | <a href="/help/revert"> |
|
2657 | <a href="/help/revert"> | |
2774 | revert |
|
2658 | revert | |
2775 | </a> |
|
2659 | </a> | |
2776 | </td><td> |
|
2660 | </td><td> | |
2777 | restore files to their checkout state |
|
2661 | restore files to their checkout state | |
2778 | </td></tr> |
|
2662 | </td></tr> | |
2779 | <tr><td> |
|
2663 | <tr><td> | |
2780 | <a href="/help/root"> |
|
2664 | <a href="/help/root"> | |
2781 | root |
|
2665 | root | |
2782 | </a> |
|
2666 | </a> | |
2783 | </td><td> |
|
2667 | </td><td> | |
2784 | print the root (top) of the current working directory |
|
2668 | print the root (top) of the current working directory | |
2785 | </td></tr> |
|
2669 | </td></tr> | |
2786 | <tr><td> |
|
2670 | <tr><td> | |
2787 | <a href="/help/shellalias"> |
|
2671 | <a href="/help/shellalias"> | |
2788 | shellalias |
|
2672 | shellalias | |
2789 | </a> |
|
2673 | </a> | |
2790 | </td><td> |
|
2674 | </td><td> | |
2791 | (no help text available) |
|
2675 | (no help text available) | |
2792 | </td></tr> |
|
2676 | </td></tr> | |
2793 | <tr><td> |
|
2677 | <tr><td> | |
2794 | <a href="/help/tag"> |
|
2678 | <a href="/help/tag"> | |
2795 | tag |
|
2679 | tag | |
2796 | </a> |
|
2680 | </a> | |
2797 | </td><td> |
|
2681 | </td><td> | |
2798 | add one or more tags for the current or given revision |
|
2682 | add one or more tags for the current or given revision | |
2799 | </td></tr> |
|
2683 | </td></tr> | |
2800 | <tr><td> |
|
2684 | <tr><td> | |
2801 | <a href="/help/tags"> |
|
2685 | <a href="/help/tags"> | |
2802 | tags |
|
2686 | tags | |
2803 | </a> |
|
2687 | </a> | |
2804 | </td><td> |
|
2688 | </td><td> | |
2805 | list repository tags |
|
2689 | list repository tags | |
2806 | </td></tr> |
|
2690 | </td></tr> | |
2807 | <tr><td> |
|
2691 | <tr><td> | |
2808 | <a href="/help/unbundle"> |
|
2692 | <a href="/help/unbundle"> | |
2809 | unbundle |
|
2693 | unbundle | |
2810 | </a> |
|
2694 | </a> | |
2811 | </td><td> |
|
2695 | </td><td> | |
2812 | apply one or more bundle files |
|
2696 | apply one or more bundle files | |
2813 | </td></tr> |
|
2697 | </td></tr> | |
2814 | <tr><td> |
|
2698 | <tr><td> | |
2815 | <a href="/help/verify"> |
|
2699 | <a href="/help/verify"> | |
2816 | verify |
|
2700 | verify | |
2817 | </a> |
|
2701 | </a> | |
2818 | </td><td> |
|
2702 | </td><td> | |
2819 | verify the integrity of the repository |
|
2703 | verify the integrity of the repository | |
2820 | </td></tr> |
|
2704 | </td></tr> | |
2821 | <tr><td> |
|
2705 | <tr><td> | |
2822 | <a href="/help/version"> |
|
2706 | <a href="/help/version"> | |
2823 | version |
|
2707 | version | |
2824 | </a> |
|
2708 | </a> | |
2825 | </td><td> |
|
2709 | </td><td> | |
2826 | output version and copyright information |
|
2710 | output version and copyright information | |
2827 | </td></tr> |
|
2711 | </td></tr> | |
2828 |
|
2712 | |||
2829 |
|
2713 | |||
2830 | </table> |
|
2714 | </table> | |
2831 | </div> |
|
2715 | </div> | |
2832 | </div> |
|
2716 | </div> | |
2833 |
|
2717 | |||
2834 |
|
2718 | |||
2835 |
|
2719 | |||
2836 | </body> |
|
2720 | </body> | |
2837 | </html> |
|
2721 | </html> | |
2838 |
|
2722 | |||
2839 |
|
2723 | |||
2840 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2724 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" | |
2841 | 200 Script output follows |
|
2725 | 200 Script output follows | |
2842 |
|
2726 | |||
2843 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2727 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2844 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2728 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2845 | <head> |
|
2729 | <head> | |
2846 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2730 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2847 | <meta name="robots" content="index, nofollow" /> |
|
2731 | <meta name="robots" content="index, nofollow" /> | |
2848 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2732 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2849 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2733 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2850 |
|
2734 | |||
2851 | <title>Help: add</title> |
|
2735 | <title>Help: add</title> | |
2852 | </head> |
|
2736 | </head> | |
2853 | <body> |
|
2737 | <body> | |
2854 |
|
2738 | |||
2855 | <div class="container"> |
|
2739 | <div class="container"> | |
2856 | <div class="menu"> |
|
2740 | <div class="menu"> | |
2857 | <div class="logo"> |
|
2741 | <div class="logo"> | |
2858 | <a href="https://mercurial-scm.org/"> |
|
2742 | <a href="https://mercurial-scm.org/"> | |
2859 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2743 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2860 | </div> |
|
2744 | </div> | |
2861 | <ul> |
|
2745 | <ul> | |
2862 | <li><a href="/shortlog">log</a></li> |
|
2746 | <li><a href="/shortlog">log</a></li> | |
2863 | <li><a href="/graph">graph</a></li> |
|
2747 | <li><a href="/graph">graph</a></li> | |
2864 | <li><a href="/tags">tags</a></li> |
|
2748 | <li><a href="/tags">tags</a></li> | |
2865 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2749 | <li><a href="/bookmarks">bookmarks</a></li> | |
2866 | <li><a href="/branches">branches</a></li> |
|
2750 | <li><a href="/branches">branches</a></li> | |
2867 | </ul> |
|
2751 | </ul> | |
2868 | <ul> |
|
2752 | <ul> | |
2869 | <li class="active"><a href="/help">help</a></li> |
|
2753 | <li class="active"><a href="/help">help</a></li> | |
2870 | </ul> |
|
2754 | </ul> | |
2871 | </div> |
|
2755 | </div> | |
2872 |
|
2756 | |||
2873 | <div class="main"> |
|
2757 | <div class="main"> | |
2874 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2758 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2875 | <h3>Help: add</h3> |
|
2759 | <h3>Help: add</h3> | |
2876 |
|
2760 | |||
2877 | <form class="search" action="/log"> |
|
2761 | <form class="search" action="/log"> | |
2878 |
|
2762 | |||
2879 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2763 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2880 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2764 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2881 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2765 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2882 | </form> |
|
2766 | </form> | |
2883 | <div id="doc"> |
|
2767 | <div id="doc"> | |
2884 | <p> |
|
2768 | <p> | |
2885 | hg add [OPTION]... [FILE]... |
|
2769 | hg add [OPTION]... [FILE]... | |
2886 | </p> |
|
2770 | </p> | |
2887 | <p> |
|
2771 | <p> | |
2888 | add the specified files on the next commit |
|
2772 | add the specified files on the next commit | |
2889 | </p> |
|
2773 | </p> | |
2890 | <p> |
|
2774 | <p> | |
2891 | Schedule files to be version controlled and added to the |
|
2775 | Schedule files to be version controlled and added to the | |
2892 | repository. |
|
2776 | repository. | |
2893 | </p> |
|
2777 | </p> | |
2894 | <p> |
|
2778 | <p> | |
2895 | The files will be added to the repository at the next commit. To |
|
2779 | The files will be added to the repository at the next commit. To | |
2896 | undo an add before that, see 'hg forget'. |
|
2780 | undo an add before that, see 'hg forget'. | |
2897 | </p> |
|
2781 | </p> | |
2898 | <p> |
|
2782 | <p> | |
2899 | If no names are given, add all files to the repository (except |
|
2783 | If no names are given, add all files to the repository (except | |
2900 | files matching ".hgignore"). |
|
2784 | files matching ".hgignore"). | |
2901 | </p> |
|
2785 | </p> | |
2902 | <p> |
|
2786 | <p> | |
2903 | Examples: |
|
2787 | Examples: | |
2904 | </p> |
|
2788 | </p> | |
2905 | <ul> |
|
2789 | <ul> | |
2906 | <li> New (unknown) files are added automatically by 'hg add': |
|
2790 | <li> New (unknown) files are added automatically by 'hg add': | |
2907 | <pre> |
|
2791 | <pre> | |
2908 | \$ ls (re) |
|
2792 | \$ ls (re) | |
2909 | foo.c |
|
2793 | foo.c | |
2910 | \$ hg status (re) |
|
2794 | \$ hg status (re) | |
2911 | ? foo.c |
|
2795 | ? foo.c | |
2912 | \$ hg add (re) |
|
2796 | \$ hg add (re) | |
2913 | adding foo.c |
|
2797 | adding foo.c | |
2914 | \$ hg status (re) |
|
2798 | \$ hg status (re) | |
2915 | A foo.c |
|
2799 | A foo.c | |
2916 | </pre> |
|
2800 | </pre> | |
2917 | <li> Specific files to be added can be specified: |
|
2801 | <li> Specific files to be added can be specified: | |
2918 | <pre> |
|
2802 | <pre> | |
2919 | \$ ls (re) |
|
2803 | \$ ls (re) | |
2920 | bar.c foo.c |
|
2804 | bar.c foo.c | |
2921 | \$ hg status (re) |
|
2805 | \$ hg status (re) | |
2922 | ? bar.c |
|
2806 | ? bar.c | |
2923 | ? foo.c |
|
2807 | ? foo.c | |
2924 | \$ hg add bar.c (re) |
|
2808 | \$ hg add bar.c (re) | |
2925 | \$ hg status (re) |
|
2809 | \$ hg status (re) | |
2926 | A bar.c |
|
2810 | A bar.c | |
2927 | ? foo.c |
|
2811 | ? foo.c | |
2928 | </pre> |
|
2812 | </pre> | |
2929 | </ul> |
|
2813 | </ul> | |
2930 | <p> |
|
2814 | <p> | |
2931 | Returns 0 if all files are successfully added. |
|
2815 | Returns 0 if all files are successfully added. | |
2932 | </p> |
|
2816 | </p> | |
2933 | <p> |
|
2817 | <p> | |
2934 | options ([+] can be repeated): |
|
2818 | options ([+] can be repeated): | |
2935 | </p> |
|
2819 | </p> | |
2936 | <table> |
|
2820 | <table> | |
2937 | <tr><td>-I</td> |
|
2821 | <tr><td>-I</td> | |
2938 | <td>--include PATTERN [+]</td> |
|
2822 | <td>--include PATTERN [+]</td> | |
2939 | <td>include names matching the given patterns</td></tr> |
|
2823 | <td>include names matching the given patterns</td></tr> | |
2940 | <tr><td>-X</td> |
|
2824 | <tr><td>-X</td> | |
2941 | <td>--exclude PATTERN [+]</td> |
|
2825 | <td>--exclude PATTERN [+]</td> | |
2942 | <td>exclude names matching the given patterns</td></tr> |
|
2826 | <td>exclude names matching the given patterns</td></tr> | |
2943 | <tr><td>-S</td> |
|
2827 | <tr><td>-S</td> | |
2944 | <td>--subrepos</td> |
|
2828 | <td>--subrepos</td> | |
2945 | <td>recurse into subrepositories</td></tr> |
|
2829 | <td>recurse into subrepositories</td></tr> | |
2946 | <tr><td>-n</td> |
|
2830 | <tr><td>-n</td> | |
2947 | <td>--dry-run</td> |
|
2831 | <td>--dry-run</td> | |
2948 | <td>do not perform actions, just print output</td></tr> |
|
2832 | <td>do not perform actions, just print output</td></tr> | |
2949 | </table> |
|
2833 | </table> | |
2950 | <p> |
|
2834 | <p> | |
2951 | global options ([+] can be repeated): |
|
2835 | global options ([+] can be repeated): | |
2952 | </p> |
|
2836 | </p> | |
2953 | <table> |
|
2837 | <table> | |
2954 | <tr><td>-R</td> |
|
2838 | <tr><td>-R</td> | |
2955 | <td>--repository REPO</td> |
|
2839 | <td>--repository REPO</td> | |
2956 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2840 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2957 | <tr><td></td> |
|
2841 | <tr><td></td> | |
2958 | <td>--cwd DIR</td> |
|
2842 | <td>--cwd DIR</td> | |
2959 | <td>change working directory</td></tr> |
|
2843 | <td>change working directory</td></tr> | |
2960 | <tr><td>-y</td> |
|
2844 | <tr><td>-y</td> | |
2961 | <td>--noninteractive</td> |
|
2845 | <td>--noninteractive</td> | |
2962 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2846 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2963 | <tr><td>-q</td> |
|
2847 | <tr><td>-q</td> | |
2964 | <td>--quiet</td> |
|
2848 | <td>--quiet</td> | |
2965 | <td>suppress output</td></tr> |
|
2849 | <td>suppress output</td></tr> | |
2966 | <tr><td>-v</td> |
|
2850 | <tr><td>-v</td> | |
2967 | <td>--verbose</td> |
|
2851 | <td>--verbose</td> | |
2968 | <td>enable additional output</td></tr> |
|
2852 | <td>enable additional output</td></tr> | |
2969 | <tr><td></td> |
|
2853 | <tr><td></td> | |
2970 | <td>--color TYPE</td> |
|
2854 | <td>--color TYPE</td> | |
2971 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2855 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
2972 | <tr><td></td> |
|
2856 | <tr><td></td> | |
2973 | <td>--config CONFIG [+]</td> |
|
2857 | <td>--config CONFIG [+]</td> | |
2974 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2858 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2975 | <tr><td></td> |
|
2859 | <tr><td></td> | |
2976 | <td>--debug</td> |
|
2860 | <td>--debug</td> | |
2977 | <td>enable debugging output</td></tr> |
|
2861 | <td>enable debugging output</td></tr> | |
2978 | <tr><td></td> |
|
2862 | <tr><td></td> | |
2979 | <td>--debugger</td> |
|
2863 | <td>--debugger</td> | |
2980 | <td>start debugger</td></tr> |
|
2864 | <td>start debugger</td></tr> | |
2981 | <tr><td></td> |
|
2865 | <tr><td></td> | |
2982 | <td>--encoding ENCODE</td> |
|
2866 | <td>--encoding ENCODE</td> | |
2983 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2867 | <td>set the charset encoding (default: ascii)</td></tr> | |
2984 | <tr><td></td> |
|
2868 | <tr><td></td> | |
2985 | <td>--encodingmode MODE</td> |
|
2869 | <td>--encodingmode MODE</td> | |
2986 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2870 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2987 | <tr><td></td> |
|
2871 | <tr><td></td> | |
2988 | <td>--traceback</td> |
|
2872 | <td>--traceback</td> | |
2989 | <td>always print a traceback on exception</td></tr> |
|
2873 | <td>always print a traceback on exception</td></tr> | |
2990 | <tr><td></td> |
|
2874 | <tr><td></td> | |
2991 | <td>--time</td> |
|
2875 | <td>--time</td> | |
2992 | <td>time how long the command takes</td></tr> |
|
2876 | <td>time how long the command takes</td></tr> | |
2993 | <tr><td></td> |
|
2877 | <tr><td></td> | |
2994 | <td>--profile</td> |
|
2878 | <td>--profile</td> | |
2995 | <td>print command execution profile</td></tr> |
|
2879 | <td>print command execution profile</td></tr> | |
2996 | <tr><td></td> |
|
2880 | <tr><td></td> | |
2997 | <td>--version</td> |
|
2881 | <td>--version</td> | |
2998 | <td>output version information and exit</td></tr> |
|
2882 | <td>output version information and exit</td></tr> | |
2999 | <tr><td>-h</td> |
|
2883 | <tr><td>-h</td> | |
3000 | <td>--help</td> |
|
2884 | <td>--help</td> | |
3001 | <td>display help and exit</td></tr> |
|
2885 | <td>display help and exit</td></tr> | |
3002 | <tr><td></td> |
|
2886 | <tr><td></td> | |
3003 | <td>--hidden</td> |
|
2887 | <td>--hidden</td> | |
3004 | <td>consider hidden changesets</td></tr> |
|
2888 | <td>consider hidden changesets</td></tr> | |
3005 | <tr><td></td> |
|
2889 | <tr><td></td> | |
3006 | <td>--pager TYPE</td> |
|
2890 | <td>--pager TYPE</td> | |
3007 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2891 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
3008 | </table> |
|
2892 | </table> | |
3009 |
|
2893 | |||
3010 | </div> |
|
2894 | </div> | |
3011 | </div> |
|
2895 | </div> | |
3012 | </div> |
|
2896 | </div> | |
3013 |
|
2897 | |||
3014 |
|
2898 | |||
3015 |
|
2899 | |||
3016 | </body> |
|
2900 | </body> | |
3017 | </html> |
|
2901 | </html> | |
3018 |
|
2902 | |||
3019 |
|
2903 | |||
3020 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
2904 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" | |
3021 | 200 Script output follows |
|
2905 | 200 Script output follows | |
3022 |
|
2906 | |||
3023 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2907 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3024 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2908 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3025 | <head> |
|
2909 | <head> | |
3026 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2910 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3027 | <meta name="robots" content="index, nofollow" /> |
|
2911 | <meta name="robots" content="index, nofollow" /> | |
3028 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2912 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3029 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2913 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3030 |
|
2914 | |||
3031 | <title>Help: remove</title> |
|
2915 | <title>Help: remove</title> | |
3032 | </head> |
|
2916 | </head> | |
3033 | <body> |
|
2917 | <body> | |
3034 |
|
2918 | |||
3035 | <div class="container"> |
|
2919 | <div class="container"> | |
3036 | <div class="menu"> |
|
2920 | <div class="menu"> | |
3037 | <div class="logo"> |
|
2921 | <div class="logo"> | |
3038 | <a href="https://mercurial-scm.org/"> |
|
2922 | <a href="https://mercurial-scm.org/"> | |
3039 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2923 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3040 | </div> |
|
2924 | </div> | |
3041 | <ul> |
|
2925 | <ul> | |
3042 | <li><a href="/shortlog">log</a></li> |
|
2926 | <li><a href="/shortlog">log</a></li> | |
3043 | <li><a href="/graph">graph</a></li> |
|
2927 | <li><a href="/graph">graph</a></li> | |
3044 | <li><a href="/tags">tags</a></li> |
|
2928 | <li><a href="/tags">tags</a></li> | |
3045 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2929 | <li><a href="/bookmarks">bookmarks</a></li> | |
3046 | <li><a href="/branches">branches</a></li> |
|
2930 | <li><a href="/branches">branches</a></li> | |
3047 | </ul> |
|
2931 | </ul> | |
3048 | <ul> |
|
2932 | <ul> | |
3049 | <li class="active"><a href="/help">help</a></li> |
|
2933 | <li class="active"><a href="/help">help</a></li> | |
3050 | </ul> |
|
2934 | </ul> | |
3051 | </div> |
|
2935 | </div> | |
3052 |
|
2936 | |||
3053 | <div class="main"> |
|
2937 | <div class="main"> | |
3054 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2938 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3055 | <h3>Help: remove</h3> |
|
2939 | <h3>Help: remove</h3> | |
3056 |
|
2940 | |||
3057 | <form class="search" action="/log"> |
|
2941 | <form class="search" action="/log"> | |
3058 |
|
2942 | |||
3059 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2943 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3060 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2944 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3061 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2945 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3062 | </form> |
|
2946 | </form> | |
3063 | <div id="doc"> |
|
2947 | <div id="doc"> | |
3064 | <p> |
|
2948 | <p> | |
3065 | hg remove [OPTION]... FILE... |
|
2949 | hg remove [OPTION]... FILE... | |
3066 | </p> |
|
2950 | </p> | |
3067 | <p> |
|
2951 | <p> | |
3068 | aliases: rm |
|
2952 | aliases: rm | |
3069 | </p> |
|
2953 | </p> | |
3070 | <p> |
|
2954 | <p> | |
3071 | remove the specified files on the next commit |
|
2955 | remove the specified files on the next commit | |
3072 | </p> |
|
2956 | </p> | |
3073 | <p> |
|
2957 | <p> | |
3074 | Schedule the indicated files for removal from the current branch. |
|
2958 | Schedule the indicated files for removal from the current branch. | |
3075 | </p> |
|
2959 | </p> | |
3076 | <p> |
|
2960 | <p> | |
3077 | This command schedules the files to be removed at the next commit. |
|
2961 | This command schedules the files to be removed at the next commit. | |
3078 |
To undo a remove before that, see 'hg |
|
2962 | To undo a remove before that, see 'hg revert'. To undo added | |
3079 | files, see 'hg forget'. |
|
2963 | files, see 'hg forget'. | |
3080 | </p> |
|
2964 | </p> | |
3081 | <p> |
|
2965 | <p> | |
3082 | -A/--after can be used to remove only files that have already |
|
2966 | -A/--after can be used to remove only files that have already | |
3083 | been deleted, -f/--force can be used to force deletion, and -Af |
|
2967 | been deleted, -f/--force can be used to force deletion, and -Af | |
3084 | can be used to remove files from the next revision without |
|
2968 | can be used to remove files from the next revision without | |
3085 | deleting them from the working directory. |
|
2969 | deleting them from the working directory. | |
3086 | </p> |
|
2970 | </p> | |
3087 | <p> |
|
2971 | <p> | |
3088 | The following table details the behavior of remove for different |
|
2972 | The following table details the behavior of remove for different | |
3089 | file states (columns) and option combinations (rows). The file |
|
2973 | file states (columns) and option combinations (rows). The file | |
3090 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
2974 | states are Added [A], Clean [C], Modified [M] and Missing [!] | |
3091 |
(as reported by 'hg |
|
2975 | (as reported by 'hg status'). The actions are Warn, Remove | |
3092 | (from branch) and Delete (from disk): |
|
2976 | (from branch) and Delete (from disk): | |
3093 | </p> |
|
2977 | </p> | |
3094 | <table> |
|
2978 | <table> | |
3095 | <tr><td>opt/state</td> |
|
2979 | <tr><td>opt/state</td> | |
3096 | <td>A</td> |
|
2980 | <td>A</td> | |
3097 | <td>C</td> |
|
2981 | <td>C</td> | |
3098 | <td>M</td> |
|
2982 | <td>M</td> | |
3099 | <td>!</td></tr> |
|
2983 | <td>!</td></tr> | |
3100 | <tr><td>none</td> |
|
2984 | <tr><td>none</td> | |
3101 | <td>W</td> |
|
2985 | <td>W</td> | |
3102 | <td>RD</td> |
|
2986 | <td>RD</td> | |
3103 | <td>W</td> |
|
2987 | <td>W</td> | |
3104 | <td>R</td></tr> |
|
2988 | <td>R</td></tr> | |
3105 | <tr><td>-f</td> |
|
2989 | <tr><td>-f</td> | |
3106 | <td>R</td> |
|
2990 | <td>R</td> | |
3107 | <td>RD</td> |
|
2991 | <td>RD</td> | |
3108 | <td>RD</td> |
|
2992 | <td>RD</td> | |
3109 | <td>R</td></tr> |
|
2993 | <td>R</td></tr> | |
3110 | <tr><td>-A</td> |
|
2994 | <tr><td>-A</td> | |
3111 | <td>W</td> |
|
2995 | <td>W</td> | |
3112 | <td>W</td> |
|
2996 | <td>W</td> | |
3113 | <td>W</td> |
|
2997 | <td>W</td> | |
3114 | <td>R</td></tr> |
|
2998 | <td>R</td></tr> | |
3115 | <tr><td>-Af</td> |
|
2999 | <tr><td>-Af</td> | |
3116 | <td>R</td> |
|
3000 | <td>R</td> | |
3117 | <td>R</td> |
|
3001 | <td>R</td> | |
3118 | <td>R</td> |
|
3002 | <td>R</td> | |
3119 | <td>R</td></tr> |
|
3003 | <td>R</td></tr> | |
3120 | </table> |
|
3004 | </table> | |
3121 | <p> |
|
3005 | <p> | |
3122 | <b>Note:</b> |
|
3006 | <b>Note:</b> | |
3123 | </p> |
|
3007 | </p> | |
3124 | <p> |
|
3008 | <p> | |
3125 |
'hg |
|
3009 | 'hg remove' never deletes files in Added [A] state from the | |
3126 | working directory, not even if "--force" is specified. |
|
3010 | working directory, not even if "--force" is specified. | |
3127 | </p> |
|
3011 | </p> | |
3128 | <p> |
|
3012 | <p> | |
3129 | Returns 0 on success, 1 if any warnings encountered. |
|
3013 | Returns 0 on success, 1 if any warnings encountered. | |
3130 | </p> |
|
3014 | </p> | |
3131 | <p> |
|
3015 | <p> | |
3132 | options ([+] can be repeated): |
|
3016 | options ([+] can be repeated): | |
3133 | </p> |
|
3017 | </p> | |
3134 | <table> |
|
3018 | <table> | |
3135 | <tr><td>-A</td> |
|
3019 | <tr><td>-A</td> | |
3136 | <td>--after</td> |
|
3020 | <td>--after</td> | |
3137 | <td>record delete for missing files</td></tr> |
|
3021 | <td>record delete for missing files</td></tr> | |
3138 | <tr><td>-f</td> |
|
3022 | <tr><td>-f</td> | |
3139 | <td>--force</td> |
|
3023 | <td>--force</td> | |
3140 | <td>forget added files, delete modified files</td></tr> |
|
3024 | <td>forget added files, delete modified files</td></tr> | |
3141 | <tr><td>-S</td> |
|
3025 | <tr><td>-S</td> | |
3142 | <td>--subrepos</td> |
|
3026 | <td>--subrepos</td> | |
3143 | <td>recurse into subrepositories</td></tr> |
|
3027 | <td>recurse into subrepositories</td></tr> | |
3144 | <tr><td>-I</td> |
|
3028 | <tr><td>-I</td> | |
3145 | <td>--include PATTERN [+]</td> |
|
3029 | <td>--include PATTERN [+]</td> | |
3146 | <td>include names matching the given patterns</td></tr> |
|
3030 | <td>include names matching the given patterns</td></tr> | |
3147 | <tr><td>-X</td> |
|
3031 | <tr><td>-X</td> | |
3148 | <td>--exclude PATTERN [+]</td> |
|
3032 | <td>--exclude PATTERN [+]</td> | |
3149 | <td>exclude names matching the given patterns</td></tr> |
|
3033 | <td>exclude names matching the given patterns</td></tr> | |
3150 | <tr><td>-n</td> |
|
3034 | <tr><td>-n</td> | |
3151 | <td>--dry-run</td> |
|
3035 | <td>--dry-run</td> | |
3152 | <td>do not perform actions, just print output</td></tr> |
|
3036 | <td>do not perform actions, just print output</td></tr> | |
3153 | </table> |
|
3037 | </table> | |
3154 | <p> |
|
3038 | <p> | |
3155 | global options ([+] can be repeated): |
|
3039 | global options ([+] can be repeated): | |
3156 | </p> |
|
3040 | </p> | |
3157 | <table> |
|
3041 | <table> | |
3158 | <tr><td>-R</td> |
|
3042 | <tr><td>-R</td> | |
3159 | <td>--repository REPO</td> |
|
3043 | <td>--repository REPO</td> | |
3160 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
3044 | <td>repository root directory or name of overlay bundle file</td></tr> | |
3161 | <tr><td></td> |
|
3045 | <tr><td></td> | |
3162 | <td>--cwd DIR</td> |
|
3046 | <td>--cwd DIR</td> | |
3163 | <td>change working directory</td></tr> |
|
3047 | <td>change working directory</td></tr> | |
3164 | <tr><td>-y</td> |
|
3048 | <tr><td>-y</td> | |
3165 | <td>--noninteractive</td> |
|
3049 | <td>--noninteractive</td> | |
3166 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
3050 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
3167 | <tr><td>-q</td> |
|
3051 | <tr><td>-q</td> | |
3168 | <td>--quiet</td> |
|
3052 | <td>--quiet</td> | |
3169 | <td>suppress output</td></tr> |
|
3053 | <td>suppress output</td></tr> | |
3170 | <tr><td>-v</td> |
|
3054 | <tr><td>-v</td> | |
3171 | <td>--verbose</td> |
|
3055 | <td>--verbose</td> | |
3172 | <td>enable additional output</td></tr> |
|
3056 | <td>enable additional output</td></tr> | |
3173 | <tr><td></td> |
|
3057 | <tr><td></td> | |
3174 | <td>--color TYPE</td> |
|
3058 | <td>--color TYPE</td> | |
3175 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
3059 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
3176 | <tr><td></td> |
|
3060 | <tr><td></td> | |
3177 | <td>--config CONFIG [+]</td> |
|
3061 | <td>--config CONFIG [+]</td> | |
3178 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
3062 | <td>set/override config option (use 'section.name=value')</td></tr> | |
3179 | <tr><td></td> |
|
3063 | <tr><td></td> | |
3180 | <td>--debug</td> |
|
3064 | <td>--debug</td> | |
3181 | <td>enable debugging output</td></tr> |
|
3065 | <td>enable debugging output</td></tr> | |
3182 | <tr><td></td> |
|
3066 | <tr><td></td> | |
3183 | <td>--debugger</td> |
|
3067 | <td>--debugger</td> | |
3184 | <td>start debugger</td></tr> |
|
3068 | <td>start debugger</td></tr> | |
3185 | <tr><td></td> |
|
3069 | <tr><td></td> | |
3186 | <td>--encoding ENCODE</td> |
|
3070 | <td>--encoding ENCODE</td> | |
3187 | <td>set the charset encoding (default: ascii)</td></tr> |
|
3071 | <td>set the charset encoding (default: ascii)</td></tr> | |
3188 | <tr><td></td> |
|
3072 | <tr><td></td> | |
3189 | <td>--encodingmode MODE</td> |
|
3073 | <td>--encodingmode MODE</td> | |
3190 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
3074 | <td>set the charset encoding mode (default: strict)</td></tr> | |
3191 | <tr><td></td> |
|
3075 | <tr><td></td> | |
3192 | <td>--traceback</td> |
|
3076 | <td>--traceback</td> | |
3193 | <td>always print a traceback on exception</td></tr> |
|
3077 | <td>always print a traceback on exception</td></tr> | |
3194 | <tr><td></td> |
|
3078 | <tr><td></td> | |
3195 | <td>--time</td> |
|
3079 | <td>--time</td> | |
3196 | <td>time how long the command takes</td></tr> |
|
3080 | <td>time how long the command takes</td></tr> | |
3197 | <tr><td></td> |
|
3081 | <tr><td></td> | |
3198 | <td>--profile</td> |
|
3082 | <td>--profile</td> | |
3199 | <td>print command execution profile</td></tr> |
|
3083 | <td>print command execution profile</td></tr> | |
3200 | <tr><td></td> |
|
3084 | <tr><td></td> | |
3201 | <td>--version</td> |
|
3085 | <td>--version</td> | |
3202 | <td>output version information and exit</td></tr> |
|
3086 | <td>output version information and exit</td></tr> | |
3203 | <tr><td>-h</td> |
|
3087 | <tr><td>-h</td> | |
3204 | <td>--help</td> |
|
3088 | <td>--help</td> | |
3205 | <td>display help and exit</td></tr> |
|
3089 | <td>display help and exit</td></tr> | |
3206 | <tr><td></td> |
|
3090 | <tr><td></td> | |
3207 | <td>--hidden</td> |
|
3091 | <td>--hidden</td> | |
3208 | <td>consider hidden changesets</td></tr> |
|
3092 | <td>consider hidden changesets</td></tr> | |
3209 | <tr><td></td> |
|
3093 | <tr><td></td> | |
3210 | <td>--pager TYPE</td> |
|
3094 | <td>--pager TYPE</td> | |
3211 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
3095 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
3212 | </table> |
|
3096 | </table> | |
3213 |
|
3097 | |||
3214 | </div> |
|
3098 | </div> | |
3215 | </div> |
|
3099 | </div> | |
3216 | </div> |
|
3100 | </div> | |
3217 |
|
3101 | |||
3218 |
|
3102 | |||
3219 |
|
3103 | |||
3220 | </body> |
|
3104 | </body> | |
3221 | </html> |
|
3105 | </html> | |
3222 |
|
3106 | |||
3223 |
|
3107 | |||
3224 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
3108 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" | |
3225 | 200 Script output follows |
|
3109 | 200 Script output follows | |
3226 |
|
3110 | |||
3227 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3111 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3228 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3112 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3229 | <head> |
|
3113 | <head> | |
3230 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3114 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3231 | <meta name="robots" content="index, nofollow" /> |
|
3115 | <meta name="robots" content="index, nofollow" /> | |
3232 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3116 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3233 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3117 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3234 |
|
3118 | |||
3235 | <title>Help: dates</title> |
|
3119 | <title>Help: dates</title> | |
3236 | </head> |
|
3120 | </head> | |
3237 | <body> |
|
3121 | <body> | |
3238 |
|
3122 | |||
3239 | <div class="container"> |
|
3123 | <div class="container"> | |
3240 | <div class="menu"> |
|
3124 | <div class="menu"> | |
3241 | <div class="logo"> |
|
3125 | <div class="logo"> | |
3242 | <a href="https://mercurial-scm.org/"> |
|
3126 | <a href="https://mercurial-scm.org/"> | |
3243 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3127 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3244 | </div> |
|
3128 | </div> | |
3245 | <ul> |
|
3129 | <ul> | |
3246 | <li><a href="/shortlog">log</a></li> |
|
3130 | <li><a href="/shortlog">log</a></li> | |
3247 | <li><a href="/graph">graph</a></li> |
|
3131 | <li><a href="/graph">graph</a></li> | |
3248 | <li><a href="/tags">tags</a></li> |
|
3132 | <li><a href="/tags">tags</a></li> | |
3249 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3133 | <li><a href="/bookmarks">bookmarks</a></li> | |
3250 | <li><a href="/branches">branches</a></li> |
|
3134 | <li><a href="/branches">branches</a></li> | |
3251 | </ul> |
|
3135 | </ul> | |
3252 | <ul> |
|
3136 | <ul> | |
3253 | <li class="active"><a href="/help">help</a></li> |
|
3137 | <li class="active"><a href="/help">help</a></li> | |
3254 | </ul> |
|
3138 | </ul> | |
3255 | </div> |
|
3139 | </div> | |
3256 |
|
3140 | |||
3257 | <div class="main"> |
|
3141 | <div class="main"> | |
3258 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3142 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3259 | <h3>Help: dates</h3> |
|
3143 | <h3>Help: dates</h3> | |
3260 |
|
3144 | |||
3261 | <form class="search" action="/log"> |
|
3145 | <form class="search" action="/log"> | |
3262 |
|
3146 | |||
3263 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3147 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3264 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3148 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3265 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3149 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3266 | </form> |
|
3150 | </form> | |
3267 | <div id="doc"> |
|
3151 | <div id="doc"> | |
3268 | <h1>Date Formats</h1> |
|
3152 | <h1>Date Formats</h1> | |
3269 | <p> |
|
3153 | <p> | |
3270 | Some commands allow the user to specify a date, e.g.: |
|
3154 | Some commands allow the user to specify a date, e.g.: | |
3271 | </p> |
|
3155 | </p> | |
3272 | <ul> |
|
3156 | <ul> | |
3273 | <li> backout, commit, import, tag: Specify the commit date. |
|
3157 | <li> backout, commit, import, tag: Specify the commit date. | |
3274 | <li> log, revert, update: Select revision(s) by date. |
|
3158 | <li> log, revert, update: Select revision(s) by date. | |
3275 | </ul> |
|
3159 | </ul> | |
3276 | <p> |
|
3160 | <p> | |
3277 | Many date formats are valid. Here are some examples: |
|
3161 | Many date formats are valid. Here are some examples: | |
3278 | </p> |
|
3162 | </p> | |
3279 | <ul> |
|
3163 | <ul> | |
3280 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
3164 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
3281 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
3165 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
3282 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
3166 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
3283 | <li> "Dec 6" (midnight) |
|
3167 | <li> "Dec 6" (midnight) | |
3284 | <li> "13:18" (today assumed) |
|
3168 | <li> "13:18" (today assumed) | |
3285 | <li> "3:39" (3:39AM assumed) |
|
3169 | <li> "3:39" (3:39AM assumed) | |
3286 | <li> "3:39pm" (15:39) |
|
3170 | <li> "3:39pm" (15:39) | |
3287 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
3171 | <li> "2006-12-06 13:18:29" (ISO 8601 format) | |
3288 |
<li> " |
|
3172 | <li> "2006-12-6 13:18" | |
3289 |
<li> " |
|
3173 | <li> "2006-12-6" | |
3290 |
<li> " |
|
3174 | <li> "12-6" | |
3291 |
<li> " |
|
3175 | <li> "12/6" | |
3292 | <li> "12/6/6" (Dec 6 2006) |
|
3176 | <li> "12/6/6" (Dec 6 2006) | |
3293 | <li> "today" (midnight) |
|
3177 | <li> "today" (midnight) | |
3294 | <li> "yesterday" (midnight) |
|
3178 | <li> "yesterday" (midnight) | |
3295 | <li> "now" - right now |
|
3179 | <li> "now" - right now | |
3296 | </ul> |
|
3180 | </ul> | |
3297 | <p> |
|
3181 | <p> | |
3298 | Lastly, there is Mercurial's internal format: |
|
3182 | Lastly, there is Mercurial's internal format: | |
3299 |
|
|
3183 | </p> | |
3300 |
|
|
3184 | <ul> | |
3301 |
|
|
3185 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
3302 |
|
|
3186 | </ul> | |
3303 |
|
|
3187 | <p> | |
3304 | This is the internal representation format for dates. The first number |
|
3188 | This is the internal representation format for dates. The first number | |
3305 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
3189 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The | |
3306 | second is the offset of the local timezone, in seconds west of UTC |
|
3190 | second is the offset of the local timezone, in seconds west of UTC | |
3307 | (negative if the timezone is east of UTC). |
|
3191 | (negative if the timezone is east of UTC). | |
3308 |
|
|
3192 | </p> | |
3309 |
|
|
3193 | <p> | |
3310 | The log command also accepts date ranges: |
|
3194 | The log command also accepts date ranges: | |
3311 |
|
|
3195 | </p> | |
3312 |
|
|
3196 | <ul> | |
3313 |
|
|
3197 | <li> "<DATE" - at or before a given date/time | |
3314 |
|
|
3198 | <li> ">DATE" - on or after a given date/time | |
3315 |
|
|
3199 | <li> "DATE to DATE" - a date range, inclusive | |
3316 |
|
|
3200 | <li> "-DAYS" - within a given number of days of today | |
3317 |
|
|
3201 | </ul> | |
3318 |
|
|
3202 | ||
3319 |
|
|
3203 | </div> | |
3320 |
|
|
3204 | </div> | |
3321 |
|
|
3205 | </div> | |
3322 |
|
|
3206 | ||
3323 |
|
|
3207 | ||
3324 |
|
|
3208 | ||
3325 |
|
|
3209 | </body> | |
3326 |
|
|
3210 | </html> | |
3327 |
|
|
3211 | ||
3328 |
|
3212 | |||
3329 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" |
|
3213 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" | |
3330 | 200 Script output follows |
|
3214 | 200 Script output follows | |
3331 |
|
|
3215 | ||
3332 |
|
|
3216 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3333 |
|
|
3217 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3334 |
|
|
3218 | <head> | |
3335 |
|
|
3219 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3336 |
|
|
3220 | <meta name="robots" content="index, nofollow" /> | |
3337 |
|
|
3221 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3338 |
|
|
3222 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3339 |
|
|
3223 | ||
3340 |
|
|
3224 | <title>Help: pager</title> | |
3341 |
|
|
3225 | </head> | |
3342 |
|
|
3226 | <body> | |
3343 |
|
|
3227 | ||
3344 |
|
|
3228 | <div class="container"> | |
3345 |
|
|
3229 | <div class="menu"> | |
3346 |
|
|
3230 | <div class="logo"> | |
3347 |
|
|
3231 | <a href="https://mercurial-scm.org/"> | |
3348 |
|
|
3232 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3349 |
|
|
3233 | </div> | |
3350 |
|
|
3234 | <ul> | |
3351 |
|
|
3235 | <li><a href="/shortlog">log</a></li> | |
3352 |
|
|
3236 | <li><a href="/graph">graph</a></li> | |
3353 |
|
|
3237 | <li><a href="/tags">tags</a></li> | |
3354 |
|
|
3238 | <li><a href="/bookmarks">bookmarks</a></li> | |
3355 |
|
|
3239 | <li><a href="/branches">branches</a></li> | |
3356 |
|
|
3240 | </ul> | |
3357 |
|
|
3241 | <ul> | |
3358 |
|
|
3242 | <li class="active"><a href="/help">help</a></li> | |
3359 |
|
|
3243 | </ul> | |
3360 |
|
|
3244 | </div> | |
3361 |
|
|
3245 | ||
3362 |
|
|
3246 | <div class="main"> | |
3363 |
|
|
3247 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3364 |
|
|
3248 | <h3>Help: pager</h3> | |
3365 |
|
|
3249 | ||
3366 |
|
|
3250 | <form class="search" action="/log"> | |
3367 |
|
|
3251 | ||
3368 |
|
|
3252 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3369 |
|
|
3253 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3370 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3254 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3371 |
|
|
3255 | </form> | |
3372 |
|
|
3256 | <div id="doc"> | |
3373 |
|
|
3257 | <h1>Pager Support</h1> | |
3374 |
|
|
3258 | <p> | |
3375 | Some Mercurial commands can produce a lot of output, and Mercurial will |
|
3259 | Some Mercurial commands can produce a lot of output, and Mercurial will | |
3376 | attempt to use a pager to make those commands more pleasant. |
|
3260 | attempt to use a pager to make those commands more pleasant. | |
3377 |
|
|
3261 | </p> | |
3378 |
|
|
3262 | <p> | |
3379 | To set the pager that should be used, set the application variable: |
|
3263 | To set the pager that should be used, set the application variable: | |
3380 |
|
|
3264 | </p> | |
3381 |
|
|
3265 | <pre> | |
3382 | [pager] |
|
3266 | [pager] | |
3383 | pager = less -FRX |
|
3267 | pager = less -FRX | |
3384 |
|
|
3268 | </pre> | |
3385 |
|
|
3269 | <p> | |
3386 | If no pager is set in the user or repository configuration, Mercurial uses the |
|
3270 | If no pager is set in the user or repository configuration, Mercurial uses the | |
3387 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default |
|
3271 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default | |
3388 | or system configuration is used. If none of these are set, a default pager will |
|
3272 | or system configuration is used. If none of these are set, a default pager will | |
3389 | be used, typically 'less' on Unix and 'more' on Windows. |
|
3273 | be used, typically 'less' on Unix and 'more' on Windows. | |
3390 |
|
|
3274 | </p> | |
3391 |
|
|
3275 | <p> | |
3392 | You can disable the pager for certain commands by adding them to the |
|
3276 | You can disable the pager for certain commands by adding them to the | |
3393 | pager.ignore list: |
|
3277 | pager.ignore list: | |
3394 |
|
|
3278 | </p> | |
3395 |
|
|
3279 | <pre> | |
3396 | [pager] |
|
3280 | [pager] | |
3397 | ignore = version, help, update |
|
3281 | ignore = version, help, update | |
3398 |
|
|
3282 | </pre> | |
3399 |
|
|
3283 | <p> | |
3400 |
To |
|
3284 | To ignore global commands like 'hg version' or 'hg help', you have | |
3401 | to specify them in your user configuration file. |
|
3285 | to specify them in your user configuration file. | |
3402 |
|
|
3286 | </p> | |
3403 |
|
|
3287 | <p> | |
3404 | To control whether the pager is used at all for an individual command, |
|
3288 | To control whether the pager is used at all for an individual command, | |
3405 |
you can use --pager=<value>: |
|
3289 | you can use --pager=<value>: | |
3406 |
|
|
3290 | </p> | |
3407 |
|
|
3291 | <ul> | |
3408 |
|
|
3292 | <li> use as needed: 'auto'. | |
3409 |
|
|
3293 | <li> require the pager: 'yes' or 'on'. | |
3410 |
|
|
3294 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). | |
3411 |
|
|
3295 | </ul> | |
3412 |
|
|
3296 | <p> | |
3413 | To globally turn off all attempts to use a pager, set: |
|
3297 | To globally turn off all attempts to use a pager, set: | |
3414 |
|
|
3298 | </p> | |
3415 |
|
|
3299 | <pre> | |
3416 | [ui] |
|
3300 | [ui] | |
3417 | paginate = never |
|
3301 | paginate = never | |
3418 |
|
|
3302 | </pre> | |
3419 |
|
|
3303 | <p> | |
3420 | which will prevent the pager from running. |
|
3304 | which will prevent the pager from running. | |
3421 |
|
|
3305 | </p> | |
3422 |
|
|
3306 | ||
3423 |
|
|
3307 | </div> | |
3424 |
|
|
3308 | </div> | |
3425 |
|
|
3309 | </div> | |
3426 |
|
|
3310 | ||
3427 |
|
|
3311 | ||
3428 |
|
|
3312 | ||
3429 |
|
|
3313 | </body> | |
3430 |
|
|
3314 | </html> | |
3431 |
|
|
3315 | ||
3432 |
|
3316 | |||
3433 | Sub-topic indexes rendered properly |
|
3317 | Sub-topic indexes rendered properly | |
3434 |
|
3318 | |||
3435 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
3319 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" | |
3436 | 200 Script output follows |
|
3320 | 200 Script output follows | |
3437 |
|
|
3321 | ||
3438 |
|
|
3322 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3439 |
|
|
3323 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3440 |
|
|
3324 | <head> | |
3441 |
|
|
3325 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3442 |
|
|
3326 | <meta name="robots" content="index, nofollow" /> | |
3443 |
|
|
3327 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3444 |
|
|
3328 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3445 |
|
|
3329 | ||
3446 |
|
|
3330 | <title>Help: internals</title> | |
3447 |
|
|
3331 | </head> | |
3448 |
|
|
3332 | <body> | |
3449 |
|
|
3333 | ||
3450 |
|
|
3334 | <div class="container"> | |
3451 |
|
|
3335 | <div class="menu"> | |
3452 |
|
|
3336 | <div class="logo"> | |
3453 |
|
|
3337 | <a href="https://mercurial-scm.org/"> | |
3454 |
|
|
3338 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3455 |
|
|
3339 | </div> | |
3456 |
|
|
3340 | <ul> | |
3457 |
|
|
3341 | <li><a href="/shortlog">log</a></li> | |
3458 |
|
|
3342 | <li><a href="/graph">graph</a></li> | |
3459 |
|
|
3343 | <li><a href="/tags">tags</a></li> | |
3460 |
|
|
3344 | <li><a href="/bookmarks">bookmarks</a></li> | |
3461 |
|
|
3345 | <li><a href="/branches">branches</a></li> | |
3462 |
|
|
3346 | </ul> | |
3463 |
|
|
3347 | <ul> | |
3464 |
|
|
3348 | <li><a href="/help">help</a></li> | |
3465 |
|
|
3349 | </ul> | |
3466 |
|
|
3350 | </div> | |
3467 |
|
|
3351 | ||
3468 |
|
|
3352 | <div class="main"> | |
3469 |
|
|
3353 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3470 |
|
|
3354 | ||
3471 |
|
|
3355 | <form class="search" action="/log"> | |
3472 |
|
|
3356 | ||
3473 |
|
|
3357 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3474 |
|
|
3358 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3475 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3359 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3476 |
|
|
3360 | </form> | |
3477 |
|
|
3361 | <table class="bigtable"> | |
3478 |
|
|
3362 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
3479 |
|
|
3363 | ||
3480 |
|
|
3364 | <tr><td> | |
3481 |
|
|
3365 | <a href="/help/internals.bundle2"> | |
3482 | bundle2 |
|
3366 | bundle2 | |
3483 |
|
|
3367 | </a> | |
3484 |
|
|
3368 | </td><td> | |
3485 | Bundle2 |
|
3369 | Bundle2 | |
3486 |
|
|
3370 | </td></tr> | |
3487 |
|
|
3371 | <tr><td> | |
3488 |
|
|
3372 | <a href="/help/internals.bundles"> | |
3489 | bundles |
|
3373 | bundles | |
3490 |
|
|
3374 | </a> | |
3491 |
|
|
3375 | </td><td> | |
3492 | Bundles |
|
3376 | Bundles | |
3493 |
|
|
3377 | </td></tr> | |
3494 |
|
|
3378 | <tr><td> | |
3495 |
|
|
3379 | <a href="/help/internals.cbor"> | |
3496 | cbor |
|
3380 | cbor | |
3497 |
|
|
3381 | </a> | |
3498 |
|
|
3382 | </td><td> | |
3499 | CBOR |
|
3383 | CBOR | |
3500 |
|
|
3384 | </td></tr> | |
3501 |
|
|
3385 | <tr><td> | |
3502 |
|
|
3386 | <a href="/help/internals.censor"> | |
3503 | censor |
|
3387 | censor | |
3504 |
|
|
3388 | </a> | |
3505 |
|
|
3389 | </td><td> | |
3506 | Censor |
|
3390 | Censor | |
3507 |
|
|
3391 | </td></tr> | |
3508 |
|
|
3392 | <tr><td> | |
3509 |
|
|
3393 | <a href="/help/internals.changegroups"> | |
3510 | changegroups |
|
3394 | changegroups | |
3511 |
|
|
3395 | </a> | |
3512 |
|
|
3396 | </td><td> | |
3513 | Changegroups |
|
3397 | Changegroups | |
3514 |
|
|
3398 | </td></tr> | |
3515 |
|
|
3399 | <tr><td> | |
3516 |
|
|
3400 | <a href="/help/internals.config"> | |
3517 | config |
|
3401 | config | |
3518 |
|
|
3402 | </a> | |
3519 |
|
|
3403 | </td><td> | |
3520 | Config Registrar |
|
3404 | Config Registrar | |
3521 |
|
|
3405 | </td></tr> | |
3522 |
|
|
3406 | <tr><td> | |
3523 |
|
|
3407 | <a href="/help/internals.requirements"> | |
3524 | requirements |
|
3408 | requirements | |
3525 |
|
|
3409 | </a> | |
3526 |
|
|
3410 | </td><td> | |
3527 | Repository Requirements |
|
3411 | Repository Requirements | |
3528 |
|
|
3412 | </td></tr> | |
3529 |
|
|
3413 | <tr><td> | |
3530 |
|
|
3414 | <a href="/help/internals.revlogs"> | |
3531 | revlogs |
|
3415 | revlogs | |
3532 |
|
|
3416 | </a> | |
3533 |
|
|
3417 | </td><td> | |
3534 | Revision Logs |
|
3418 | Revision Logs | |
3535 |
|
|
3419 | </td></tr> | |
3536 |
|
|
3420 | <tr><td> | |
3537 |
|
|
3421 | <a href="/help/internals.wireprotocol"> | |
3538 | wireprotocol |
|
3422 | wireprotocol | |
3539 |
|
|
3423 | </a> | |
3540 |
|
|
3424 | </td><td> | |
3541 | Wire Protocol |
|
3425 | Wire Protocol | |
3542 |
|
|
3426 | </td></tr> | |
3543 |
|
|
3427 | <tr><td> | |
3544 |
|
|
3428 | <a href="/help/internals.wireprotocolrpc"> | |
3545 | wireprotocolrpc |
|
3429 | wireprotocolrpc | |
3546 |
|
|
3430 | </a> | |
3547 |
|
|
3431 | </td><td> | |
3548 | Wire Protocol RPC |
|
3432 | Wire Protocol RPC | |
3549 |
|
|
3433 | </td></tr> | |
3550 |
|
|
3434 | <tr><td> | |
3551 |
|
|
3435 | <a href="/help/internals.wireprotocolv2"> | |
3552 | wireprotocolv2 |
|
3436 | wireprotocolv2 | |
3553 |
|
|
3437 | </a> | |
3554 |
|
|
3438 | </td><td> | |
3555 | Wire Protocol Version 2 |
|
3439 | Wire Protocol Version 2 | |
3556 |
|
|
3440 | </td></tr> | |
3557 |
|
|
3441 | ||
3558 |
|
|
3442 | ||
3559 |
|
|
3443 | ||
3560 |
|
|
3444 | ||
3561 |
|
|
3445 | ||
3562 |
|
|
3446 | </table> | |
3563 |
|
|
3447 | </div> | |
3564 |
|
|
3448 | </div> | |
3565 |
|
|
3449 | ||
3566 |
|
|
3450 | ||
3567 |
|
|
3451 | ||
3568 |
|
|
3452 | </body> | |
3569 |
|
|
3453 | </html> | |
3570 |
|
|
3454 | ||
3571 |
|
3455 | |||
3572 | Sub-topic topics rendered properly |
|
3456 | Sub-topic topics rendered properly | |
3573 |
|
3457 | |||
3574 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3458 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" | |
3575 | 200 Script output follows |
|
3459 | 200 Script output follows | |
3576 |
|
|
3460 | ||
3577 |
|
|
3461 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3578 |
|
|
3462 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3579 |
|
|
3463 | <head> | |
3580 |
|
|
3464 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3581 |
|
|
3465 | <meta name="robots" content="index, nofollow" /> | |
3582 |
|
|
3466 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3583 |
|
|
3467 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3584 |
|
|
3468 | ||
3585 |
|
|
3469 | <title>Help: internals.changegroups</title> | |
3586 |
|
|
3470 | </head> | |
3587 |
|
|
3471 | <body> | |
3588 |
|
|
3472 | ||
3589 |
|
|
3473 | <div class="container"> | |
3590 |
|
|
3474 | <div class="menu"> | |
3591 |
|
|
3475 | <div class="logo"> | |
3592 |
|
|
3476 | <a href="https://mercurial-scm.org/"> | |
3593 |
|
|
3477 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3594 |
|
|
3478 | </div> | |
3595 |
|
|
3479 | <ul> | |
3596 |
|
|
3480 | <li><a href="/shortlog">log</a></li> | |
3597 |
|
|
3481 | <li><a href="/graph">graph</a></li> | |
3598 |
|
|
3482 | <li><a href="/tags">tags</a></li> | |
3599 |
|
|
3483 | <li><a href="/bookmarks">bookmarks</a></li> | |
3600 |
|
|
3484 | <li><a href="/branches">branches</a></li> | |
3601 |
|
|
3485 | </ul> | |
3602 |
|
|
3486 | <ul> | |
3603 |
|
|
3487 | <li class="active"><a href="/help">help</a></li> | |
3604 |
|
|
3488 | </ul> | |
3605 |
|
|
3489 | </div> | |
3606 |
|
|
3490 | ||
3607 |
|
|
3491 | <div class="main"> | |
3608 |
|
|
3492 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3609 |
|
|
3493 | <h3>Help: internals.changegroups</h3> | |
3610 |
|
|
3494 | ||
3611 |
|
|
3495 | <form class="search" action="/log"> | |
3612 |
|
|
3496 | ||
3613 |
|
|
3497 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3614 |
|
|
3498 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3615 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3499 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3616 |
|
|
3500 | </form> | |
3617 |
|
|
3501 | <div id="doc"> | |
3618 |
|
|
3502 | <h1>Changegroups</h1> | |
3619 |
|
|
3503 | <p> | |
3620 | Changegroups are representations of repository revlog data, specifically |
|
3504 | Changegroups are representations of repository revlog data, specifically | |
3621 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3505 | the changelog data, root/flat manifest data, treemanifest data, and | |
3622 | filelogs. |
|
3506 | filelogs. | |
3623 |
|
|
3507 | </p> | |
3624 |
|
|
3508 | <p> | |
3625 |
There are 3 |
|
3509 | There are 3 versions of changegroups: "1", "2", and "3". From a | |
3626 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3510 | high-level, versions "1" and "2" are almost exactly the same, with the | |
3627 | only difference being an additional item in the *delta header*. Version |
|
3511 | only difference being an additional item in the *delta header*. Version | |
3628 |
|
|
3512 | "3" adds support for storage flags in the *delta header* and optionally | |
3629 | exchanging treemanifests (enabled by setting an option on the |
|
3513 | exchanging treemanifests (enabled by setting an option on the | |
3630 |
|
|
3514 | "changegroup" part in the bundle2). | |
3631 |
|
|
3515 | </p> | |
3632 |
|
|
3516 | <p> | |
3633 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3517 | Changegroups when not exchanging treemanifests consist of 3 logical | |
3634 | segments: |
|
3518 | segments: | |
3635 |
|
|
3519 | </p> | |
3636 |
|
|
3520 | <pre> | |
3637 | +---------------------------------+ |
|
3521 | +---------------------------------+ | |
3638 | | | | | |
|
3522 | | | | | | |
3639 | | changeset | manifest | filelogs | |
|
3523 | | changeset | manifest | filelogs | | |
3640 | | | | | |
|
3524 | | | | | | |
3641 | | | | | |
|
3525 | | | | | | |
3642 | +---------------------------------+ |
|
3526 | +---------------------------------+ | |
3643 |
|
|
3527 | </pre> | |
3644 |
|
|
3528 | <p> | |
3645 | When exchanging treemanifests, there are 4 logical segments: |
|
3529 | When exchanging treemanifests, there are 4 logical segments: | |
3646 |
|
|
3530 | </p> | |
3647 |
|
|
3531 | <pre> | |
3648 | +-------------------------------------------------+ |
|
3532 | +-------------------------------------------------+ | |
3649 | | | | | | |
|
3533 | | | | | | | |
3650 | | changeset | root | treemanifests | filelogs | |
|
3534 | | changeset | root | treemanifests | filelogs | | |
3651 | | | manifest | | | |
|
3535 | | | manifest | | | | |
3652 | | | | | | |
|
3536 | | | | | | | |
3653 | +-------------------------------------------------+ |
|
3537 | +-------------------------------------------------+ | |
3654 |
|
|
3538 | </pre> | |
3655 |
|
|
3539 | <p> | |
3656 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3540 | The principle building block of each segment is a *chunk*. A *chunk* | |
3657 | is a framed piece of data: |
|
3541 | is a framed piece of data: | |
3658 |
|
|
3542 | </p> | |
3659 |
|
|
3543 | <pre> | |
3660 | +---------------------------------------+ |
|
3544 | +---------------------------------------+ | |
3661 | | | | |
|
3545 | | | | | |
3662 | | length | data | |
|
3546 | | length | data | | |
3663 | | (4 bytes) | (<length - 4> bytes) | |
|
3547 | | (4 bytes) | (<length - 4> bytes) | | |
3664 | | | | |
|
3548 | | | | | |
3665 | +---------------------------------------+ |
|
3549 | +---------------------------------------+ | |
3666 |
|
|
3550 | </pre> | |
3667 |
|
|
3551 | <p> | |
3668 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3552 | All integers are big-endian signed integers. Each chunk starts with a 32-bit | |
3669 | integer indicating the length of the entire chunk (including the length field |
|
3553 | integer indicating the length of the entire chunk (including the length field | |
3670 | itself). |
|
3554 | itself). | |
3671 |
|
|
3555 | </p> | |
3672 |
|
|
3556 | <p> | |
3673 | There is a special case chunk that has a value of 0 for the length |
|
3557 | There is a special case chunk that has a value of 0 for the length | |
3674 | ("0x00000000"). We call this an *empty chunk*. |
|
3558 | ("0x00000000"). We call this an *empty chunk*. | |
3675 |
|
|
3559 | </p> | |
3676 |
|
|
3560 | <h2>Delta Groups</h2> | |
3677 |
|
|
3561 | <p> | |
3678 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3562 | A *delta group* expresses the content of a revlog as a series of deltas, | |
3679 | or patches against previous revisions. |
|
3563 | or patches against previous revisions. | |
3680 |
|
|
3564 | </p> | |
3681 |
|
|
3565 | <p> | |
3682 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3566 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
3683 | to signal the end of the delta group: |
|
3567 | to signal the end of the delta group: | |
3684 |
|
|
3568 | </p> | |
3685 |
|
|
3569 | <pre> | |
3686 | +------------------------------------------------------------------------+ |
|
3570 | +------------------------------------------------------------------------+ | |
3687 | | | | | | | |
|
3571 | | | | | | | | |
3688 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3572 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
3689 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3573 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
3690 | | | | | | | |
|
3574 | | | | | | | | |
3691 | +------------------------------------------------------------------------+ |
|
3575 | +------------------------------------------------------------------------+ | |
3692 |
|
|
3576 | </pre> | |
3693 |
|
|
3577 | <p> | |
3694 |
|
|
3578 | Each *chunk*'s data consists of the following: | |
3695 | </p> |
|
3579 | </p> | |
3696 | <pre> |
|
3580 | <pre> | |
3697 | +---------------------------------------+ |
|
3581 | +---------------------------------------+ | |
3698 | | | | |
|
3582 | | | | | |
3699 | | delta header | delta data | |
|
3583 | | delta header | delta data | | |
3700 | | (various by version) | (various) | |
|
3584 | | (various by version) | (various) | | |
3701 | | | | |
|
3585 | | | | | |
3702 | +---------------------------------------+ |
|
3586 | +---------------------------------------+ | |
3703 | </pre> |
|
3587 | </pre> | |
3704 | <p> |
|
3588 | <p> | |
3705 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3589 | The *delta data* is a series of *delta*s that describe a diff from an existing | |
3706 | entry (either that the recipient already has, or previously specified in the |
|
3590 | entry (either that the recipient already has, or previously specified in the | |
3707 | bundle/changegroup). |
|
3591 | bundle/changegroup). | |
3708 | </p> |
|
3592 | </p> | |
3709 | <p> |
|
3593 | <p> | |
3710 | The *delta header* is different between versions "1", "2", and |
|
3594 | The *delta header* is different between versions "1", "2", and | |
3711 | "3" of the changegroup format. |
|
3595 | "3" of the changegroup format. | |
3712 | </p> |
|
3596 | </p> | |
3713 | <p> |
|
3597 | <p> | |
3714 | Version 1 (headerlen=80): |
|
3598 | Version 1 (headerlen=80): | |
3715 | </p> |
|
3599 | </p> | |
3716 | <pre> |
|
3600 | <pre> | |
3717 | +------------------------------------------------------+ |
|
3601 | +------------------------------------------------------+ | |
3718 | | | | | | |
|
3602 | | | | | | | |
3719 | | node | p1 node | p2 node | link node | |
|
3603 | | node | p1 node | p2 node | link node | | |
3720 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3604 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3721 | | | | | | |
|
3605 | | | | | | | |
3722 | +------------------------------------------------------+ |
|
3606 | +------------------------------------------------------+ | |
3723 | </pre> |
|
3607 | </pre> | |
3724 | <p> |
|
3608 | <p> | |
3725 | Version 2 (headerlen=100): |
|
3609 | Version 2 (headerlen=100): | |
3726 | </p> |
|
3610 | </p> | |
3727 | <pre> |
|
3611 | <pre> | |
3728 | +------------------------------------------------------------------+ |
|
3612 | +------------------------------------------------------------------+ | |
3729 | | | | | | | |
|
3613 | | | | | | | | |
3730 | | node | p1 node | p2 node | base node | link node | |
|
3614 | | node | p1 node | p2 node | base node | link node | | |
3731 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3615 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3732 | | | | | | | |
|
3616 | | | | | | | | |
3733 | +------------------------------------------------------------------+ |
|
3617 | +------------------------------------------------------------------+ | |
3734 | </pre> |
|
3618 | </pre> | |
3735 | <p> |
|
3619 | <p> | |
3736 | Version 3 (headerlen=102): |
|
3620 | Version 3 (headerlen=102): | |
3737 | </p> |
|
3621 | </p> | |
3738 | <pre> |
|
3622 | <pre> | |
3739 | +------------------------------------------------------------------------------+ |
|
3623 | +------------------------------------------------------------------------------+ | |
3740 | | | | | | | | |
|
3624 | | | | | | | | | |
3741 | | node | p1 node | p2 node | base node | link node | flags | |
|
3625 | | node | p1 node | p2 node | base node | link node | flags | | |
3742 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3626 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
3743 | | | | | | | | |
|
3627 | | | | | | | | | |
3744 | +------------------------------------------------------------------------------+ |
|
3628 | +------------------------------------------------------------------------------+ | |
3745 | </pre> |
|
3629 | </pre> | |
3746 | <p> |
|
3630 | <p> | |
3747 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3631 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a | |
3748 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3632 | series of *delta*s, densely packed (no separators). These deltas describe a diff | |
3749 | from an existing entry (either that the recipient already has, or previously |
|
3633 | from an existing entry (either that the recipient already has, or previously | |
3750 | specified in the bundle/changegroup). The format is described more fully in |
|
3634 | specified in the bundle/changegroup). The format is described more fully in | |
3751 | "hg help internals.bdiff", but briefly: |
|
3635 | "hg help internals.bdiff", but briefly: | |
3752 | </p> |
|
3636 | </p> | |
3753 | <pre> |
|
3637 | <pre> | |
3754 | +---------------------------------------------------------------+ |
|
3638 | +---------------------------------------------------------------+ | |
3755 | | | | | | |
|
3639 | | | | | | | |
3756 | | start offset | end offset | new length | content | |
|
3640 | | start offset | end offset | new length | content | | |
3757 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3641 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
3758 | | | | | | |
|
3642 | | | | | | | |
3759 | +---------------------------------------------------------------+ |
|
3643 | +---------------------------------------------------------------+ | |
3760 | </pre> |
|
3644 | </pre> | |
3761 | <p> |
|
3645 | <p> | |
3762 | Please note that the length field in the delta data does *not* include itself. |
|
3646 | Please note that the length field in the delta data does *not* include itself. | |
3763 | </p> |
|
3647 | </p> | |
3764 | <p> |
|
3648 | <p> | |
3765 | In version 1, the delta is always applied against the previous node from |
|
3649 | In version 1, the delta is always applied against the previous node from | |
3766 | the changegroup or the first parent if this is the first entry in the |
|
3650 | the changegroup or the first parent if this is the first entry in the | |
3767 | changegroup. |
|
3651 | changegroup. | |
3768 | </p> |
|
3652 | </p> | |
3769 | <p> |
|
3653 | <p> | |
3770 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3654 | In version 2 and up, the delta base node is encoded in the entry in the | |
3771 | changegroup. This allows the delta to be expressed against any parent, |
|
3655 | changegroup. This allows the delta to be expressed against any parent, | |
3772 | which can result in smaller deltas and more efficient encoding of data. |
|
3656 | which can result in smaller deltas and more efficient encoding of data. | |
3773 | </p> |
|
3657 | </p> | |
3774 | <p> |
|
3658 | <p> | |
3775 | The *flags* field holds bitwise flags affecting the processing of revision |
|
3659 | The *flags* field holds bitwise flags affecting the processing of revision | |
3776 | data. The following flags are defined: |
|
3660 | data. The following flags are defined: | |
3777 | </p> |
|
3661 | </p> | |
3778 | <dl> |
|
3662 | <dl> | |
3779 | <dt>32768 |
|
3663 | <dt>32768 | |
3780 |
<dd>Censored |
|
3664 | <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions. | |
3781 |
|
|
3665 | <dt>16384 | |
3782 |
|
|
3666 | <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents). | |
3783 |
|
|
3667 | <dt>8192 | |
3784 |
|
|
3668 | <dd>Externally stored. The revision fulltext contains "key:value" "\n" delimited metadata defining an object stored elsewhere. Used by the LFS extension. | |
3785 |
|
|
3669 | </dl> | |
3786 |
|
|
3670 | <p> | |
3787 | For historical reasons, the integer values are identical to revlog version 1 |
|
3671 | For historical reasons, the integer values are identical to revlog version 1 | |
3788 | per-revision storage flags and correspond to bits being set in this 2-byte |
|
3672 | per-revision storage flags and correspond to bits being set in this 2-byte | |
3789 | field. Bits were allocated starting from the most-significant bit, hence the |
|
3673 | field. Bits were allocated starting from the most-significant bit, hence the | |
3790 | reverse ordering and allocation of these flags. |
|
3674 | reverse ordering and allocation of these flags. | |
3791 |
|
|
3675 | </p> | |
3792 |
|
|
3676 | <h2>Changeset Segment</h2> | |
3793 |
|
|
3677 | <p> | |
3794 | The *changeset segment* consists of a single *delta group* holding |
|
3678 | The *changeset segment* consists of a single *delta group* holding | |
3795 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3679 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
3796 | the boundary to the *manifest segment*. |
|
3680 | the boundary to the *manifest segment*. | |
3797 |
|
|
3681 | </p> | |
3798 |
|
|
3682 | <h2>Manifest Segment</h2> | |
3799 |
|
|
3683 | <p> | |
3800 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3684 | The *manifest segment* consists of a single *delta group* holding manifest | |
3801 | data. If treemanifests are in use, it contains only the manifest for the |
|
3685 | data. If treemanifests are in use, it contains only the manifest for the | |
3802 | root directory of the repository. Otherwise, it contains the entire |
|
3686 | root directory of the repository. Otherwise, it contains the entire | |
3803 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3687 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
3804 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3688 | the boundary to the next segment (either the *treemanifests segment* or the | |
3805 | *filelogs segment*, depending on version and the request options). |
|
3689 | *filelogs segment*, depending on version and the request options). | |
3806 |
|
|
3690 | </p> | |
3807 |
|
|
3691 | <h3>Treemanifests Segment</h3> | |
3808 |
|
|
3692 | <p> | |
3809 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3693 | The *treemanifests segment* only exists in changegroup version "3", and | |
3810 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3694 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
3811 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3695 | (it is not possible to use changegroup version 3 outside of bundle2). | |
3812 | Aside from the filenames in the *treemanifests segment* containing a |
|
3696 | Aside from the filenames in the *treemanifests segment* containing a | |
3813 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3697 | trailing "/" character, it behaves identically to the *filelogs segment* | |
3814 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3698 | (see below). The final sub-segment is followed by an *empty chunk* (logically, | |
3815 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3699 | a sub-segment with filename size 0). This denotes the boundary to the | |
3816 | *filelogs segment*. |
|
3700 | *filelogs segment*. | |
3817 |
|
|
3701 | </p> | |
3818 |
|
|
3702 | <h2>Filelogs Segment</h2> | |
3819 |
|
|
3703 | <p> | |
3820 | The *filelogs segment* consists of multiple sub-segments, each |
|
3704 | The *filelogs segment* consists of multiple sub-segments, each | |
3821 | corresponding to an individual file whose data is being described: |
|
3705 | corresponding to an individual file whose data is being described: | |
3822 |
|
|
3706 | </p> | |
3823 |
|
|
3707 | <pre> | |
3824 | +--------------------------------------------------+ |
|
3708 | +--------------------------------------------------+ | |
3825 | | | | | | | |
|
3709 | | | | | | | | |
3826 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3710 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
3827 | | | | | | (4 bytes) | |
|
3711 | | | | | | (4 bytes) | | |
3828 | | | | | | | |
|
3712 | | | | | | | | |
3829 | +--------------------------------------------------+ |
|
3713 | +--------------------------------------------------+ | |
3830 |
|
|
3714 | </pre> | |
3831 |
|
|
3715 | <p> | |
3832 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3716 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
3833 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3717 | a sub-segment with filename size 0). This denotes the end of the segment | |
3834 | and of the overall changegroup. |
|
3718 | and of the overall changegroup. | |
3835 |
|
|
3719 | </p> | |
3836 |
|
|
3720 | <p> | |
3837 | Each filelog sub-segment consists of the following: |
|
3721 | Each filelog sub-segment consists of the following: | |
3838 |
|
|
3722 | </p> | |
3839 |
|
|
3723 | <pre> | |
3840 | +------------------------------------------------------+ |
|
3724 | +------------------------------------------------------+ | |
3841 | | | | | |
|
3725 | | | | | | |
3842 | | filename length | filename | delta group | |
|
3726 | | filename length | filename | delta group | | |
3843 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3727 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
3844 | | | | | |
|
3728 | | | | | | |
3845 | +------------------------------------------------------+ |
|
3729 | +------------------------------------------------------+ | |
3846 |
|
|
3730 | </pre> | |
3847 |
|
|
3731 | <p> | |
3848 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3732 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
3849 | followed by N chunks constituting the *delta group* for this file. The |
|
3733 | followed by N chunks constituting the *delta group* for this file. The | |
3850 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3734 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
3851 | next filelog sub-segment. |
|
3735 | next filelog sub-segment. | |
3852 |
|
|
3736 | </p> | |
3853 |
|
|
3737 | ||
3854 |
|
|
3738 | </div> | |
3855 |
|
|
3739 | </div> | |
3856 |
|
|
3740 | </div> | |
3857 |
|
|
3741 | ||
3858 |
|
|
3742 | ||
3859 |
|
|
3743 | ||
3860 |
|
|
3744 | </body> | |
3861 |
|
|
3745 | </html> | |
3862 |
|
|
3746 | ||
3863 |
|
3747 | |||
3864 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" |
|
3748 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" | |
3865 | 404 Not Found |
|
3749 | 404 Not Found | |
3866 |
|
|
3750 | ||
3867 |
|
|
3751 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3868 |
|
|
3752 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3869 |
|
|
3753 | <head> | |
3870 |
|
|
3754 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3871 |
|
|
3755 | <meta name="robots" content="index, nofollow" /> | |
3872 |
|
|
3756 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3873 |
|
|
3757 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3874 |
|
|
3758 | ||
3875 |
|
|
3759 | <title>test: error</title> | |
3876 |
|
|
3760 | </head> | |
3877 |
|
|
3761 | <body> | |
3878 |
|
|
3762 | ||
3879 |
|
|
3763 | <div class="container"> | |
3880 |
|
|
3764 | <div class="menu"> | |
3881 |
|
|
3765 | <div class="logo"> | |
3882 |
|
|
3766 | <a href="https://mercurial-scm.org/"> | |
3883 |
|
|
3767 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
3884 |
|
|
3768 | </div> | |
3885 |
|
|
3769 | <ul> | |
3886 |
|
|
3770 | <li><a href="/shortlog">log</a></li> | |
3887 |
|
|
3771 | <li><a href="/graph">graph</a></li> | |
3888 |
|
|
3772 | <li><a href="/tags">tags</a></li> | |
3889 |
|
|
3773 | <li><a href="/bookmarks">bookmarks</a></li> | |
3890 |
|
|
3774 | <li><a href="/branches">branches</a></li> | |
3891 |
|
|
3775 | </ul> | |
3892 |
|
|
3776 | <ul> | |
3893 |
|
|
3777 | <li><a href="/help">help</a></li> | |
3894 |
|
|
3778 | </ul> | |
3895 |
|
|
3779 | </div> | |
3896 |
|
|
3780 | ||
3897 |
|
|
3781 | <div class="main"> | |
3898 |
|
|
3782 | ||
3899 |
|
|
3783 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3900 |
|
|
3784 | <h3>error</h3> | |
3901 |
|
|
3785 | ||
3902 |
|
|
3786 | ||
3903 |
|
|
3787 | <form class="search" action="/log"> | |
3904 |
|
|
3788 | ||
3905 |
|
|
3789 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3906 |
|
|
3790 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3907 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3791 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3908 |
|
|
3792 | </form> | |
3909 |
|
|
3793 | ||
3910 |
|
|
3794 | <div class="description"> | |
3911 |
|
|
3795 | <p> | |
3912 | An error occurred while processing your request: |
|
3796 | An error occurred while processing your request: | |
3913 |
|
|
3797 | </p> | |
3914 |
|
|
3798 | <p> | |
3915 | Not Found |
|
3799 | Not Found | |
3916 |
|
|
3800 | </p> | |
3917 |
|
|
3801 | </div> | |
3918 |
|
|
3802 | </div> | |
3919 |
|
|
3803 | </div> | |
3920 |
|
|
3804 | ||
3921 |
|
|
3805 | ||
3922 |
|
|
3806 | ||
3923 |
|
|
3807 | </body> | |
3924 |
|
|
3808 | </html> | |
3925 |
|
|
3809 | ||
3926 | [1] |
|
3810 | [1] | |
3927 |
|
3811 | |||
3928 | $ killdaemons.py |
|
3812 | $ killdaemons.py | |
3929 |
|
3813 | |||
3930 |
|
|
3814 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now