##// END OF EJS Templates
help: add internals.wireprotocolv2 to the table, and remove redundant header
Yuya Nishihara -
r39497:7df9ae38 default
parent child Browse files
Show More
@@ -1,690 +1,692 b''
1 # help.py - help data for mercurial
1 # help.py - help data for mercurial
2 #
2 #
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from __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 revset,
28 revset,
29 templatefilters,
29 templatefilters,
30 templatefuncs,
30 templatefuncs,
31 templatekw,
31 templatekw,
32 util,
32 util,
33 )
33 )
34 from .hgweb import (
34 from .hgweb import (
35 webcommands,
35 webcommands,
36 )
36 )
37
37
38 _exclkeywords = {
38 _exclkeywords = {
39 "(ADVANCED)",
39 "(ADVANCED)",
40 "(DEPRECATED)",
40 "(DEPRECATED)",
41 "(EXPERIMENTAL)",
41 "(EXPERIMENTAL)",
42 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
42 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
43 _("(ADVANCED)"),
43 _("(ADVANCED)"),
44 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
44 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
45 _("(DEPRECATED)"),
45 _("(DEPRECATED)"),
46 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
46 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
47 _("(EXPERIMENTAL)"),
47 _("(EXPERIMENTAL)"),
48 }
48 }
49
49
50 def listexts(header, exts, indent=1, showdeprecated=False):
50 def listexts(header, exts, indent=1, showdeprecated=False):
51 '''return a text listing of the given extensions'''
51 '''return a text listing of the given extensions'''
52 rst = []
52 rst = []
53 if exts:
53 if exts:
54 for name, desc in sorted(exts.iteritems()):
54 for name, desc in sorted(exts.iteritems()):
55 if not showdeprecated and any(w in desc for w in _exclkeywords):
55 if not showdeprecated and any(w in desc for w in _exclkeywords):
56 continue
56 continue
57 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
57 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
58 if rst:
58 if rst:
59 rst.insert(0, '\n%s\n\n' % header)
59 rst.insert(0, '\n%s\n\n' % header)
60 return rst
60 return rst
61
61
62 def extshelp(ui):
62 def extshelp(ui):
63 rst = loaddoc('extensions')(ui).splitlines(True)
63 rst = loaddoc('extensions')(ui).splitlines(True)
64 rst.extend(listexts(
64 rst.extend(listexts(
65 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
65 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
66 rst.extend(listexts(_('disabled extensions:'), extensions.disabled(),
66 rst.extend(listexts(_('disabled extensions:'), extensions.disabled(),
67 showdeprecated=ui.verbose))
67 showdeprecated=ui.verbose))
68 doc = ''.join(rst)
68 doc = ''.join(rst)
69 return doc
69 return doc
70
70
71 def optrst(header, options, verbose):
71 def optrst(header, options, verbose):
72 data = []
72 data = []
73 multioccur = False
73 multioccur = False
74 for option in options:
74 for option in options:
75 if len(option) == 5:
75 if len(option) == 5:
76 shortopt, longopt, default, desc, optlabel = option
76 shortopt, longopt, default, desc, optlabel = option
77 else:
77 else:
78 shortopt, longopt, default, desc = option
78 shortopt, longopt, default, desc = option
79 optlabel = _("VALUE") # default label
79 optlabel = _("VALUE") # default label
80
80
81 if not verbose and any(w in desc for w in _exclkeywords):
81 if not verbose and any(w in desc for w in _exclkeywords):
82 continue
82 continue
83
83
84 so = ''
84 so = ''
85 if shortopt:
85 if shortopt:
86 so = '-' + shortopt
86 so = '-' + shortopt
87 lo = '--' + longopt
87 lo = '--' + longopt
88
88
89 if isinstance(default, fancyopts.customopt):
89 if isinstance(default, fancyopts.customopt):
90 default = default.getdefaultvalue()
90 default = default.getdefaultvalue()
91 if default and not callable(default):
91 if default and not callable(default):
92 # default is of unknown type, and in Python 2 we abused
92 # default is of unknown type, and in Python 2 we abused
93 # the %s-shows-repr property to handle integers etc. To
93 # the %s-shows-repr property to handle integers etc. To
94 # match that behavior on Python 3, we do str(default) and
94 # match that behavior on Python 3, we do str(default) and
95 # then convert it to bytes.
95 # then convert it to bytes.
96 desc += _(" (default: %s)") % pycompat.bytestr(default)
96 desc += _(" (default: %s)") % pycompat.bytestr(default)
97
97
98 if isinstance(default, list):
98 if isinstance(default, list):
99 lo += " %s [+]" % optlabel
99 lo += " %s [+]" % optlabel
100 multioccur = True
100 multioccur = True
101 elif (default is not None) and not isinstance(default, bool):
101 elif (default is not None) and not isinstance(default, bool):
102 lo += " %s" % optlabel
102 lo += " %s" % optlabel
103
103
104 data.append((so, lo, desc))
104 data.append((so, lo, desc))
105
105
106 if multioccur:
106 if multioccur:
107 header += (_(" ([+] can be repeated)"))
107 header += (_(" ([+] can be repeated)"))
108
108
109 rst = ['\n%s:\n\n' % header]
109 rst = ['\n%s:\n\n' % header]
110 rst.extend(minirst.maketable(data, 1))
110 rst.extend(minirst.maketable(data, 1))
111
111
112 return ''.join(rst)
112 return ''.join(rst)
113
113
114 def indicateomitted(rst, omitted, notomitted=None):
114 def indicateomitted(rst, omitted, notomitted=None):
115 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
115 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
116 if notomitted:
116 if notomitted:
117 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
117 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
118
118
119 def filtercmd(ui, cmd, kw, doc):
119 def filtercmd(ui, cmd, kw, doc):
120 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
120 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
121 return True
121 return True
122 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
122 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
123 return True
123 return True
124 return False
124 return False
125
125
126 def topicmatch(ui, commands, kw):
126 def topicmatch(ui, commands, kw):
127 """Return help topics matching kw.
127 """Return help topics matching kw.
128
128
129 Returns {'section': [(name, summary), ...], ...} where section is
129 Returns {'section': [(name, summary), ...], ...} where section is
130 one of topics, commands, extensions, or extensioncommands.
130 one of topics, commands, extensions, or extensioncommands.
131 """
131 """
132 kw = encoding.lower(kw)
132 kw = encoding.lower(kw)
133 def lowercontains(container):
133 def lowercontains(container):
134 return kw in encoding.lower(container) # translated in helptable
134 return kw in encoding.lower(container) # translated in helptable
135 results = {'topics': [],
135 results = {'topics': [],
136 'commands': [],
136 'commands': [],
137 'extensions': [],
137 'extensions': [],
138 'extensioncommands': [],
138 'extensioncommands': [],
139 }
139 }
140 for names, header, doc in helptable:
140 for names, header, doc in helptable:
141 # Old extensions may use a str as doc.
141 # Old extensions may use a str as doc.
142 if (sum(map(lowercontains, names))
142 if (sum(map(lowercontains, names))
143 or lowercontains(header)
143 or lowercontains(header)
144 or (callable(doc) and lowercontains(doc(ui)))):
144 or (callable(doc) and lowercontains(doc(ui)))):
145 results['topics'].append((names[0], header))
145 results['topics'].append((names[0], header))
146 for cmd, entry in commands.table.iteritems():
146 for cmd, entry in commands.table.iteritems():
147 if len(entry) == 3:
147 if len(entry) == 3:
148 summary = entry[2]
148 summary = entry[2]
149 else:
149 else:
150 summary = ''
150 summary = ''
151 # translate docs *before* searching there
151 # translate docs *before* searching there
152 docs = _(pycompat.getdoc(entry[0])) or ''
152 docs = _(pycompat.getdoc(entry[0])) or ''
153 if kw in cmd or lowercontains(summary) or lowercontains(docs):
153 if kw in cmd or lowercontains(summary) or lowercontains(docs):
154 doclines = docs.splitlines()
154 doclines = docs.splitlines()
155 if doclines:
155 if doclines:
156 summary = doclines[0]
156 summary = doclines[0]
157 cmdname = cmdutil.parsealiases(cmd)[0]
157 cmdname = cmdutil.parsealiases(cmd)[0]
158 if filtercmd(ui, cmdname, kw, docs):
158 if filtercmd(ui, cmdname, kw, docs):
159 continue
159 continue
160 results['commands'].append((cmdname, summary))
160 results['commands'].append((cmdname, summary))
161 for name, docs in itertools.chain(
161 for name, docs in itertools.chain(
162 extensions.enabled(False).iteritems(),
162 extensions.enabled(False).iteritems(),
163 extensions.disabled().iteritems()):
163 extensions.disabled().iteritems()):
164 if not docs:
164 if not docs:
165 continue
165 continue
166 name = name.rpartition('.')[-1]
166 name = name.rpartition('.')[-1]
167 if lowercontains(name) or lowercontains(docs):
167 if lowercontains(name) or lowercontains(docs):
168 # extension docs are already translated
168 # extension docs are already translated
169 results['extensions'].append((name, docs.splitlines()[0]))
169 results['extensions'].append((name, docs.splitlines()[0]))
170 try:
170 try:
171 mod = extensions.load(ui, name, '')
171 mod = extensions.load(ui, name, '')
172 except ImportError:
172 except ImportError:
173 # debug message would be printed in extensions.load()
173 # debug message would be printed in extensions.load()
174 continue
174 continue
175 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
175 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
176 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
176 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
177 cmdname = cmdutil.parsealiases(cmd)[0]
177 cmdname = cmdutil.parsealiases(cmd)[0]
178 cmddoc = pycompat.getdoc(entry[0])
178 cmddoc = pycompat.getdoc(entry[0])
179 if cmddoc:
179 if cmddoc:
180 cmddoc = gettext(cmddoc).splitlines()[0]
180 cmddoc = gettext(cmddoc).splitlines()[0]
181 else:
181 else:
182 cmddoc = _('(no help text available)')
182 cmddoc = _('(no help text available)')
183 if filtercmd(ui, cmdname, kw, cmddoc):
183 if filtercmd(ui, cmdname, kw, cmddoc):
184 continue
184 continue
185 results['extensioncommands'].append((cmdname, cmddoc))
185 results['extensioncommands'].append((cmdname, cmddoc))
186 return results
186 return results
187
187
188 def loaddoc(topic, subdir=None):
188 def loaddoc(topic, subdir=None):
189 """Return a delayed loader for help/topic.txt."""
189 """Return a delayed loader for help/topic.txt."""
190
190
191 def loader(ui):
191 def loader(ui):
192 docdir = os.path.join(util.datapath, 'help')
192 docdir = os.path.join(util.datapath, 'help')
193 if subdir:
193 if subdir:
194 docdir = os.path.join(docdir, subdir)
194 docdir = os.path.join(docdir, subdir)
195 path = os.path.join(docdir, topic + ".txt")
195 path = os.path.join(docdir, topic + ".txt")
196 doc = gettext(util.readfile(path))
196 doc = gettext(util.readfile(path))
197 for rewriter in helphooks.get(topic, []):
197 for rewriter in helphooks.get(topic, []):
198 doc = rewriter(ui, topic, doc)
198 doc = rewriter(ui, topic, doc)
199 return doc
199 return doc
200
200
201 return loader
201 return loader
202
202
203 internalstable = sorted([
203 internalstable = sorted([
204 (['bundle2'], _('Bundle2'),
204 (['bundle2'], _('Bundle2'),
205 loaddoc('bundle2', subdir='internals')),
205 loaddoc('bundle2', subdir='internals')),
206 (['bundles'], _('Bundles'),
206 (['bundles'], _('Bundles'),
207 loaddoc('bundles', subdir='internals')),
207 loaddoc('bundles', subdir='internals')),
208 (['cbor'], _('CBOR'),
208 (['cbor'], _('CBOR'),
209 loaddoc('cbor', subdir='internals')),
209 loaddoc('cbor', subdir='internals')),
210 (['censor'], _('Censor'),
210 (['censor'], _('Censor'),
211 loaddoc('censor', subdir='internals')),
211 loaddoc('censor', subdir='internals')),
212 (['changegroups'], _('Changegroups'),
212 (['changegroups'], _('Changegroups'),
213 loaddoc('changegroups', subdir='internals')),
213 loaddoc('changegroups', subdir='internals')),
214 (['config'], _('Config Registrar'),
214 (['config'], _('Config Registrar'),
215 loaddoc('config', subdir='internals')),
215 loaddoc('config', subdir='internals')),
216 (['requirements'], _('Repository Requirements'),
216 (['requirements'], _('Repository Requirements'),
217 loaddoc('requirements', subdir='internals')),
217 loaddoc('requirements', subdir='internals')),
218 (['revlogs'], _('Revision Logs'),
218 (['revlogs'], _('Revision Logs'),
219 loaddoc('revlogs', subdir='internals')),
219 loaddoc('revlogs', subdir='internals')),
220 (['wireprotocol'], _('Wire Protocol'),
220 (['wireprotocol'], _('Wire Protocol'),
221 loaddoc('wireprotocol', subdir='internals')),
221 loaddoc('wireprotocol', subdir='internals')),
222 (['wireprotocolv2'], _('Wire Protocol Version 2'),
223 loaddoc('wireprotocolv2', subdir='internals')),
222 ])
224 ])
223
225
224 def internalshelp(ui):
226 def internalshelp(ui):
225 """Generate the index for the "internals" topic."""
227 """Generate the index for the "internals" topic."""
226 lines = ['To access a subtopic, use "hg help internals.{subtopic-name}"\n',
228 lines = ['To access a subtopic, use "hg help internals.{subtopic-name}"\n',
227 '\n']
229 '\n']
228 for names, header, doc in internalstable:
230 for names, header, doc in internalstable:
229 lines.append(' :%s: %s\n' % (names[0], header))
231 lines.append(' :%s: %s\n' % (names[0], header))
230
232
231 return ''.join(lines)
233 return ''.join(lines)
232
234
233 helptable = sorted([
235 helptable = sorted([
234 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
236 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
235 (['color'], _("Colorizing Outputs"), loaddoc('color')),
237 (['color'], _("Colorizing Outputs"), loaddoc('color')),
236 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
238 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
237 (['deprecated'], _("Deprecated Features"), loaddoc('deprecated')),
239 (['deprecated'], _("Deprecated Features"), loaddoc('deprecated')),
238 (["dates"], _("Date Formats"), loaddoc('dates')),
240 (["dates"], _("Date Formats"), loaddoc('dates')),
239 (["flags"], _("Command-line flags"), loaddoc('flags')),
241 (["flags"], _("Command-line flags"), loaddoc('flags')),
240 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
242 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
241 (['environment', 'env'], _('Environment Variables'),
243 (['environment', 'env'], _('Environment Variables'),
242 loaddoc('environment')),
244 loaddoc('environment')),
243 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
245 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
244 _('Specifying Revisions'), loaddoc('revisions')),
246 _('Specifying Revisions'), loaddoc('revisions')),
245 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
247 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
246 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
248 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
247 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
249 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
248 loaddoc('merge-tools')),
250 loaddoc('merge-tools')),
249 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
251 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
250 loaddoc('templates')),
252 loaddoc('templates')),
251 (['urls'], _('URL Paths'), loaddoc('urls')),
253 (['urls'], _('URL Paths'), loaddoc('urls')),
252 (["extensions"], _("Using Additional Features"), extshelp),
254 (["extensions"], _("Using Additional Features"), extshelp),
253 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
255 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
254 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
256 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
255 (["glossary"], _("Glossary"), loaddoc('glossary')),
257 (["glossary"], _("Glossary"), loaddoc('glossary')),
256 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
258 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
257 loaddoc('hgignore')),
259 loaddoc('hgignore')),
258 (["phases"], _("Working with Phases"), loaddoc('phases')),
260 (["phases"], _("Working with Phases"), loaddoc('phases')),
259 (['scripting'], _('Using Mercurial from scripts and automation'),
261 (['scripting'], _('Using Mercurial from scripts and automation'),
260 loaddoc('scripting')),
262 loaddoc('scripting')),
261 (['internals'], _("Technical implementation topics"),
263 (['internals'], _("Technical implementation topics"),
262 internalshelp),
264 internalshelp),
263 (['pager'], _("Pager Support"), loaddoc('pager')),
265 (['pager'], _("Pager Support"), loaddoc('pager')),
264 ])
266 ])
265
267
266 # Maps topics with sub-topics to a list of their sub-topics.
268 # Maps topics with sub-topics to a list of their sub-topics.
267 subtopics = {
269 subtopics = {
268 'internals': internalstable,
270 'internals': internalstable,
269 }
271 }
270
272
271 # Map topics to lists of callable taking the current topic help and
273 # Map topics to lists of callable taking the current topic help and
272 # returning the updated version
274 # returning the updated version
273 helphooks = {}
275 helphooks = {}
274
276
275 def addtopichook(topic, rewriter):
277 def addtopichook(topic, rewriter):
276 helphooks.setdefault(topic, []).append(rewriter)
278 helphooks.setdefault(topic, []).append(rewriter)
277
279
278 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
280 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
279 """Extract docstring from the items key to function mapping, build a
281 """Extract docstring from the items key to function mapping, build a
280 single documentation block and use it to overwrite the marker in doc.
282 single documentation block and use it to overwrite the marker in doc.
281 """
283 """
282 entries = []
284 entries = []
283 for name in sorted(items):
285 for name in sorted(items):
284 text = (pycompat.getdoc(items[name]) or '').rstrip()
286 text = (pycompat.getdoc(items[name]) or '').rstrip()
285 if (not text
287 if (not text
286 or not ui.verbose and any(w in text for w in _exclkeywords)):
288 or not ui.verbose and any(w in text for w in _exclkeywords)):
287 continue
289 continue
288 text = gettext(text)
290 text = gettext(text)
289 if dedent:
291 if dedent:
290 # Abuse latin1 to use textwrap.dedent() on bytes.
292 # Abuse latin1 to use textwrap.dedent() on bytes.
291 text = textwrap.dedent(text.decode('latin1')).encode('latin1')
293 text = textwrap.dedent(text.decode('latin1')).encode('latin1')
292 lines = text.splitlines()
294 lines = text.splitlines()
293 doclines = [(lines[0])]
295 doclines = [(lines[0])]
294 for l in lines[1:]:
296 for l in lines[1:]:
295 # Stop once we find some Python doctest
297 # Stop once we find some Python doctest
296 if l.strip().startswith('>>>'):
298 if l.strip().startswith('>>>'):
297 break
299 break
298 if dedent:
300 if dedent:
299 doclines.append(l.rstrip())
301 doclines.append(l.rstrip())
300 else:
302 else:
301 doclines.append(' ' + l.strip())
303 doclines.append(' ' + l.strip())
302 entries.append('\n'.join(doclines))
304 entries.append('\n'.join(doclines))
303 entries = '\n\n'.join(entries)
305 entries = '\n\n'.join(entries)
304 return doc.replace(marker, entries)
306 return doc.replace(marker, entries)
305
307
306 def addtopicsymbols(topic, marker, symbols, dedent=False):
308 def addtopicsymbols(topic, marker, symbols, dedent=False):
307 def add(ui, topic, doc):
309 def add(ui, topic, doc):
308 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
310 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
309 addtopichook(topic, add)
311 addtopichook(topic, add)
310
312
311 addtopicsymbols('bundlespec', '.. bundlecompressionmarker',
313 addtopicsymbols('bundlespec', '.. bundlecompressionmarker',
312 util.bundlecompressiontopics())
314 util.bundlecompressiontopics())
313 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
315 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
314 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
316 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
315 filemerge.internalsdoc)
317 filemerge.internalsdoc)
316 addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols)
318 addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols)
317 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
319 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
318 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
320 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
319 addtopicsymbols('templates', '.. functionsmarker', templatefuncs.funcs)
321 addtopicsymbols('templates', '.. functionsmarker', templatefuncs.funcs)
320 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
322 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
321 dedent=True)
323 dedent=True)
322
324
323 def help_(ui, commands, name, unknowncmd=False, full=True, subtopic=None,
325 def help_(ui, commands, name, unknowncmd=False, full=True, subtopic=None,
324 **opts):
326 **opts):
325 '''
327 '''
326 Generate the help for 'name' as unformatted restructured text. If
328 Generate the help for 'name' as unformatted restructured text. If
327 'name' is None, describe the commands available.
329 'name' is None, describe the commands available.
328 '''
330 '''
329
331
330 opts = pycompat.byteskwargs(opts)
332 opts = pycompat.byteskwargs(opts)
331
333
332 def helpcmd(name, subtopic=None):
334 def helpcmd(name, subtopic=None):
333 try:
335 try:
334 aliases, entry = cmdutil.findcmd(name, commands.table,
336 aliases, entry = cmdutil.findcmd(name, commands.table,
335 strict=unknowncmd)
337 strict=unknowncmd)
336 except error.AmbiguousCommand as inst:
338 except error.AmbiguousCommand as inst:
337 # py3k fix: except vars can't be used outside the scope of the
339 # py3k fix: except vars can't be used outside the scope of the
338 # except block, nor can be used inside a lambda. python issue4617
340 # except block, nor can be used inside a lambda. python issue4617
339 prefix = inst.args[0]
341 prefix = inst.args[0]
340 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix)
342 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix)
341 rst = helplist(select)
343 rst = helplist(select)
342 return rst
344 return rst
343
345
344 rst = []
346 rst = []
345
347
346 # check if it's an invalid alias and display its error if it is
348 # check if it's an invalid alias and display its error if it is
347 if getattr(entry[0], 'badalias', None):
349 if getattr(entry[0], 'badalias', None):
348 rst.append(entry[0].badalias + '\n')
350 rst.append(entry[0].badalias + '\n')
349 if entry[0].unknowncmd:
351 if entry[0].unknowncmd:
350 try:
352 try:
351 rst.extend(helpextcmd(entry[0].cmdname))
353 rst.extend(helpextcmd(entry[0].cmdname))
352 except error.UnknownCommand:
354 except error.UnknownCommand:
353 pass
355 pass
354 return rst
356 return rst
355
357
356 # synopsis
358 # synopsis
357 if len(entry) > 2:
359 if len(entry) > 2:
358 if entry[2].startswith('hg'):
360 if entry[2].startswith('hg'):
359 rst.append("%s\n" % entry[2])
361 rst.append("%s\n" % entry[2])
360 else:
362 else:
361 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
363 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
362 else:
364 else:
363 rst.append('hg %s\n' % aliases[0])
365 rst.append('hg %s\n' % aliases[0])
364 # aliases
366 # aliases
365 if full and not ui.quiet and len(aliases) > 1:
367 if full and not ui.quiet and len(aliases) > 1:
366 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
368 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
367 rst.append('\n')
369 rst.append('\n')
368
370
369 # description
371 # description
370 doc = gettext(pycompat.getdoc(entry[0]))
372 doc = gettext(pycompat.getdoc(entry[0]))
371 if not doc:
373 if not doc:
372 doc = _("(no help text available)")
374 doc = _("(no help text available)")
373 if util.safehasattr(entry[0], 'definition'): # aliased command
375 if util.safehasattr(entry[0], 'definition'): # aliased command
374 source = entry[0].source
376 source = entry[0].source
375 if entry[0].definition.startswith('!'): # shell alias
377 if entry[0].definition.startswith('!'): # shell alias
376 doc = (_('shell alias for: %s\n\n%s\n\ndefined by: %s\n') %
378 doc = (_('shell alias for: %s\n\n%s\n\ndefined by: %s\n') %
377 (entry[0].definition[1:], doc, source))
379 (entry[0].definition[1:], doc, source))
378 else:
380 else:
379 doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') %
381 doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') %
380 (entry[0].definition, doc, source))
382 (entry[0].definition, doc, source))
381 doc = doc.splitlines(True)
383 doc = doc.splitlines(True)
382 if ui.quiet or not full:
384 if ui.quiet or not full:
383 rst.append(doc[0])
385 rst.append(doc[0])
384 else:
386 else:
385 rst.extend(doc)
387 rst.extend(doc)
386 rst.append('\n')
388 rst.append('\n')
387
389
388 # check if this command shadows a non-trivial (multi-line)
390 # check if this command shadows a non-trivial (multi-line)
389 # extension help text
391 # extension help text
390 try:
392 try:
391 mod = extensions.find(name)
393 mod = extensions.find(name)
392 doc = gettext(pycompat.getdoc(mod)) or ''
394 doc = gettext(pycompat.getdoc(mod)) or ''
393 if '\n' in doc.strip():
395 if '\n' in doc.strip():
394 msg = _("(use 'hg help -e %s' to show help for "
396 msg = _("(use 'hg help -e %s' to show help for "
395 "the %s extension)") % (name, name)
397 "the %s extension)") % (name, name)
396 rst.append('\n%s\n' % msg)
398 rst.append('\n%s\n' % msg)
397 except KeyError:
399 except KeyError:
398 pass
400 pass
399
401
400 # options
402 # options
401 if not ui.quiet and entry[1]:
403 if not ui.quiet and entry[1]:
402 rst.append(optrst(_("options"), entry[1], ui.verbose))
404 rst.append(optrst(_("options"), entry[1], ui.verbose))
403
405
404 if ui.verbose:
406 if ui.verbose:
405 rst.append(optrst(_("global options"),
407 rst.append(optrst(_("global options"),
406 commands.globalopts, ui.verbose))
408 commands.globalopts, ui.verbose))
407
409
408 if not ui.verbose:
410 if not ui.verbose:
409 if not full:
411 if not full:
410 rst.append(_("\n(use 'hg %s -h' to show more help)\n")
412 rst.append(_("\n(use 'hg %s -h' to show more help)\n")
411 % name)
413 % name)
412 elif not ui.quiet:
414 elif not ui.quiet:
413 rst.append(_('\n(some details hidden, use --verbose '
415 rst.append(_('\n(some details hidden, use --verbose '
414 'to show complete help)'))
416 'to show complete help)'))
415
417
416 return rst
418 return rst
417
419
418
420
419 def helplist(select=None, **opts):
421 def helplist(select=None, **opts):
420 # list of commands
422 # list of commands
421 if name == "shortlist":
423 if name == "shortlist":
422 header = _('basic commands:\n\n')
424 header = _('basic commands:\n\n')
423 elif name == "debug":
425 elif name == "debug":
424 header = _('debug commands (internal and unsupported):\n\n')
426 header = _('debug commands (internal and unsupported):\n\n')
425 else:
427 else:
426 header = _('list of commands:\n\n')
428 header = _('list of commands:\n\n')
427
429
428 h = {}
430 h = {}
429 cmds = {}
431 cmds = {}
430 for c, e in commands.table.iteritems():
432 for c, e in commands.table.iteritems():
431 fs = cmdutil.parsealiases(c)
433 fs = cmdutil.parsealiases(c)
432 f = fs[0]
434 f = fs[0]
433 p = ''
435 p = ''
434 if c.startswith("^"):
436 if c.startswith("^"):
435 p = '^'
437 p = '^'
436 if select and not select(p + f):
438 if select and not select(p + f):
437 continue
439 continue
438 if (not select and name != 'shortlist' and
440 if (not select and name != 'shortlist' and
439 e[0].__module__ != commands.__name__):
441 e[0].__module__ != commands.__name__):
440 continue
442 continue
441 if name == "shortlist" and not p:
443 if name == "shortlist" and not p:
442 continue
444 continue
443 doc = pycompat.getdoc(e[0])
445 doc = pycompat.getdoc(e[0])
444 if filtercmd(ui, f, name, doc):
446 if filtercmd(ui, f, name, doc):
445 continue
447 continue
446 doc = gettext(doc)
448 doc = gettext(doc)
447 if not doc:
449 if not doc:
448 doc = _("(no help text available)")
450 doc = _("(no help text available)")
449 h[f] = doc.splitlines()[0].rstrip()
451 h[f] = doc.splitlines()[0].rstrip()
450 cmds[f] = '|'.join(fs)
452 cmds[f] = '|'.join(fs)
451
453
452 rst = []
454 rst = []
453 if not h:
455 if not h:
454 if not ui.quiet:
456 if not ui.quiet:
455 rst.append(_('no commands defined\n'))
457 rst.append(_('no commands defined\n'))
456 return rst
458 return rst
457
459
458 if not ui.quiet:
460 if not ui.quiet:
459 rst.append(header)
461 rst.append(header)
460 fns = sorted(h)
462 fns = sorted(h)
461 for f in fns:
463 for f in fns:
462 if ui.verbose:
464 if ui.verbose:
463 commacmds = cmds[f].replace("|",", ")
465 commacmds = cmds[f].replace("|",", ")
464 rst.append(" :%s: %s\n" % (commacmds, h[f]))
466 rst.append(" :%s: %s\n" % (commacmds, h[f]))
465 else:
467 else:
466 rst.append(' :%s: %s\n' % (f, h[f]))
468 rst.append(' :%s: %s\n' % (f, h[f]))
467
469
468 ex = opts.get
470 ex = opts.get
469 anyopts = (ex(r'keyword') or not (ex(r'command') or ex(r'extension')))
471 anyopts = (ex(r'keyword') or not (ex(r'command') or ex(r'extension')))
470 if not name and anyopts:
472 if not name and anyopts:
471 exts = listexts(_('enabled extensions:'), extensions.enabled())
473 exts = listexts(_('enabled extensions:'), extensions.enabled())
472 if exts:
474 if exts:
473 rst.append('\n')
475 rst.append('\n')
474 rst.extend(exts)
476 rst.extend(exts)
475
477
476 rst.append(_("\nadditional help topics:\n\n"))
478 rst.append(_("\nadditional help topics:\n\n"))
477 topics = []
479 topics = []
478 for names, header, doc in helptable:
480 for names, header, doc in helptable:
479 topics.append((names[0], header))
481 topics.append((names[0], header))
480 for t, desc in topics:
482 for t, desc in topics:
481 rst.append(" :%s: %s\n" % (t, desc))
483 rst.append(" :%s: %s\n" % (t, desc))
482
484
483 if ui.quiet:
485 if ui.quiet:
484 pass
486 pass
485 elif ui.verbose:
487 elif ui.verbose:
486 rst.append('\n%s\n' % optrst(_("global options"),
488 rst.append('\n%s\n' % optrst(_("global options"),
487 commands.globalopts, ui.verbose))
489 commands.globalopts, ui.verbose))
488 if name == 'shortlist':
490 if name == 'shortlist':
489 rst.append(_("\n(use 'hg help' for the full list "
491 rst.append(_("\n(use 'hg help' for the full list "
490 "of commands)\n"))
492 "of commands)\n"))
491 else:
493 else:
492 if name == 'shortlist':
494 if name == 'shortlist':
493 rst.append(_("\n(use 'hg help' for the full list of commands "
495 rst.append(_("\n(use 'hg help' for the full list of commands "
494 "or 'hg -v' for details)\n"))
496 "or 'hg -v' for details)\n"))
495 elif name and not full:
497 elif name and not full:
496 rst.append(_("\n(use 'hg help %s' to show the full help "
498 rst.append(_("\n(use 'hg help %s' to show the full help "
497 "text)\n") % name)
499 "text)\n") % name)
498 elif name and cmds and name in cmds.keys():
500 elif name and cmds and name in cmds.keys():
499 rst.append(_("\n(use 'hg help -v -e %s' to show built-in "
501 rst.append(_("\n(use 'hg help -v -e %s' to show built-in "
500 "aliases and global options)\n") % name)
502 "aliases and global options)\n") % name)
501 else:
503 else:
502 rst.append(_("\n(use 'hg help -v%s' to show built-in aliases "
504 rst.append(_("\n(use 'hg help -v%s' to show built-in aliases "
503 "and global options)\n")
505 "and global options)\n")
504 % (name and " " + name or ""))
506 % (name and " " + name or ""))
505 return rst
507 return rst
506
508
507 def helptopic(name, subtopic=None):
509 def helptopic(name, subtopic=None):
508 # Look for sub-topic entry first.
510 # Look for sub-topic entry first.
509 header, doc = None, None
511 header, doc = None, None
510 if subtopic and name in subtopics:
512 if subtopic and name in subtopics:
511 for names, header, doc in subtopics[name]:
513 for names, header, doc in subtopics[name]:
512 if subtopic in names:
514 if subtopic in names:
513 break
515 break
514
516
515 if not header:
517 if not header:
516 for names, header, doc in helptable:
518 for names, header, doc in helptable:
517 if name in names:
519 if name in names:
518 break
520 break
519 else:
521 else:
520 raise error.UnknownCommand(name)
522 raise error.UnknownCommand(name)
521
523
522 rst = [minirst.section(header)]
524 rst = [minirst.section(header)]
523
525
524 # description
526 # description
525 if not doc:
527 if not doc:
526 rst.append(" %s\n" % _("(no help text available)"))
528 rst.append(" %s\n" % _("(no help text available)"))
527 if callable(doc):
529 if callable(doc):
528 rst += [" %s\n" % l for l in doc(ui).splitlines()]
530 rst += [" %s\n" % l for l in doc(ui).splitlines()]
529
531
530 if not ui.verbose:
532 if not ui.verbose:
531 omitted = _('(some details hidden, use --verbose'
533 omitted = _('(some details hidden, use --verbose'
532 ' to show complete help)')
534 ' to show complete help)')
533 indicateomitted(rst, omitted)
535 indicateomitted(rst, omitted)
534
536
535 try:
537 try:
536 cmdutil.findcmd(name, commands.table)
538 cmdutil.findcmd(name, commands.table)
537 rst.append(_("\nuse 'hg help -c %s' to see help for "
539 rst.append(_("\nuse 'hg help -c %s' to see help for "
538 "the %s command\n") % (name, name))
540 "the %s command\n") % (name, name))
539 except error.UnknownCommand:
541 except error.UnknownCommand:
540 pass
542 pass
541 return rst
543 return rst
542
544
543 def helpext(name, subtopic=None):
545 def helpext(name, subtopic=None):
544 try:
546 try:
545 mod = extensions.find(name)
547 mod = extensions.find(name)
546 doc = gettext(pycompat.getdoc(mod)) or _('no help text available')
548 doc = gettext(pycompat.getdoc(mod)) or _('no help text available')
547 except KeyError:
549 except KeyError:
548 mod = None
550 mod = None
549 doc = extensions.disabledext(name)
551 doc = extensions.disabledext(name)
550 if not doc:
552 if not doc:
551 raise error.UnknownCommand(name)
553 raise error.UnknownCommand(name)
552
554
553 if '\n' not in doc:
555 if '\n' not in doc:
554 head, tail = doc, ""
556 head, tail = doc, ""
555 else:
557 else:
556 head, tail = doc.split('\n', 1)
558 head, tail = doc.split('\n', 1)
557 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
559 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
558 if tail:
560 if tail:
559 rst.extend(tail.splitlines(True))
561 rst.extend(tail.splitlines(True))
560 rst.append('\n')
562 rst.append('\n')
561
563
562 if not ui.verbose:
564 if not ui.verbose:
563 omitted = _('(some details hidden, use --verbose'
565 omitted = _('(some details hidden, use --verbose'
564 ' to show complete help)')
566 ' to show complete help)')
565 indicateomitted(rst, omitted)
567 indicateomitted(rst, omitted)
566
568
567 if mod:
569 if mod:
568 try:
570 try:
569 ct = mod.cmdtable
571 ct = mod.cmdtable
570 except AttributeError:
572 except AttributeError:
571 ct = {}
573 ct = {}
572 modcmds = set([c.partition('|')[0] for c in ct])
574 modcmds = set([c.partition('|')[0] for c in ct])
573 rst.extend(helplist(modcmds.__contains__))
575 rst.extend(helplist(modcmds.__contains__))
574 else:
576 else:
575 rst.append(_("(use 'hg help extensions' for information on enabling"
577 rst.append(_("(use 'hg help extensions' for information on enabling"
576 " extensions)\n"))
578 " extensions)\n"))
577 return rst
579 return rst
578
580
579 def helpextcmd(name, subtopic=None):
581 def helpextcmd(name, subtopic=None):
580 cmd, ext, doc = extensions.disabledcmd(ui, name,
582 cmd, ext, doc = extensions.disabledcmd(ui, name,
581 ui.configbool('ui', 'strict'))
583 ui.configbool('ui', 'strict'))
582 doc = doc.splitlines()[0]
584 doc = doc.splitlines()[0]
583
585
584 rst = listexts(_("'%s' is provided by the following "
586 rst = listexts(_("'%s' is provided by the following "
585 "extension:") % cmd, {ext: doc}, indent=4,
587 "extension:") % cmd, {ext: doc}, indent=4,
586 showdeprecated=True)
588 showdeprecated=True)
587 rst.append('\n')
589 rst.append('\n')
588 rst.append(_("(use 'hg help extensions' for information on enabling "
590 rst.append(_("(use 'hg help extensions' for information on enabling "
589 "extensions)\n"))
591 "extensions)\n"))
590 return rst
592 return rst
591
593
592
594
593 rst = []
595 rst = []
594 kw = opts.get('keyword')
596 kw = opts.get('keyword')
595 if kw or name is None and any(opts[o] for o in opts):
597 if kw or name is None and any(opts[o] for o in opts):
596 matches = topicmatch(ui, commands, name or '')
598 matches = topicmatch(ui, commands, name or '')
597 helpareas = []
599 helpareas = []
598 if opts.get('extension'):
600 if opts.get('extension'):
599 helpareas += [('extensions', _('Extensions'))]
601 helpareas += [('extensions', _('Extensions'))]
600 if opts.get('command'):
602 if opts.get('command'):
601 helpareas += [('commands', _('Commands'))]
603 helpareas += [('commands', _('Commands'))]
602 if not helpareas:
604 if not helpareas:
603 helpareas = [('topics', _('Topics')),
605 helpareas = [('topics', _('Topics')),
604 ('commands', _('Commands')),
606 ('commands', _('Commands')),
605 ('extensions', _('Extensions')),
607 ('extensions', _('Extensions')),
606 ('extensioncommands', _('Extension Commands'))]
608 ('extensioncommands', _('Extension Commands'))]
607 for t, title in helpareas:
609 for t, title in helpareas:
608 if matches[t]:
610 if matches[t]:
609 rst.append('%s:\n\n' % title)
611 rst.append('%s:\n\n' % title)
610 rst.extend(minirst.maketable(sorted(matches[t]), 1))
612 rst.extend(minirst.maketable(sorted(matches[t]), 1))
611 rst.append('\n')
613 rst.append('\n')
612 if not rst:
614 if not rst:
613 msg = _('no matches')
615 msg = _('no matches')
614 hint = _("try 'hg help' for a list of topics")
616 hint = _("try 'hg help' for a list of topics")
615 raise error.Abort(msg, hint=hint)
617 raise error.Abort(msg, hint=hint)
616 elif name and name != 'shortlist':
618 elif name and name != 'shortlist':
617 queries = []
619 queries = []
618 if unknowncmd:
620 if unknowncmd:
619 queries += [helpextcmd]
621 queries += [helpextcmd]
620 if opts.get('extension'):
622 if opts.get('extension'):
621 queries += [helpext]
623 queries += [helpext]
622 if opts.get('command'):
624 if opts.get('command'):
623 queries += [helpcmd]
625 queries += [helpcmd]
624 if not queries:
626 if not queries:
625 queries = (helptopic, helpcmd, helpext, helpextcmd)
627 queries = (helptopic, helpcmd, helpext, helpextcmd)
626 for f in queries:
628 for f in queries:
627 try:
629 try:
628 rst = f(name, subtopic)
630 rst = f(name, subtopic)
629 break
631 break
630 except error.UnknownCommand:
632 except error.UnknownCommand:
631 pass
633 pass
632 else:
634 else:
633 if unknowncmd:
635 if unknowncmd:
634 raise error.UnknownCommand(name)
636 raise error.UnknownCommand(name)
635 else:
637 else:
636 msg = _('no such help topic: %s') % name
638 msg = _('no such help topic: %s') % name
637 hint = _("try 'hg help --keyword %s'") % name
639 hint = _("try 'hg help --keyword %s'") % name
638 raise error.Abort(msg, hint=hint)
640 raise error.Abort(msg, hint=hint)
639 else:
641 else:
640 # program name
642 # program name
641 if not ui.quiet:
643 if not ui.quiet:
642 rst = [_("Mercurial Distributed SCM\n"), '\n']
644 rst = [_("Mercurial Distributed SCM\n"), '\n']
643 rst.extend(helplist(None, **pycompat.strkwargs(opts)))
645 rst.extend(helplist(None, **pycompat.strkwargs(opts)))
644
646
645 return ''.join(rst)
647 return ''.join(rst)
646
648
647 def formattedhelp(ui, commands, fullname, keep=None, unknowncmd=False,
649 def formattedhelp(ui, commands, fullname, keep=None, unknowncmd=False,
648 full=True, **opts):
650 full=True, **opts):
649 """get help for a given topic (as a dotted name) as rendered rst
651 """get help for a given topic (as a dotted name) as rendered rst
650
652
651 Either returns the rendered help text or raises an exception.
653 Either returns the rendered help text or raises an exception.
652 """
654 """
653 if keep is None:
655 if keep is None:
654 keep = []
656 keep = []
655 else:
657 else:
656 keep = list(keep) # make a copy so we can mutate this later
658 keep = list(keep) # make a copy so we can mutate this later
657
659
658 # <fullname> := <name>[.<subtopic][.<section>]
660 # <fullname> := <name>[.<subtopic][.<section>]
659 name = subtopic = section = None
661 name = subtopic = section = None
660 if fullname is not None:
662 if fullname is not None:
661 nameparts = fullname.split('.')
663 nameparts = fullname.split('.')
662 name = nameparts.pop(0)
664 name = nameparts.pop(0)
663 if nameparts and name in subtopics:
665 if nameparts and name in subtopics:
664 subtopic = nameparts.pop(0)
666 subtopic = nameparts.pop(0)
665 if nameparts:
667 if nameparts:
666 section = encoding.lower('.'.join(nameparts))
668 section = encoding.lower('.'.join(nameparts))
667
669
668 textwidth = ui.configint('ui', 'textwidth')
670 textwidth = ui.configint('ui', 'textwidth')
669 termwidth = ui.termwidth() - 2
671 termwidth = ui.termwidth() - 2
670 if textwidth <= 0 or termwidth < textwidth:
672 if textwidth <= 0 or termwidth < textwidth:
671 textwidth = termwidth
673 textwidth = termwidth
672 text = help_(ui, commands, name,
674 text = help_(ui, commands, name,
673 subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts)
675 subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts)
674
676
675 blocks, pruned = minirst.parse(text, keep=keep)
677 blocks, pruned = minirst.parse(text, keep=keep)
676 if 'verbose' in pruned:
678 if 'verbose' in pruned:
677 keep.append('omitted')
679 keep.append('omitted')
678 else:
680 else:
679 keep.append('notomitted')
681 keep.append('notomitted')
680 blocks, pruned = minirst.parse(text, keep=keep)
682 blocks, pruned = minirst.parse(text, keep=keep)
681 if section:
683 if section:
682 blocks = minirst.filtersections(blocks, section)
684 blocks = minirst.filtersections(blocks, section)
683
685
684 # We could have been given a weird ".foo" section without a name
686 # We could have been given a weird ".foo" section without a name
685 # to look for, or we could have simply failed to found "foo.bar"
687 # to look for, or we could have simply failed to found "foo.bar"
686 # because bar isn't a section of foo
688 # because bar isn't a section of foo
687 if section and not (blocks and name):
689 if section and not (blocks and name):
688 raise error.Abort(_("help section not found: %s") % fullname)
690 raise error.Abort(_("help section not found: %s") % fullname)
689
691
690 return minirst.formatplain(blocks, textwidth)
692 return minirst.formatplain(blocks, textwidth)
@@ -1,172 +1,169 b''
1 Wire Protocol Version 2
2 =======================
3
4 **Experimental and under active development**
1 **Experimental and under active development**
5
2
6 This section documents the wire protocol commands exposed to transports
3 This section documents the wire protocol commands exposed to transports
7 using the frame-based protocol. The set of commands exposed through
4 using the frame-based protocol. The set of commands exposed through
8 these transports is distinct from the set of commands exposed to legacy
5 these transports is distinct from the set of commands exposed to legacy
9 transports.
6 transports.
10
7
11 The frame-based protocol uses CBOR to encode command execution requests.
8 The frame-based protocol uses CBOR to encode command execution requests.
12 All command arguments must be mapped to a specific or set of CBOR data
9 All command arguments must be mapped to a specific or set of CBOR data
13 types.
10 types.
14
11
15 The response to many commands is also CBOR. There is no common response
12 The response to many commands is also CBOR. There is no common response
16 format: each command defines its own response format.
13 format: each command defines its own response format.
17
14
18 TODOs
15 TODOs
19 =====
16 =====
20
17
21 * Add "node namespace" support to each command. In order to support
18 * Add "node namespace" support to each command. In order to support
22 SHA-1 hash transition, we want servers to be able to expose different
19 SHA-1 hash transition, we want servers to be able to expose different
23 "node namespaces" for the same data. Every command operating on nodes
20 "node namespaces" for the same data. Every command operating on nodes
24 should specify which "node namespace" it is operating on and responses
21 should specify which "node namespace" it is operating on and responses
25 should encode the "node namespace" accordingly.
22 should encode the "node namespace" accordingly.
26
23
27 Commands
24 Commands
28 ========
25 ========
29
26
30 The sections below detail all commands available to wire protocol version
27 The sections below detail all commands available to wire protocol version
31 2.
28 2.
32
29
33 branchmap
30 branchmap
34 ---------
31 ---------
35
32
36 Obtain heads in named branches.
33 Obtain heads in named branches.
37
34
38 Receives no arguments.
35 Receives no arguments.
39
36
40 The response is a map with bytestring keys defining the branch name.
37 The response is a map with bytestring keys defining the branch name.
41 Values are arrays of bytestring defining raw changeset nodes.
38 Values are arrays of bytestring defining raw changeset nodes.
42
39
43 capabilities
40 capabilities
44 ------------
41 ------------
45
42
46 Obtain the server's capabilities.
43 Obtain the server's capabilities.
47
44
48 Receives no arguments.
45 Receives no arguments.
49
46
50 This command is typically called only as part of the handshake during
47 This command is typically called only as part of the handshake during
51 initial connection establishment.
48 initial connection establishment.
52
49
53 The response is a map with bytestring keys defining server information.
50 The response is a map with bytestring keys defining server information.
54
51
55 The defined keys are:
52 The defined keys are:
56
53
57 commands
54 commands
58 A map defining available wire protocol commands on this server.
55 A map defining available wire protocol commands on this server.
59
56
60 Keys in the map are the names of commands that can be invoked. Values
57 Keys in the map are the names of commands that can be invoked. Values
61 are maps defining information about that command. The bytestring keys
58 are maps defining information about that command. The bytestring keys
62 are:
59 are:
63
60
64 args
61 args
65 A map of argument names and their expected types.
62 A map of argument names and their expected types.
66
63
67 Types are defined as a representative value for the expected type.
64 Types are defined as a representative value for the expected type.
68 e.g. an argument expecting a boolean type will have its value
65 e.g. an argument expecting a boolean type will have its value
69 set to true. An integer type will have its value set to 42. The
66 set to true. An integer type will have its value set to 42. The
70 actual values are arbitrary and may not have meaning.
67 actual values are arbitrary and may not have meaning.
71 permissions
68 permissions
72 An array of permissions required to execute this command.
69 An array of permissions required to execute this command.
73
70
74 compression
71 compression
75 An array of maps defining available compression format support.
72 An array of maps defining available compression format support.
76
73
77 The array is sorted from most preferred to least preferred.
74 The array is sorted from most preferred to least preferred.
78
75
79 Each entry has the following bytestring keys:
76 Each entry has the following bytestring keys:
80
77
81 name
78 name
82 Name of the compression engine. e.g. ``zstd`` or ``zlib``.
79 Name of the compression engine. e.g. ``zstd`` or ``zlib``.
83
80
84 framingmediatypes
81 framingmediatypes
85 An array of bytestrings defining the supported framing protocol
82 An array of bytestrings defining the supported framing protocol
86 media types. Servers will not accept media types not in this list.
83 media types. Servers will not accept media types not in this list.
87
84
88 rawrepoformats
85 rawrepoformats
89 An array of storage formats the repository is using. This set of
86 An array of storage formats the repository is using. This set of
90 requirements can be used to determine whether a client can read a
87 requirements can be used to determine whether a client can read a
91 *raw* copy of file data available.
88 *raw* copy of file data available.
92
89
93 heads
90 heads
94 -----
91 -----
95
92
96 Obtain DAG heads in the repository.
93 Obtain DAG heads in the repository.
97
94
98 The command accepts the following arguments:
95 The command accepts the following arguments:
99
96
100 publiconly (optional)
97 publiconly (optional)
101 (boolean) If set, operate on the DAG for public phase changesets only.
98 (boolean) If set, operate on the DAG for public phase changesets only.
102 Non-public (i.e. draft) phase DAG heads will not be returned.
99 Non-public (i.e. draft) phase DAG heads will not be returned.
103
100
104 The response is a CBOR array of bytestrings defining changeset nodes
101 The response is a CBOR array of bytestrings defining changeset nodes
105 of DAG heads. The array can be empty if the repository is empty or no
102 of DAG heads. The array can be empty if the repository is empty or no
106 changesets satisfied the request.
103 changesets satisfied the request.
107
104
108 TODO consider exposing phase of heads in response
105 TODO consider exposing phase of heads in response
109
106
110 known
107 known
111 -----
108 -----
112
109
113 Determine whether a series of changeset nodes is known to the server.
110 Determine whether a series of changeset nodes is known to the server.
114
111
115 The command accepts the following arguments:
112 The command accepts the following arguments:
116
113
117 nodes
114 nodes
118 (array of bytestrings) List of changeset nodes whose presence to
115 (array of bytestrings) List of changeset nodes whose presence to
119 query.
116 query.
120
117
121 The response is a bytestring where each byte contains a 0 or 1 for the
118 The response is a bytestring where each byte contains a 0 or 1 for the
122 corresponding requested node at the same index.
119 corresponding requested node at the same index.
123
120
124 TODO use a bit array for even more compact response
121 TODO use a bit array for even more compact response
125
122
126 listkeys
123 listkeys
127 --------
124 --------
128
125
129 List values in a specified ``pushkey`` namespace.
126 List values in a specified ``pushkey`` namespace.
130
127
131 The command receives the following arguments:
128 The command receives the following arguments:
132
129
133 namespace
130 namespace
134 (bytestring) Pushkey namespace to query.
131 (bytestring) Pushkey namespace to query.
135
132
136 The response is a map with bytestring keys and values.
133 The response is a map with bytestring keys and values.
137
134
138 TODO consider using binary to represent nodes in certain pushkey namespaces.
135 TODO consider using binary to represent nodes in certain pushkey namespaces.
139
136
140 lookup
137 lookup
141 ------
138 ------
142
139
143 Try to resolve a value to a changeset revision.
140 Try to resolve a value to a changeset revision.
144
141
145 Unlike ``known`` which operates on changeset nodes, lookup operates on
142 Unlike ``known`` which operates on changeset nodes, lookup operates on
146 node fragments and other names that a user may use.
143 node fragments and other names that a user may use.
147
144
148 The command receives the following arguments:
145 The command receives the following arguments:
149
146
150 key
147 key
151 (bytestring) Value to try to resolve.
148 (bytestring) Value to try to resolve.
152
149
153 On success, returns a bytestring containing the resolved node.
150 On success, returns a bytestring containing the resolved node.
154
151
155 pushkey
152 pushkey
156 -------
153 -------
157
154
158 Set a value using the ``pushkey`` protocol.
155 Set a value using the ``pushkey`` protocol.
159
156
160 The command receives the following arguments:
157 The command receives the following arguments:
161
158
162 namespace
159 namespace
163 (bytestring) Pushkey namespace to operate on.
160 (bytestring) Pushkey namespace to operate on.
164 key
161 key
165 (bytestring) The pushkey key to set.
162 (bytestring) The pushkey key to set.
166 old
163 old
167 (bytestring) Old value for this key.
164 (bytestring) Old value for this key.
168 new
165 new
169 (bytestring) New value for this key.
166 (bytestring) New value for this key.
170
167
171 TODO consider using binary to represent nodes is certain pushkey namespaces.
168 TODO consider using binary to represent nodes is certain pushkey namespaces.
172 TODO better define response type and meaning.
169 TODO better define response type and meaning.
@@ -1,3701 +1,3710 b''
1 Short help:
1 Short help:
2
2
3 $ hg
3 $ hg
4 Mercurial Distributed SCM
4 Mercurial Distributed SCM
5
5
6 basic commands:
6 basic commands:
7
7
8 add add the specified files on the next commit
8 add add the specified files on the next commit
9 annotate show changeset information by line for each file
9 annotate show changeset information by line for each file
10 clone make a copy of an existing repository
10 clone make a copy of an existing repository
11 commit commit the specified files or all outstanding changes
11 commit commit the specified files or all outstanding changes
12 diff diff repository (or selected files)
12 diff diff repository (or selected files)
13 export dump the header and diffs for one or more changesets
13 export dump the header and diffs for one or more changesets
14 forget forget the specified files on the next commit
14 forget forget the specified files on the next commit
15 init create a new repository in the given directory
15 init create a new repository in the given directory
16 log show revision history of entire repository or files
16 log show revision history of entire repository or files
17 merge merge another revision into working directory
17 merge merge another revision into working directory
18 pull pull changes from the specified source
18 pull pull changes from the specified source
19 push push changes to the specified destination
19 push push changes to the specified destination
20 remove remove the specified files on the next commit
20 remove remove the specified files on the next commit
21 serve start stand-alone webserver
21 serve start stand-alone webserver
22 status show changed files in the working directory
22 status show changed files in the working directory
23 summary summarize working directory state
23 summary summarize working directory state
24 update update working directory (or switch revisions)
24 update update working directory (or switch revisions)
25
25
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
27
27
28 $ hg -q
28 $ hg -q
29 add add the specified files on the next commit
29 add add the specified files on the next commit
30 annotate show changeset information by line for each file
30 annotate show changeset information by line for each file
31 clone make a copy of an existing repository
31 clone make a copy of an existing repository
32 commit commit the specified files or all outstanding changes
32 commit commit the specified files or all outstanding changes
33 diff diff repository (or selected files)
33 diff diff repository (or selected files)
34 export dump the header and diffs for one or more changesets
34 export dump the header and diffs for one or more changesets
35 forget forget the specified files on the next commit
35 forget forget the specified files on the next commit
36 init create a new repository in the given directory
36 init create a new repository in the given directory
37 log show revision history of entire repository or files
37 log show revision history of entire repository or files
38 merge merge another revision into working directory
38 merge merge another revision into working directory
39 pull pull changes from the specified source
39 pull pull changes from the specified source
40 push push changes to the specified destination
40 push push changes to the specified destination
41 remove remove the specified files on the next commit
41 remove remove the specified files on the next commit
42 serve start stand-alone webserver
42 serve start stand-alone webserver
43 status show changed files in the working directory
43 status show changed files in the working directory
44 summary summarize working directory state
44 summary summarize working directory state
45 update update working directory (or switch revisions)
45 update update working directory (or switch revisions)
46
46
47 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 add add the specified files on the next commit
56 add add the specified files on the next commit
57 addremove add all new files, delete all missing files
57 addremove add all new files, delete all missing files
58 annotate show changeset information by line for each file
58 annotate show changeset information by line for each file
59 archive create an unversioned archive of a repository revision
59 archive create an unversioned archive of a repository revision
60 backout reverse effect of earlier changeset
60 backout reverse effect of earlier changeset
61 bisect subdivision search of changesets
61 bisect subdivision search of changesets
62 bookmarks create a new bookmark or list existing bookmarks
62 bookmarks create a new bookmark or list existing bookmarks
63 branch set or show the current branch name
63 branch set or show the current branch name
64 branches list repository named branches
64 branches list repository named branches
65 bundle create a bundle file
65 bundle create a bundle file
66 cat output the current or given revision of files
66 cat output the current or given revision of files
67 clone make a copy of an existing repository
67 clone make a copy of an existing repository
68 commit commit the specified files or all outstanding changes
68 commit commit the specified files or all outstanding changes
69 config show combined config settings from all hgrc files
69 config show combined config settings from all hgrc files
70 copy mark files as copied for the next commit
70 copy mark files as copied for the next commit
71 diff diff repository (or selected files)
71 diff diff repository (or selected files)
72 export dump the header and diffs for one or more changesets
72 export dump the header and diffs for one or more changesets
73 files list tracked files
73 files list tracked files
74 forget forget the specified files on the next commit
74 forget forget the specified files on the next commit
75 graft copy changes from other branches onto the current branch
75 graft copy changes from other branches onto the current branch
76 grep search revision history for a pattern in specified files
76 grep search revision history for a pattern in specified files
77 heads show branch heads
77 heads show branch heads
78 help show help for a given topic or a help overview
78 help show help for a given topic or a help overview
79 identify identify the working directory or specified revision
79 identify identify the working directory or specified revision
80 import import an ordered set of patches
80 import import an ordered set of patches
81 incoming show new changesets found in source
81 incoming show new changesets found in source
82 init create a new repository in the given directory
82 init create a new repository in the given directory
83 log show revision history of entire repository or files
83 log show revision history of entire repository or files
84 manifest output the current or given revision of the project manifest
84 manifest output the current or given revision of the project manifest
85 merge merge another revision into working directory
85 merge merge another revision into working directory
86 outgoing show changesets not found in the destination
86 outgoing show changesets not found in the destination
87 paths show aliases for remote repositories
87 paths show aliases for remote repositories
88 phase set or show the current phase name
88 phase set or show the current phase name
89 pull pull changes from the specified source
89 pull pull changes from the specified source
90 push push changes to the specified destination
90 push push changes to the specified destination
91 recover roll back an interrupted transaction
91 recover roll back an interrupted transaction
92 remove remove the specified files on the next commit
92 remove remove the specified files on the next commit
93 rename rename files; equivalent of copy + remove
93 rename rename files; equivalent of copy + remove
94 resolve redo merges or set/view the merge status of files
94 resolve redo merges or set/view the merge status of files
95 revert restore files to their checkout state
95 revert restore files to their checkout state
96 root print the root (top) of the current working directory
96 root print the root (top) of the current working directory
97 serve start stand-alone webserver
97 serve start stand-alone webserver
98 status show changed files in the working directory
98 status show changed files in the working directory
99 summary summarize working directory state
99 summary summarize working directory state
100 tag add one or more tags for the current or given revision
100 tag add one or more tags for the current or given revision
101 tags list repository tags
101 tags list repository tags
102 unbundle apply one or more bundle files
102 unbundle apply one or more bundle files
103 update update working directory (or switch revisions)
103 update update working directory (or switch revisions)
104 verify verify the integrity of the repository
104 verify verify the integrity of the repository
105 version output version and copyright information
105 version output version and copyright information
106
106
107 additional help topics:
107 additional help topics:
108
108
109 bundlespec Bundle File Formats
109 bundlespec Bundle File Formats
110 color Colorizing Outputs
110 color Colorizing Outputs
111 config Configuration Files
111 config Configuration Files
112 dates Date Formats
112 dates Date Formats
113 deprecated Deprecated Features
113 deprecated Deprecated Features
114 diffs Diff Formats
114 diffs Diff Formats
115 environment Environment Variables
115 environment Environment Variables
116 extensions Using Additional Features
116 extensions Using Additional Features
117 filesets Specifying File Sets
117 filesets Specifying File Sets
118 flags Command-line flags
118 flags Command-line flags
119 glossary Glossary
119 glossary Glossary
120 hgignore Syntax for Mercurial Ignore Files
120 hgignore Syntax for Mercurial Ignore Files
121 hgweb Configuring hgweb
121 hgweb Configuring hgweb
122 internals Technical implementation topics
122 internals Technical implementation topics
123 merge-tools Merge Tools
123 merge-tools Merge Tools
124 pager Pager Support
124 pager Pager Support
125 patterns File Name Patterns
125 patterns File Name Patterns
126 phases Working with Phases
126 phases Working with Phases
127 revisions Specifying Revisions
127 revisions Specifying Revisions
128 scripting Using Mercurial from scripts and automation
128 scripting Using Mercurial from scripts and automation
129 subrepos Subrepositories
129 subrepos Subrepositories
130 templating Template Usage
130 templating Template Usage
131 urls URL Paths
131 urls URL Paths
132
132
133 (use 'hg help -v' to show built-in aliases and global options)
133 (use 'hg help -v' to show built-in aliases and global options)
134
134
135 $ hg -q help
135 $ hg -q help
136 add add the specified files on the next commit
136 add add the specified files on the next commit
137 addremove add all new files, delete all missing files
137 addremove add all new files, delete all missing files
138 annotate show changeset information by line for each file
138 annotate show changeset information by line for each file
139 archive create an unversioned archive of a repository revision
139 archive create an unversioned archive of a repository revision
140 backout reverse effect of earlier changeset
140 backout reverse effect of earlier changeset
141 bisect subdivision search of changesets
141 bisect subdivision search of changesets
142 bookmarks create a new bookmark or list existing bookmarks
142 bookmarks create a new bookmark or list existing bookmarks
143 branch set or show the current branch name
143 branch set or show the current branch name
144 branches list repository named branches
144 branches list repository named branches
145 bundle create a bundle file
145 bundle create a bundle file
146 cat output the current or given revision of files
146 cat output the current or given revision of files
147 clone make a copy of an existing repository
147 clone make a copy of an existing repository
148 commit commit the specified files or all outstanding changes
148 commit commit the specified files or all outstanding changes
149 config show combined config settings from all hgrc files
149 config show combined config settings from all hgrc files
150 copy mark files as copied for the next commit
150 copy mark files as copied for the next commit
151 diff diff repository (or selected files)
151 diff diff repository (or selected files)
152 export dump the header and diffs for one or more changesets
152 export dump the header and diffs for one or more changesets
153 files list tracked files
153 files list tracked files
154 forget forget the specified files on the next commit
154 forget forget the specified files on the next commit
155 graft copy changes from other branches onto the current branch
155 graft copy changes from other branches onto the current branch
156 grep search revision history for a pattern in specified files
156 grep search revision history for a pattern in specified files
157 heads show branch heads
157 heads show branch heads
158 help show help for a given topic or a help overview
158 help show help for a given topic or a help overview
159 identify identify the working directory or specified revision
159 identify identify the working directory or specified revision
160 import import an ordered set of patches
160 import import an ordered set of patches
161 incoming show new changesets found in source
161 incoming show new changesets found in source
162 init create a new repository in the given directory
162 init create a new repository in the given directory
163 log show revision history of entire repository or files
163 log show revision history of entire repository or files
164 manifest output the current or given revision of the project manifest
164 manifest output the current or given revision of the project manifest
165 merge merge another revision into working directory
165 merge merge another revision into working directory
166 outgoing show changesets not found in the destination
166 outgoing show changesets not found in the destination
167 paths show aliases for remote repositories
167 paths show aliases for remote repositories
168 phase set or show the current phase name
168 phase set or show the current phase name
169 pull pull changes from the specified source
169 pull pull changes from the specified source
170 push push changes to the specified destination
170 push push changes to the specified destination
171 recover roll back an interrupted transaction
171 recover roll back an interrupted transaction
172 remove remove the specified files on the next commit
172 remove remove the specified files on the next commit
173 rename rename files; equivalent of copy + remove
173 rename rename files; equivalent of copy + remove
174 resolve redo merges or set/view the merge status of files
174 resolve redo merges or set/view the merge status of files
175 revert restore files to their checkout state
175 revert restore files to their checkout state
176 root print the root (top) of the current working directory
176 root print the root (top) of the current working directory
177 serve start stand-alone webserver
177 serve start stand-alone webserver
178 status show changed files in the working directory
178 status show changed files in the working directory
179 summary summarize working directory state
179 summary summarize working directory state
180 tag add one or more tags for the current or given revision
180 tag add one or more tags for the current or given revision
181 tags list repository tags
181 tags list repository tags
182 unbundle apply one or more bundle files
182 unbundle apply one or more bundle files
183 update update working directory (or switch revisions)
183 update update working directory (or switch revisions)
184 verify verify the integrity of the repository
184 verify verify the integrity of the repository
185 version output version and copyright information
185 version output version and copyright information
186
186
187 additional help topics:
187 additional help topics:
188
188
189 bundlespec Bundle File Formats
189 bundlespec Bundle File Formats
190 color Colorizing Outputs
190 color Colorizing Outputs
191 config Configuration Files
191 config Configuration Files
192 dates Date Formats
192 dates Date Formats
193 deprecated Deprecated Features
193 deprecated Deprecated Features
194 diffs Diff Formats
194 diffs Diff Formats
195 environment Environment Variables
195 environment Environment Variables
196 extensions Using Additional Features
196 extensions Using Additional Features
197 filesets Specifying File Sets
197 filesets Specifying File Sets
198 flags Command-line flags
198 flags Command-line flags
199 glossary Glossary
199 glossary Glossary
200 hgignore Syntax for Mercurial Ignore Files
200 hgignore Syntax for Mercurial Ignore Files
201 hgweb Configuring hgweb
201 hgweb Configuring hgweb
202 internals Technical implementation topics
202 internals Technical implementation topics
203 merge-tools Merge Tools
203 merge-tools Merge Tools
204 pager Pager Support
204 pager Pager Support
205 patterns File Name Patterns
205 patterns File Name Patterns
206 phases Working with Phases
206 phases Working with Phases
207 revisions Specifying Revisions
207 revisions Specifying Revisions
208 scripting Using Mercurial from scripts and automation
208 scripting Using Mercurial from scripts and automation
209 subrepos Subrepositories
209 subrepos Subrepositories
210 templating Template Usage
210 templating Template Usage
211 urls URL Paths
211 urls URL Paths
212
212
213 Test extension help:
213 Test extension help:
214 $ hg help extensions --config extensions.rebase= --config extensions.children=
214 $ hg help extensions --config extensions.rebase= --config extensions.children=
215 Using Additional Features
215 Using Additional Features
216 """""""""""""""""""""""""
216 """""""""""""""""""""""""
217
217
218 Mercurial has the ability to add new features through the use of
218 Mercurial has the ability to add new features through the use of
219 extensions. Extensions may add new commands, add options to existing
219 extensions. Extensions may add new commands, add options to existing
220 commands, change the default behavior of commands, or implement hooks.
220 commands, change the default behavior of commands, or implement hooks.
221
221
222 To enable the "foo" extension, either shipped with Mercurial or in the
222 To enable the "foo" extension, either shipped with Mercurial or in the
223 Python search path, create an entry for it in your configuration file,
223 Python search path, create an entry for it in your configuration file,
224 like this:
224 like this:
225
225
226 [extensions]
226 [extensions]
227 foo =
227 foo =
228
228
229 You may also specify the full path to an extension:
229 You may also specify the full path to an extension:
230
230
231 [extensions]
231 [extensions]
232 myfeature = ~/.hgext/myfeature.py
232 myfeature = ~/.hgext/myfeature.py
233
233
234 See 'hg help config' for more information on configuration files.
234 See 'hg help config' for more information on configuration files.
235
235
236 Extensions are not loaded by default for a variety of reasons: they can
236 Extensions are not loaded by default for a variety of reasons: they can
237 increase startup overhead; they may be meant for advanced usage only; they
237 increase startup overhead; they may be meant for advanced usage only; they
238 may provide potentially dangerous abilities (such as letting you destroy
238 may provide potentially dangerous abilities (such as letting you destroy
239 or modify history); they might not be ready for prime time; or they may
239 or modify history); they might not be ready for prime time; or they may
240 alter some usual behaviors of stock Mercurial. It is thus up to the user
240 alter some usual behaviors of stock Mercurial. It is thus up to the user
241 to activate extensions as needed.
241 to activate extensions as needed.
242
242
243 To explicitly disable an extension enabled in a configuration file of
243 To explicitly disable an extension enabled in a configuration file of
244 broader scope, prepend its path with !:
244 broader scope, prepend its path with !:
245
245
246 [extensions]
246 [extensions]
247 # disabling extension bar residing in /path/to/extension/bar.py
247 # disabling extension bar residing in /path/to/extension/bar.py
248 bar = !/path/to/extension/bar.py
248 bar = !/path/to/extension/bar.py
249 # ditto, but no path was supplied for extension baz
249 # ditto, but no path was supplied for extension baz
250 baz = !
250 baz = !
251
251
252 enabled extensions:
252 enabled extensions:
253
253
254 children command to display child changesets (DEPRECATED)
254 children command to display child changesets (DEPRECATED)
255 rebase command to move sets of revisions to a different ancestor
255 rebase command to move sets of revisions to a different ancestor
256
256
257 disabled extensions:
257 disabled extensions:
258
258
259 acl hooks for controlling repository access
259 acl hooks for controlling repository access
260 blackbox log repository events to a blackbox for debugging
260 blackbox log repository events to a blackbox for debugging
261 bugzilla hooks for integrating with the Bugzilla bug tracker
261 bugzilla hooks for integrating with the Bugzilla bug tracker
262 censor erase file content at a given revision
262 censor erase file content at a given revision
263 churn command to display statistics about repository history
263 churn command to display statistics about repository history
264 clonebundles advertise pre-generated bundles to seed clones
264 clonebundles advertise pre-generated bundles to seed clones
265 convert import revisions from foreign VCS repositories into
265 convert import revisions from foreign VCS repositories into
266 Mercurial
266 Mercurial
267 eol automatically manage newlines in repository files
267 eol automatically manage newlines in repository files
268 extdiff command to allow external programs to compare revisions
268 extdiff command to allow external programs to compare revisions
269 factotum http authentication with factotum
269 factotum http authentication with factotum
270 githelp try mapping git commands to Mercurial commands
270 githelp try mapping git commands to Mercurial commands
271 gpg commands to sign and verify changesets
271 gpg commands to sign and verify changesets
272 hgk browse the repository in a graphical way
272 hgk browse the repository in a graphical way
273 highlight syntax highlighting for hgweb (requires Pygments)
273 highlight syntax highlighting for hgweb (requires Pygments)
274 histedit interactive history editing
274 histedit interactive history editing
275 keyword expand keywords in tracked files
275 keyword expand keywords in tracked files
276 largefiles track large binary files
276 largefiles track large binary files
277 mq manage a stack of patches
277 mq manage a stack of patches
278 notify hooks for sending email push notifications
278 notify hooks for sending email push notifications
279 patchbomb command to send changesets as (a series of) patch emails
279 patchbomb command to send changesets as (a series of) patch emails
280 purge command to delete untracked files from the working
280 purge command to delete untracked files from the working
281 directory
281 directory
282 relink recreates hardlinks between repository clones
282 relink recreates hardlinks between repository clones
283 schemes extend schemes with shortcuts to repository swarms
283 schemes extend schemes with shortcuts to repository swarms
284 share share a common history between several working directories
284 share share a common history between several working directories
285 shelve save and restore changes to the working directory
285 shelve save and restore changes to the working directory
286 strip strip changesets and their descendants from history
286 strip strip changesets and their descendants from history
287 transplant command to transplant changesets from another branch
287 transplant command to transplant changesets from another branch
288 win32mbcs allow the use of MBCS paths with problematic encodings
288 win32mbcs allow the use of MBCS paths with problematic encodings
289 zeroconf discover and advertise repositories on the local network
289 zeroconf discover and advertise repositories on the local network
290
290
291 #endif
291 #endif
292
292
293 Verify that deprecated extensions are included if --verbose:
293 Verify that deprecated extensions are included if --verbose:
294
294
295 $ hg -v help extensions | grep children
295 $ hg -v help extensions | grep children
296 children command to display child changesets (DEPRECATED)
296 children command to display child changesets (DEPRECATED)
297
297
298 Verify that extension keywords appear in help templates
298 Verify that extension keywords appear in help templates
299
299
300 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
300 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
301
301
302 Test short command list with verbose option
302 Test short command list with verbose option
303
303
304 $ hg -v help shortlist
304 $ hg -v help shortlist
305 Mercurial Distributed SCM
305 Mercurial Distributed SCM
306
306
307 basic commands:
307 basic commands:
308
308
309 add add the specified files on the next commit
309 add add the specified files on the next commit
310 annotate, blame
310 annotate, blame
311 show changeset information by line for each file
311 show changeset information by line for each file
312 clone make a copy of an existing repository
312 clone make a copy of an existing repository
313 commit, ci commit the specified files or all outstanding changes
313 commit, ci commit the specified files or all outstanding changes
314 diff diff repository (or selected files)
314 diff diff repository (or selected files)
315 export dump the header and diffs for one or more changesets
315 export dump the header and diffs for one or more changesets
316 forget forget the specified files on the next commit
316 forget forget the specified files on the next commit
317 init create a new repository in the given directory
317 init create a new repository in the given directory
318 log, history show revision history of entire repository or files
318 log, history show revision history of entire repository or files
319 merge merge another revision into working directory
319 merge merge another revision into working directory
320 pull pull changes from the specified source
320 pull pull changes from the specified source
321 push push changes to the specified destination
321 push push changes to the specified destination
322 remove, rm remove the specified files on the next commit
322 remove, rm remove the specified files on the next commit
323 serve start stand-alone webserver
323 serve start stand-alone webserver
324 status, st show changed files in the working directory
324 status, st show changed files in the working directory
325 summary, sum summarize working directory state
325 summary, sum summarize working directory state
326 update, up, checkout, co
326 update, up, checkout, co
327 update working directory (or switch revisions)
327 update working directory (or switch revisions)
328
328
329 global options ([+] can be repeated):
329 global options ([+] can be repeated):
330
330
331 -R --repository REPO repository root directory or name of overlay bundle
331 -R --repository REPO repository root directory or name of overlay bundle
332 file
332 file
333 --cwd DIR change working directory
333 --cwd DIR change working directory
334 -y --noninteractive do not prompt, automatically pick the first choice for
334 -y --noninteractive do not prompt, automatically pick the first choice for
335 all prompts
335 all prompts
336 -q --quiet suppress output
336 -q --quiet suppress output
337 -v --verbose enable additional output
337 -v --verbose enable additional output
338 --color TYPE when to colorize (boolean, always, auto, never, or
338 --color TYPE when to colorize (boolean, always, auto, never, or
339 debug)
339 debug)
340 --config CONFIG [+] set/override config option (use 'section.name=value')
340 --config CONFIG [+] set/override config option (use 'section.name=value')
341 --debug enable debugging output
341 --debug enable debugging output
342 --debugger start debugger
342 --debugger start debugger
343 --encoding ENCODE set the charset encoding (default: ascii)
343 --encoding ENCODE set the charset encoding (default: ascii)
344 --encodingmode MODE set the charset encoding mode (default: strict)
344 --encodingmode MODE set the charset encoding mode (default: strict)
345 --traceback always print a traceback on exception
345 --traceback always print a traceback on exception
346 --time time how long the command takes
346 --time time how long the command takes
347 --profile print command execution profile
347 --profile print command execution profile
348 --version output version information and exit
348 --version output version information and exit
349 -h --help display help and exit
349 -h --help display help and exit
350 --hidden consider hidden changesets
350 --hidden consider hidden changesets
351 --pager TYPE when to paginate (boolean, always, auto, or never)
351 --pager TYPE when to paginate (boolean, always, auto, or never)
352 (default: auto)
352 (default: auto)
353
353
354 (use 'hg help' for the full list of commands)
354 (use 'hg help' for the full list of commands)
355
355
356 $ hg add -h
356 $ hg add -h
357 hg add [OPTION]... [FILE]...
357 hg add [OPTION]... [FILE]...
358
358
359 add the specified files on the next commit
359 add the specified files on the next commit
360
360
361 Schedule files to be version controlled and added to the repository.
361 Schedule files to be version controlled and added to the repository.
362
362
363 The files will be added to the repository at the next commit. To undo an
363 The files will be added to the repository at the next commit. To undo an
364 add before that, see 'hg forget'.
364 add before that, see 'hg forget'.
365
365
366 If no names are given, add all files to the repository (except files
366 If no names are given, add all files to the repository (except files
367 matching ".hgignore").
367 matching ".hgignore").
368
368
369 Returns 0 if all files are successfully added.
369 Returns 0 if all files are successfully added.
370
370
371 options ([+] can be repeated):
371 options ([+] can be repeated):
372
372
373 -I --include PATTERN [+] include names matching the given patterns
373 -I --include PATTERN [+] include names matching the given patterns
374 -X --exclude PATTERN [+] exclude names matching the given patterns
374 -X --exclude PATTERN [+] exclude names matching the given patterns
375 -S --subrepos recurse into subrepositories
375 -S --subrepos recurse into subrepositories
376 -n --dry-run do not perform actions, just print output
376 -n --dry-run do not perform actions, just print output
377
377
378 (some details hidden, use --verbose to show complete help)
378 (some details hidden, use --verbose to show complete help)
379
379
380 Verbose help for add
380 Verbose help for add
381
381
382 $ hg add -hv
382 $ hg add -hv
383 hg add [OPTION]... [FILE]...
383 hg add [OPTION]... [FILE]...
384
384
385 add the specified files on the next commit
385 add the specified files on the next commit
386
386
387 Schedule files to be version controlled and added to the repository.
387 Schedule files to be version controlled and added to the repository.
388
388
389 The files will be added to the repository at the next commit. To undo an
389 The files will be added to the repository at the next commit. To undo an
390 add before that, see 'hg forget'.
390 add before that, see 'hg forget'.
391
391
392 If no names are given, add all files to the repository (except files
392 If no names are given, add all files to the repository (except files
393 matching ".hgignore").
393 matching ".hgignore").
394
394
395 Examples:
395 Examples:
396
396
397 - New (unknown) files are added automatically by 'hg add':
397 - New (unknown) files are added automatically by 'hg add':
398
398
399 $ ls
399 $ ls
400 foo.c
400 foo.c
401 $ hg status
401 $ hg status
402 ? foo.c
402 ? foo.c
403 $ hg add
403 $ hg add
404 adding foo.c
404 adding foo.c
405 $ hg status
405 $ hg status
406 A foo.c
406 A foo.c
407
407
408 - Specific files to be added can be specified:
408 - Specific files to be added can be specified:
409
409
410 $ ls
410 $ ls
411 bar.c foo.c
411 bar.c foo.c
412 $ hg status
412 $ hg status
413 ? bar.c
413 ? bar.c
414 ? foo.c
414 ? foo.c
415 $ hg add bar.c
415 $ hg add bar.c
416 $ hg status
416 $ hg status
417 A bar.c
417 A bar.c
418 ? foo.c
418 ? foo.c
419
419
420 Returns 0 if all files are successfully added.
420 Returns 0 if all files are successfully added.
421
421
422 options ([+] can be repeated):
422 options ([+] can be repeated):
423
423
424 -I --include PATTERN [+] include names matching the given patterns
424 -I --include PATTERN [+] include names matching the given patterns
425 -X --exclude PATTERN [+] exclude names matching the given patterns
425 -X --exclude PATTERN [+] exclude names matching the given patterns
426 -S --subrepos recurse into subrepositories
426 -S --subrepos recurse into subrepositories
427 -n --dry-run do not perform actions, just print output
427 -n --dry-run do not perform actions, just print output
428
428
429 global options ([+] can be repeated):
429 global options ([+] can be repeated):
430
430
431 -R --repository REPO repository root directory or name of overlay bundle
431 -R --repository REPO repository root directory or name of overlay bundle
432 file
432 file
433 --cwd DIR change working directory
433 --cwd DIR change working directory
434 -y --noninteractive do not prompt, automatically pick the first choice for
434 -y --noninteractive do not prompt, automatically pick the first choice for
435 all prompts
435 all prompts
436 -q --quiet suppress output
436 -q --quiet suppress output
437 -v --verbose enable additional output
437 -v --verbose enable additional output
438 --color TYPE when to colorize (boolean, always, auto, never, or
438 --color TYPE when to colorize (boolean, always, auto, never, or
439 debug)
439 debug)
440 --config CONFIG [+] set/override config option (use 'section.name=value')
440 --config CONFIG [+] set/override config option (use 'section.name=value')
441 --debug enable debugging output
441 --debug enable debugging output
442 --debugger start debugger
442 --debugger start debugger
443 --encoding ENCODE set the charset encoding (default: ascii)
443 --encoding ENCODE set the charset encoding (default: ascii)
444 --encodingmode MODE set the charset encoding mode (default: strict)
444 --encodingmode MODE set the charset encoding mode (default: strict)
445 --traceback always print a traceback on exception
445 --traceback always print a traceback on exception
446 --time time how long the command takes
446 --time time how long the command takes
447 --profile print command execution profile
447 --profile print command execution profile
448 --version output version information and exit
448 --version output version information and exit
449 -h --help display help and exit
449 -h --help display help and exit
450 --hidden consider hidden changesets
450 --hidden consider hidden changesets
451 --pager TYPE when to paginate (boolean, always, auto, or never)
451 --pager TYPE when to paginate (boolean, always, auto, or never)
452 (default: auto)
452 (default: auto)
453
453
454 Test the textwidth config option
454 Test the textwidth config option
455
455
456 $ hg root -h --config ui.textwidth=50
456 $ hg root -h --config ui.textwidth=50
457 hg root
457 hg root
458
458
459 print the root (top) of the current working
459 print the root (top) of the current working
460 directory
460 directory
461
461
462 Print the root directory of the current
462 Print the root directory of the current
463 repository.
463 repository.
464
464
465 Returns 0 on success.
465 Returns 0 on success.
466
466
467 (some details hidden, use --verbose to show
467 (some details hidden, use --verbose to show
468 complete help)
468 complete help)
469
469
470 Test help option with version option
470 Test help option with version option
471
471
472 $ hg add -h --version
472 $ hg add -h --version
473 Mercurial Distributed SCM (version *) (glob)
473 Mercurial Distributed SCM (version *) (glob)
474 (see https://mercurial-scm.org for more information)
474 (see https://mercurial-scm.org for more information)
475
475
476 Copyright (C) 2005-* Matt Mackall and others (glob)
476 Copyright (C) 2005-* Matt Mackall and others (glob)
477 This is free software; see the source for copying conditions. There is NO
477 This is free software; see the source for copying conditions. There is NO
478 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
478 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
479
479
480 $ hg add --skjdfks
480 $ hg add --skjdfks
481 hg add: option --skjdfks not recognized
481 hg add: option --skjdfks not recognized
482 hg add [OPTION]... [FILE]...
482 hg add [OPTION]... [FILE]...
483
483
484 add the specified files on the next commit
484 add the specified files on the next commit
485
485
486 options ([+] can be repeated):
486 options ([+] can be repeated):
487
487
488 -I --include PATTERN [+] include names matching the given patterns
488 -I --include PATTERN [+] include names matching the given patterns
489 -X --exclude PATTERN [+] exclude names matching the given patterns
489 -X --exclude PATTERN [+] exclude names matching the given patterns
490 -S --subrepos recurse into subrepositories
490 -S --subrepos recurse into subrepositories
491 -n --dry-run do not perform actions, just print output
491 -n --dry-run do not perform actions, just print output
492
492
493 (use 'hg add -h' to show more help)
493 (use 'hg add -h' to show more help)
494 [255]
494 [255]
495
495
496 Test ambiguous command help
496 Test ambiguous command help
497
497
498 $ hg help ad
498 $ hg help ad
499 list of commands:
499 list of commands:
500
500
501 add add the specified files on the next commit
501 add add the specified files on the next commit
502 addremove add all new files, delete all missing files
502 addremove add all new files, delete all missing files
503
503
504 (use 'hg help -v ad' to show built-in aliases and global options)
504 (use 'hg help -v ad' to show built-in aliases and global options)
505
505
506 Test command without options
506 Test command without options
507
507
508 $ hg help verify
508 $ hg help verify
509 hg verify
509 hg verify
510
510
511 verify the integrity of the repository
511 verify the integrity of the repository
512
512
513 Verify the integrity of the current repository.
513 Verify the integrity of the current repository.
514
514
515 This will perform an extensive check of the repository's integrity,
515 This will perform an extensive check of the repository's integrity,
516 validating the hashes and checksums of each entry in the changelog,
516 validating the hashes and checksums of each entry in the changelog,
517 manifest, and tracked files, as well as the integrity of their crosslinks
517 manifest, and tracked files, as well as the integrity of their crosslinks
518 and indices.
518 and indices.
519
519
520 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
520 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
521 information about recovery from corruption of the repository.
521 information about recovery from corruption of the repository.
522
522
523 Returns 0 on success, 1 if errors are encountered.
523 Returns 0 on success, 1 if errors are encountered.
524
524
525 (some details hidden, use --verbose to show complete help)
525 (some details hidden, use --verbose to show complete help)
526
526
527 $ hg help diff
527 $ hg help diff
528 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
528 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
529
529
530 diff repository (or selected files)
530 diff repository (or selected files)
531
531
532 Show differences between revisions for the specified files.
532 Show differences between revisions for the specified files.
533
533
534 Differences between files are shown using the unified diff format.
534 Differences between files are shown using the unified diff format.
535
535
536 Note:
536 Note:
537 'hg diff' may generate unexpected results for merges, as it will
537 'hg diff' may generate unexpected results for merges, as it will
538 default to comparing against the working directory's first parent
538 default to comparing against the working directory's first parent
539 changeset if no revisions are specified.
539 changeset if no revisions are specified.
540
540
541 When two revision arguments are given, then changes are shown between
541 When two revision arguments are given, then changes are shown between
542 those revisions. If only one revision is specified then that revision is
542 those revisions. If only one revision is specified then that revision is
543 compared to the working directory, and, when no revisions are specified,
543 compared to the working directory, and, when no revisions are specified,
544 the working directory files are compared to its first parent.
544 the working directory files are compared to its first parent.
545
545
546 Alternatively you can specify -c/--change with a revision to see the
546 Alternatively you can specify -c/--change with a revision to see the
547 changes in that changeset relative to its first parent.
547 changes in that changeset relative to its first parent.
548
548
549 Without the -a/--text option, diff will avoid generating diffs of files it
549 Without the -a/--text option, diff will avoid generating diffs of files it
550 detects as binary. With -a, diff will generate a diff anyway, probably
550 detects as binary. With -a, diff will generate a diff anyway, probably
551 with undesirable results.
551 with undesirable results.
552
552
553 Use the -g/--git option to generate diffs in the git extended diff format.
553 Use the -g/--git option to generate diffs in the git extended diff format.
554 For more information, read 'hg help diffs'.
554 For more information, read 'hg help diffs'.
555
555
556 Returns 0 on success.
556 Returns 0 on success.
557
557
558 options ([+] can be repeated):
558 options ([+] can be repeated):
559
559
560 -r --rev REV [+] revision
560 -r --rev REV [+] revision
561 -c --change REV change made by revision
561 -c --change REV change made by revision
562 -a --text treat all files as text
562 -a --text treat all files as text
563 -g --git use git extended diff format
563 -g --git use git extended diff format
564 --binary generate binary diffs in git mode (default)
564 --binary generate binary diffs in git mode (default)
565 --nodates omit dates from diff headers
565 --nodates omit dates from diff headers
566 --noprefix omit a/ and b/ prefixes from filenames
566 --noprefix omit a/ and b/ prefixes from filenames
567 -p --show-function show which function each change is in
567 -p --show-function show which function each change is in
568 --reverse produce a diff that undoes the changes
568 --reverse produce a diff that undoes the changes
569 -w --ignore-all-space ignore white space when comparing lines
569 -w --ignore-all-space ignore white space when comparing lines
570 -b --ignore-space-change ignore changes in the amount of white space
570 -b --ignore-space-change ignore changes in the amount of white space
571 -B --ignore-blank-lines ignore changes whose lines are all blank
571 -B --ignore-blank-lines ignore changes whose lines are all blank
572 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
572 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
573 -U --unified NUM number of lines of context to show
573 -U --unified NUM number of lines of context to show
574 --stat output diffstat-style summary of changes
574 --stat output diffstat-style summary of changes
575 --root DIR produce diffs relative to subdirectory
575 --root DIR produce diffs relative to subdirectory
576 -I --include PATTERN [+] include names matching the given patterns
576 -I --include PATTERN [+] include names matching the given patterns
577 -X --exclude PATTERN [+] exclude names matching the given patterns
577 -X --exclude PATTERN [+] exclude names matching the given patterns
578 -S --subrepos recurse into subrepositories
578 -S --subrepos recurse into subrepositories
579
579
580 (some details hidden, use --verbose to show complete help)
580 (some details hidden, use --verbose to show complete help)
581
581
582 $ hg help status
582 $ hg help status
583 hg status [OPTION]... [FILE]...
583 hg status [OPTION]... [FILE]...
584
584
585 aliases: st
585 aliases: st
586
586
587 show changed files in the working directory
587 show changed files in the working directory
588
588
589 Show status of files in the repository. If names are given, only files
589 Show status of files in the repository. If names are given, only files
590 that match are shown. Files that are clean or ignored or the source of a
590 that match are shown. Files that are clean or ignored or the source of a
591 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
591 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
592 -C/--copies or -A/--all are given. Unless options described with "show
592 -C/--copies or -A/--all are given. Unless options described with "show
593 only ..." are given, the options -mardu are used.
593 only ..." are given, the options -mardu are used.
594
594
595 Option -q/--quiet hides untracked (unknown and ignored) files unless
595 Option -q/--quiet hides untracked (unknown and ignored) files unless
596 explicitly requested with -u/--unknown or -i/--ignored.
596 explicitly requested with -u/--unknown or -i/--ignored.
597
597
598 Note:
598 Note:
599 'hg status' may appear to disagree with diff if permissions have
599 'hg status' may appear to disagree with diff if permissions have
600 changed or a merge has occurred. The standard diff format does not
600 changed or a merge has occurred. The standard diff format does not
601 report permission changes and diff only reports changes relative to one
601 report permission changes and diff only reports changes relative to one
602 merge parent.
602 merge parent.
603
603
604 If one revision is given, it is used as the base revision. If two
604 If one revision is given, it is used as the base revision. If two
605 revisions are given, the differences between them are shown. The --change
605 revisions are given, the differences between them are shown. The --change
606 option can also be used as a shortcut to list the changed files of a
606 option can also be used as a shortcut to list the changed files of a
607 revision from its first parent.
607 revision from its first parent.
608
608
609 The codes used to show the status of files are:
609 The codes used to show the status of files are:
610
610
611 M = modified
611 M = modified
612 A = added
612 A = added
613 R = removed
613 R = removed
614 C = clean
614 C = clean
615 ! = missing (deleted by non-hg command, but still tracked)
615 ! = missing (deleted by non-hg command, but still tracked)
616 ? = not tracked
616 ? = not tracked
617 I = ignored
617 I = ignored
618 = origin of the previous file (with --copies)
618 = origin of the previous file (with --copies)
619
619
620 Returns 0 on success.
620 Returns 0 on success.
621
621
622 options ([+] can be repeated):
622 options ([+] can be repeated):
623
623
624 -A --all show status of all files
624 -A --all show status of all files
625 -m --modified show only modified files
625 -m --modified show only modified files
626 -a --added show only added files
626 -a --added show only added files
627 -r --removed show only removed files
627 -r --removed show only removed files
628 -d --deleted show only deleted (but tracked) files
628 -d --deleted show only deleted (but tracked) files
629 -c --clean show only files without changes
629 -c --clean show only files without changes
630 -u --unknown show only unknown (not tracked) files
630 -u --unknown show only unknown (not tracked) files
631 -i --ignored show only ignored files
631 -i --ignored show only ignored files
632 -n --no-status hide status prefix
632 -n --no-status hide status prefix
633 -C --copies show source of copied files
633 -C --copies show source of copied files
634 -0 --print0 end filenames with NUL, for use with xargs
634 -0 --print0 end filenames with NUL, for use with xargs
635 --rev REV [+] show difference from revision
635 --rev REV [+] show difference from revision
636 --change REV list the changed files of a revision
636 --change REV list the changed files of a revision
637 -I --include PATTERN [+] include names matching the given patterns
637 -I --include PATTERN [+] include names matching the given patterns
638 -X --exclude PATTERN [+] exclude names matching the given patterns
638 -X --exclude PATTERN [+] exclude names matching the given patterns
639 -S --subrepos recurse into subrepositories
639 -S --subrepos recurse into subrepositories
640
640
641 (some details hidden, use --verbose to show complete help)
641 (some details hidden, use --verbose to show complete help)
642
642
643 $ hg -q help status
643 $ hg -q help status
644 hg status [OPTION]... [FILE]...
644 hg status [OPTION]... [FILE]...
645
645
646 show changed files in the working directory
646 show changed files in the working directory
647
647
648 $ hg help foo
648 $ hg help foo
649 abort: no such help topic: foo
649 abort: no such help topic: foo
650 (try 'hg help --keyword foo')
650 (try 'hg help --keyword foo')
651 [255]
651 [255]
652
652
653 $ hg skjdfks
653 $ hg skjdfks
654 hg: unknown command 'skjdfks'
654 hg: unknown command 'skjdfks'
655 (use 'hg help' for a list of commands)
655 (use 'hg help' for a list of commands)
656 [255]
656 [255]
657
657
658 Typoed command gives suggestion
658 Typoed command gives suggestion
659 $ hg puls
659 $ hg puls
660 hg: unknown command 'puls'
660 hg: unknown command 'puls'
661 (did you mean one of pull, push?)
661 (did you mean one of pull, push?)
662 [255]
662 [255]
663
663
664 Not enabled extension gets suggested
664 Not enabled extension gets suggested
665
665
666 $ hg rebase
666 $ hg rebase
667 hg: unknown command 'rebase'
667 hg: unknown command 'rebase'
668 'rebase' is provided by the following extension:
668 'rebase' is provided by the following extension:
669
669
670 rebase command to move sets of revisions to a different ancestor
670 rebase command to move sets of revisions to a different ancestor
671
671
672 (use 'hg help extensions' for information on enabling extensions)
672 (use 'hg help extensions' for information on enabling extensions)
673 [255]
673 [255]
674
674
675 Disabled extension gets suggested
675 Disabled extension gets suggested
676 $ hg --config extensions.rebase=! rebase
676 $ hg --config extensions.rebase=! rebase
677 hg: unknown command 'rebase'
677 hg: unknown command 'rebase'
678 'rebase' is provided by the following extension:
678 'rebase' is provided by the following extension:
679
679
680 rebase command to move sets of revisions to a different ancestor
680 rebase command to move sets of revisions to a different ancestor
681
681
682 (use 'hg help extensions' for information on enabling extensions)
682 (use 'hg help extensions' for information on enabling extensions)
683 [255]
683 [255]
684
684
685 Make sure that we don't run afoul of the help system thinking that
685 Make sure that we don't run afoul of the help system thinking that
686 this is a section and erroring out weirdly.
686 this is a section and erroring out weirdly.
687
687
688 $ hg .log
688 $ hg .log
689 hg: unknown command '.log'
689 hg: unknown command '.log'
690 (did you mean log?)
690 (did you mean log?)
691 [255]
691 [255]
692
692
693 $ hg log.
693 $ hg log.
694 hg: unknown command 'log.'
694 hg: unknown command 'log.'
695 (did you mean log?)
695 (did you mean log?)
696 [255]
696 [255]
697 $ hg pu.lh
697 $ hg pu.lh
698 hg: unknown command 'pu.lh'
698 hg: unknown command 'pu.lh'
699 (did you mean one of pull, push?)
699 (did you mean one of pull, push?)
700 [255]
700 [255]
701
701
702 $ cat > helpext.py <<EOF
702 $ cat > helpext.py <<EOF
703 > import os
703 > import os
704 > from mercurial import commands, fancyopts, registrar
704 > from mercurial import commands, fancyopts, registrar
705 >
705 >
706 > def func(arg):
706 > def func(arg):
707 > return '%sfoo' % arg
707 > return '%sfoo' % arg
708 > class customopt(fancyopts.customopt):
708 > class customopt(fancyopts.customopt):
709 > def newstate(self, oldstate, newparam, abort):
709 > def newstate(self, oldstate, newparam, abort):
710 > return '%sbar' % oldstate
710 > return '%sbar' % oldstate
711 > cmdtable = {}
711 > cmdtable = {}
712 > command = registrar.command(cmdtable)
712 > command = registrar.command(cmdtable)
713 >
713 >
714 > @command(b'nohelp',
714 > @command(b'nohelp',
715 > [(b'', b'longdesc', 3, b'x'*67),
715 > [(b'', b'longdesc', 3, b'x'*67),
716 > (b'n', b'', None, b'normal desc'),
716 > (b'n', b'', None, b'normal desc'),
717 > (b'', b'newline', b'', b'line1\nline2'),
717 > (b'', b'newline', b'', b'line1\nline2'),
718 > (b'', b'callableopt', func, b'adds foo'),
718 > (b'', b'callableopt', func, b'adds foo'),
719 > (b'', b'customopt', customopt(''), b'adds bar'),
719 > (b'', b'customopt', customopt(''), b'adds bar'),
720 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
720 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
721 > b'hg nohelp',
721 > b'hg nohelp',
722 > norepo=True)
722 > norepo=True)
723 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
723 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
724 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
724 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
725 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
725 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
726 > def nohelp(ui, *args, **kwargs):
726 > def nohelp(ui, *args, **kwargs):
727 > pass
727 > pass
728 >
728 >
729 > def uisetup(ui):
729 > def uisetup(ui):
730 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
730 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
731 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
731 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
732 >
732 >
733 > EOF
733 > EOF
734 $ echo '[extensions]' >> $HGRCPATH
734 $ echo '[extensions]' >> $HGRCPATH
735 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
735 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
736
736
737 Test for aliases
737 Test for aliases
738
738
739 $ hg help hgalias
739 $ hg help hgalias
740 hg hgalias [--remote]
740 hg hgalias [--remote]
741
741
742 alias for: hg summary
742 alias for: hg summary
743
743
744 summarize working directory state
744 summarize working directory state
745
745
746 This generates a brief summary of the working directory state, including
746 This generates a brief summary of the working directory state, including
747 parents, branch, commit status, phase and available updates.
747 parents, branch, commit status, phase and available updates.
748
748
749 With the --remote option, this will check the default paths for incoming
749 With the --remote option, this will check the default paths for incoming
750 and outgoing changes. This can be time-consuming.
750 and outgoing changes. This can be time-consuming.
751
751
752 Returns 0 on success.
752 Returns 0 on success.
753
753
754 defined by: helpext
754 defined by: helpext
755
755
756 options:
756 options:
757
757
758 --remote check for push and pull
758 --remote check for push and pull
759
759
760 (some details hidden, use --verbose to show complete help)
760 (some details hidden, use --verbose to show complete help)
761
761
762 $ hg help shellalias
762 $ hg help shellalias
763 hg shellalias
763 hg shellalias
764
764
765 shell alias for: echo hi
765 shell alias for: echo hi
766
766
767 (no help text available)
767 (no help text available)
768
768
769 defined by: helpext
769 defined by: helpext
770
770
771 (some details hidden, use --verbose to show complete help)
771 (some details hidden, use --verbose to show complete help)
772
772
773 Test command with no help text
773 Test command with no help text
774
774
775 $ hg help nohelp
775 $ hg help nohelp
776 hg nohelp
776 hg nohelp
777
777
778 (no help text available)
778 (no help text available)
779
779
780 options:
780 options:
781
781
782 --longdesc VALUE
782 --longdesc VALUE
783 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
783 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
784 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
784 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
785 -n -- normal desc
785 -n -- normal desc
786 --newline VALUE line1 line2
786 --newline VALUE line1 line2
787 --callableopt VALUE adds foo
787 --callableopt VALUE adds foo
788 --customopt VALUE adds bar
788 --customopt VALUE adds bar
789 --customopt-withdefault VALUE adds bar (default: foo)
789 --customopt-withdefault VALUE adds bar (default: foo)
790
790
791 (some details hidden, use --verbose to show complete help)
791 (some details hidden, use --verbose to show complete help)
792
792
793 $ hg help -k nohelp
793 $ hg help -k nohelp
794 Commands:
794 Commands:
795
795
796 nohelp hg nohelp
796 nohelp hg nohelp
797
797
798 Extension Commands:
798 Extension Commands:
799
799
800 nohelp (no help text available)
800 nohelp (no help text available)
801
801
802 Test that default list of commands omits extension commands
802 Test that default list of commands omits extension commands
803
803
804 #if no-extraextensions
804 #if no-extraextensions
805
805
806 $ hg help
806 $ hg help
807 Mercurial Distributed SCM
807 Mercurial Distributed SCM
808
808
809 list of commands:
809 list of commands:
810
810
811 add add the specified files on the next commit
811 add add the specified files on the next commit
812 addremove add all new files, delete all missing files
812 addremove add all new files, delete all missing files
813 annotate show changeset information by line for each file
813 annotate show changeset information by line for each file
814 archive create an unversioned archive of a repository revision
814 archive create an unversioned archive of a repository revision
815 backout reverse effect of earlier changeset
815 backout reverse effect of earlier changeset
816 bisect subdivision search of changesets
816 bisect subdivision search of changesets
817 bookmarks create a new bookmark or list existing bookmarks
817 bookmarks create a new bookmark or list existing bookmarks
818 branch set or show the current branch name
818 branch set or show the current branch name
819 branches list repository named branches
819 branches list repository named branches
820 bundle create a bundle file
820 bundle create a bundle file
821 cat output the current or given revision of files
821 cat output the current or given revision of files
822 clone make a copy of an existing repository
822 clone make a copy of an existing repository
823 commit commit the specified files or all outstanding changes
823 commit commit the specified files or all outstanding changes
824 config show combined config settings from all hgrc files
824 config show combined config settings from all hgrc files
825 copy mark files as copied for the next commit
825 copy mark files as copied for the next commit
826 diff diff repository (or selected files)
826 diff diff repository (or selected files)
827 export dump the header and diffs for one or more changesets
827 export dump the header and diffs for one or more changesets
828 files list tracked files
828 files list tracked files
829 forget forget the specified files on the next commit
829 forget forget the specified files on the next commit
830 graft copy changes from other branches onto the current branch
830 graft copy changes from other branches onto the current branch
831 grep search revision history for a pattern in specified files
831 grep search revision history for a pattern in specified files
832 heads show branch heads
832 heads show branch heads
833 help show help for a given topic or a help overview
833 help show help for a given topic or a help overview
834 identify identify the working directory or specified revision
834 identify identify the working directory or specified revision
835 import import an ordered set of patches
835 import import an ordered set of patches
836 incoming show new changesets found in source
836 incoming show new changesets found in source
837 init create a new repository in the given directory
837 init create a new repository in the given directory
838 log show revision history of entire repository or files
838 log show revision history of entire repository or files
839 manifest output the current or given revision of the project manifest
839 manifest output the current or given revision of the project manifest
840 merge merge another revision into working directory
840 merge merge another revision into working directory
841 outgoing show changesets not found in the destination
841 outgoing show changesets not found in the destination
842 paths show aliases for remote repositories
842 paths show aliases for remote repositories
843 phase set or show the current phase name
843 phase set or show the current phase name
844 pull pull changes from the specified source
844 pull pull changes from the specified source
845 push push changes to the specified destination
845 push push changes to the specified destination
846 recover roll back an interrupted transaction
846 recover roll back an interrupted transaction
847 remove remove the specified files on the next commit
847 remove remove the specified files on the next commit
848 rename rename files; equivalent of copy + remove
848 rename rename files; equivalent of copy + remove
849 resolve redo merges or set/view the merge status of files
849 resolve redo merges or set/view the merge status of files
850 revert restore files to their checkout state
850 revert restore files to their checkout state
851 root print the root (top) of the current working directory
851 root print the root (top) of the current working directory
852 serve start stand-alone webserver
852 serve start stand-alone webserver
853 status show changed files in the working directory
853 status show changed files in the working directory
854 summary summarize working directory state
854 summary summarize working directory state
855 tag add one or more tags for the current or given revision
855 tag add one or more tags for the current or given revision
856 tags list repository tags
856 tags list repository tags
857 unbundle apply one or more bundle files
857 unbundle apply one or more bundle files
858 update update working directory (or switch revisions)
858 update update working directory (or switch revisions)
859 verify verify the integrity of the repository
859 verify verify the integrity of the repository
860 version output version and copyright information
860 version output version and copyright information
861
861
862 enabled extensions:
862 enabled extensions:
863
863
864 helpext (no help text available)
864 helpext (no help text available)
865
865
866 additional help topics:
866 additional help topics:
867
867
868 bundlespec Bundle File Formats
868 bundlespec Bundle File Formats
869 color Colorizing Outputs
869 color Colorizing Outputs
870 config Configuration Files
870 config Configuration Files
871 dates Date Formats
871 dates Date Formats
872 deprecated Deprecated Features
872 deprecated Deprecated Features
873 diffs Diff Formats
873 diffs Diff Formats
874 environment Environment Variables
874 environment Environment Variables
875 extensions Using Additional Features
875 extensions Using Additional Features
876 filesets Specifying File Sets
876 filesets Specifying File Sets
877 flags Command-line flags
877 flags Command-line flags
878 glossary Glossary
878 glossary Glossary
879 hgignore Syntax for Mercurial Ignore Files
879 hgignore Syntax for Mercurial Ignore Files
880 hgweb Configuring hgweb
880 hgweb Configuring hgweb
881 internals Technical implementation topics
881 internals Technical implementation topics
882 merge-tools Merge Tools
882 merge-tools Merge Tools
883 pager Pager Support
883 pager Pager Support
884 patterns File Name Patterns
884 patterns File Name Patterns
885 phases Working with Phases
885 phases Working with Phases
886 revisions Specifying Revisions
886 revisions Specifying Revisions
887 scripting Using Mercurial from scripts and automation
887 scripting Using Mercurial from scripts and automation
888 subrepos Subrepositories
888 subrepos Subrepositories
889 templating Template Usage
889 templating Template Usage
890 urls URL Paths
890 urls URL Paths
891
891
892 (use 'hg help -v' to show built-in aliases and global options)
892 (use 'hg help -v' to show built-in aliases and global options)
893
893
894 #endif
894 #endif
895
895
896 Test list of internal help commands
896 Test list of internal help commands
897
897
898 $ hg help debug
898 $ hg help debug
899 debug commands (internal and unsupported):
899 debug commands (internal and unsupported):
900
900
901 debugancestor
901 debugancestor
902 find the ancestor revision of two revisions in a given index
902 find the ancestor revision of two revisions in a given index
903 debugapplystreamclonebundle
903 debugapplystreamclonebundle
904 apply a stream clone bundle file
904 apply a stream clone bundle file
905 debugbuilddag
905 debugbuilddag
906 builds a repo with a given DAG from scratch in the current
906 builds a repo with a given DAG from scratch in the current
907 empty repo
907 empty repo
908 debugbundle lists the contents of a bundle
908 debugbundle lists the contents of a bundle
909 debugcapabilities
909 debugcapabilities
910 lists the capabilities of a remote peer
910 lists the capabilities of a remote peer
911 debugcheckstate
911 debugcheckstate
912 validate the correctness of the current dirstate
912 validate the correctness of the current dirstate
913 debugcolor show available color, effects or style
913 debugcolor show available color, effects or style
914 debugcommands
914 debugcommands
915 list all available commands and options
915 list all available commands and options
916 debugcomplete
916 debugcomplete
917 returns the completion list associated with the given command
917 returns the completion list associated with the given command
918 debugcreatestreamclonebundle
918 debugcreatestreamclonebundle
919 create a stream clone bundle file
919 create a stream clone bundle file
920 debugdag format the changelog or an index DAG as a concise textual
920 debugdag format the changelog or an index DAG as a concise textual
921 description
921 description
922 debugdata dump the contents of a data file revision
922 debugdata dump the contents of a data file revision
923 debugdate parse and display a date
923 debugdate parse and display a date
924 debugdeltachain
924 debugdeltachain
925 dump information about delta chains in a revlog
925 dump information about delta chains in a revlog
926 debugdirstate
926 debugdirstate
927 show the contents of the current dirstate
927 show the contents of the current dirstate
928 debugdiscovery
928 debugdiscovery
929 runs the changeset discovery protocol in isolation
929 runs the changeset discovery protocol in isolation
930 debugdownload
930 debugdownload
931 download a resource using Mercurial logic and config
931 download a resource using Mercurial logic and config
932 debugextensions
932 debugextensions
933 show information about active extensions
933 show information about active extensions
934 debugfileset parse and apply a fileset specification
934 debugfileset parse and apply a fileset specification
935 debugformat display format information about the current repository
935 debugformat display format information about the current repository
936 debugfsinfo show information detected about current filesystem
936 debugfsinfo show information detected about current filesystem
937 debuggetbundle
937 debuggetbundle
938 retrieves a bundle from a repo
938 retrieves a bundle from a repo
939 debugignore display the combined ignore pattern and information about
939 debugignore display the combined ignore pattern and information about
940 ignored files
940 ignored files
941 debugindex dump index data for a storage primitive
941 debugindex dump index data for a storage primitive
942 debugindexdot
942 debugindexdot
943 dump an index DAG as a graphviz dot file
943 dump an index DAG as a graphviz dot file
944 debuginstall test Mercurial installation
944 debuginstall test Mercurial installation
945 debugknown test whether node ids are known to a repo
945 debugknown test whether node ids are known to a repo
946 debuglocks show or modify state of locks
946 debuglocks show or modify state of locks
947 debugmanifestfulltextcache
947 debugmanifestfulltextcache
948 show, clear or amend the contents of the manifest fulltext
948 show, clear or amend the contents of the manifest fulltext
949 cache
949 cache
950 debugmergestate
950 debugmergestate
951 print merge state
951 print merge state
952 debugnamecomplete
952 debugnamecomplete
953 complete "names" - tags, open branch names, bookmark names
953 complete "names" - tags, open branch names, bookmark names
954 debugobsolete
954 debugobsolete
955 create arbitrary obsolete marker
955 create arbitrary obsolete marker
956 debugoptADV (no help text available)
956 debugoptADV (no help text available)
957 debugoptDEP (no help text available)
957 debugoptDEP (no help text available)
958 debugoptEXP (no help text available)
958 debugoptEXP (no help text available)
959 debugpathcomplete
959 debugpathcomplete
960 complete part or all of a tracked path
960 complete part or all of a tracked path
961 debugpeer establish a connection to a peer repository
961 debugpeer establish a connection to a peer repository
962 debugpickmergetool
962 debugpickmergetool
963 examine which merge tool is chosen for specified file
963 examine which merge tool is chosen for specified file
964 debugpushkey access the pushkey key/value protocol
964 debugpushkey access the pushkey key/value protocol
965 debugpvec (no help text available)
965 debugpvec (no help text available)
966 debugrebuilddirstate
966 debugrebuilddirstate
967 rebuild the dirstate as it would look like for the given
967 rebuild the dirstate as it would look like for the given
968 revision
968 revision
969 debugrebuildfncache
969 debugrebuildfncache
970 rebuild the fncache file
970 rebuild the fncache file
971 debugrename dump rename information
971 debugrename dump rename information
972 debugrevlog show data and statistics about a revlog
972 debugrevlog show data and statistics about a revlog
973 debugrevlogindex
973 debugrevlogindex
974 dump the contents of a revlog index
974 dump the contents of a revlog index
975 debugrevspec parse and apply a revision specification
975 debugrevspec parse and apply a revision specification
976 debugserve run a server with advanced settings
976 debugserve run a server with advanced settings
977 debugsetparents
977 debugsetparents
978 manually set the parents of the current working directory
978 manually set the parents of the current working directory
979 debugssl test a secure connection to a server
979 debugssl test a secure connection to a server
980 debugsub (no help text available)
980 debugsub (no help text available)
981 debugsuccessorssets
981 debugsuccessorssets
982 show set of successors for revision
982 show set of successors for revision
983 debugtemplate
983 debugtemplate
984 parse and apply a template
984 parse and apply a template
985 debuguigetpass
985 debuguigetpass
986 show prompt to type password
986 show prompt to type password
987 debuguiprompt
987 debuguiprompt
988 show plain prompt
988 show plain prompt
989 debugupdatecaches
989 debugupdatecaches
990 warm all known caches in the repository
990 warm all known caches in the repository
991 debugupgraderepo
991 debugupgraderepo
992 upgrade a repository to use different features
992 upgrade a repository to use different features
993 debugwalk show how files match on given patterns
993 debugwalk show how files match on given patterns
994 debugwhyunstable
994 debugwhyunstable
995 explain instabilities of a changeset
995 explain instabilities of a changeset
996 debugwireargs
996 debugwireargs
997 (no help text available)
997 (no help text available)
998 debugwireproto
998 debugwireproto
999 send wire protocol commands to a server
999 send wire protocol commands to a server
1000
1000
1001 (use 'hg help -v debug' to show built-in aliases and global options)
1001 (use 'hg help -v debug' to show built-in aliases and global options)
1002
1002
1003 internals topic renders index of available sub-topics
1003 internals topic renders index of available sub-topics
1004
1004
1005 $ hg help internals
1005 $ hg help internals
1006 Technical implementation topics
1006 Technical implementation topics
1007 """""""""""""""""""""""""""""""
1007 """""""""""""""""""""""""""""""
1008
1008
1009 To access a subtopic, use "hg help internals.{subtopic-name}"
1009 To access a subtopic, use "hg help internals.{subtopic-name}"
1010
1010
1011 bundle2 Bundle2
1011 bundle2 Bundle2
1012 bundles Bundles
1012 bundles Bundles
1013 cbor CBOR
1013 cbor CBOR
1014 censor Censor
1014 censor Censor
1015 changegroups Changegroups
1015 changegroups Changegroups
1016 config Config Registrar
1016 config Config Registrar
1017 requirements Repository Requirements
1017 requirements Repository Requirements
1018 revlogs Revision Logs
1018 revlogs Revision Logs
1019 wireprotocol Wire Protocol
1019 wireprotocol Wire Protocol
1020 wireprotocolv2
1021 Wire Protocol Version 2
1020
1022
1021 sub-topics can be accessed
1023 sub-topics can be accessed
1022
1024
1023 $ hg help internals.changegroups
1025 $ hg help internals.changegroups
1024 Changegroups
1026 Changegroups
1025 """"""""""""
1027 """"""""""""
1026
1028
1027 Changegroups are representations of repository revlog data, specifically
1029 Changegroups are representations of repository revlog data, specifically
1028 the changelog data, root/flat manifest data, treemanifest data, and
1030 the changelog data, root/flat manifest data, treemanifest data, and
1029 filelogs.
1031 filelogs.
1030
1032
1031 There are 3 versions of changegroups: "1", "2", and "3". From a high-
1033 There are 3 versions of changegroups: "1", "2", and "3". From a high-
1032 level, versions "1" and "2" are almost exactly the same, with the only
1034 level, versions "1" and "2" are almost exactly the same, with the only
1033 difference being an additional item in the *delta header*. Version "3"
1035 difference being an additional item in the *delta header*. Version "3"
1034 adds support for revlog flags in the *delta header* and optionally
1036 adds support for revlog flags in the *delta header* and optionally
1035 exchanging treemanifests (enabled by setting an option on the
1037 exchanging treemanifests (enabled by setting an option on the
1036 "changegroup" part in the bundle2).
1038 "changegroup" part in the bundle2).
1037
1039
1038 Changegroups when not exchanging treemanifests consist of 3 logical
1040 Changegroups when not exchanging treemanifests consist of 3 logical
1039 segments:
1041 segments:
1040
1042
1041 +---------------------------------+
1043 +---------------------------------+
1042 | | | |
1044 | | | |
1043 | changeset | manifest | filelogs |
1045 | changeset | manifest | filelogs |
1044 | | | |
1046 | | | |
1045 | | | |
1047 | | | |
1046 +---------------------------------+
1048 +---------------------------------+
1047
1049
1048 When exchanging treemanifests, there are 4 logical segments:
1050 When exchanging treemanifests, there are 4 logical segments:
1049
1051
1050 +-------------------------------------------------+
1052 +-------------------------------------------------+
1051 | | | | |
1053 | | | | |
1052 | changeset | root | treemanifests | filelogs |
1054 | changeset | root | treemanifests | filelogs |
1053 | | manifest | | |
1055 | | manifest | | |
1054 | | | | |
1056 | | | | |
1055 +-------------------------------------------------+
1057 +-------------------------------------------------+
1056
1058
1057 The principle building block of each segment is a *chunk*. A *chunk* is a
1059 The principle building block of each segment is a *chunk*. A *chunk* is a
1058 framed piece of data:
1060 framed piece of data:
1059
1061
1060 +---------------------------------------+
1062 +---------------------------------------+
1061 | | |
1063 | | |
1062 | length | data |
1064 | length | data |
1063 | (4 bytes) | (<length - 4> bytes) |
1065 | (4 bytes) | (<length - 4> bytes) |
1064 | | |
1066 | | |
1065 +---------------------------------------+
1067 +---------------------------------------+
1066
1068
1067 All integers are big-endian signed integers. Each chunk starts with a
1069 All integers are big-endian signed integers. Each chunk starts with a
1068 32-bit integer indicating the length of the entire chunk (including the
1070 32-bit integer indicating the length of the entire chunk (including the
1069 length field itself).
1071 length field itself).
1070
1072
1071 There is a special case chunk that has a value of 0 for the length
1073 There is a special case chunk that has a value of 0 for the length
1072 ("0x00000000"). We call this an *empty chunk*.
1074 ("0x00000000"). We call this an *empty chunk*.
1073
1075
1074 Delta Groups
1076 Delta Groups
1075 ============
1077 ============
1076
1078
1077 A *delta group* expresses the content of a revlog as a series of deltas,
1079 A *delta group* expresses the content of a revlog as a series of deltas,
1078 or patches against previous revisions.
1080 or patches against previous revisions.
1079
1081
1080 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1082 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1081 to signal the end of the delta group:
1083 to signal the end of the delta group:
1082
1084
1083 +------------------------------------------------------------------------+
1085 +------------------------------------------------------------------------+
1084 | | | | | |
1086 | | | | | |
1085 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1087 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1086 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1088 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1087 | | | | | |
1089 | | | | | |
1088 +------------------------------------------------------------------------+
1090 +------------------------------------------------------------------------+
1089
1091
1090 Each *chunk*'s data consists of the following:
1092 Each *chunk*'s data consists of the following:
1091
1093
1092 +---------------------------------------+
1094 +---------------------------------------+
1093 | | |
1095 | | |
1094 | delta header | delta data |
1096 | delta header | delta data |
1095 | (various by version) | (various) |
1097 | (various by version) | (various) |
1096 | | |
1098 | | |
1097 +---------------------------------------+
1099 +---------------------------------------+
1098
1100
1099 The *delta data* is a series of *delta*s that describe a diff from an
1101 The *delta data* is a series of *delta*s that describe a diff from an
1100 existing entry (either that the recipient already has, or previously
1102 existing entry (either that the recipient already has, or previously
1101 specified in the bundle/changegroup).
1103 specified in the bundle/changegroup).
1102
1104
1103 The *delta header* is different between versions "1", "2", and "3" of the
1105 The *delta header* is different between versions "1", "2", and "3" of the
1104 changegroup format.
1106 changegroup format.
1105
1107
1106 Version 1 (headerlen=80):
1108 Version 1 (headerlen=80):
1107
1109
1108 +------------------------------------------------------+
1110 +------------------------------------------------------+
1109 | | | | |
1111 | | | | |
1110 | node | p1 node | p2 node | link node |
1112 | node | p1 node | p2 node | link node |
1111 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1113 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1112 | | | | |
1114 | | | | |
1113 +------------------------------------------------------+
1115 +------------------------------------------------------+
1114
1116
1115 Version 2 (headerlen=100):
1117 Version 2 (headerlen=100):
1116
1118
1117 +------------------------------------------------------------------+
1119 +------------------------------------------------------------------+
1118 | | | | | |
1120 | | | | | |
1119 | node | p1 node | p2 node | base node | link node |
1121 | node | p1 node | p2 node | base node | link node |
1120 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1122 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1121 | | | | | |
1123 | | | | | |
1122 +------------------------------------------------------------------+
1124 +------------------------------------------------------------------+
1123
1125
1124 Version 3 (headerlen=102):
1126 Version 3 (headerlen=102):
1125
1127
1126 +------------------------------------------------------------------------------+
1128 +------------------------------------------------------------------------------+
1127 | | | | | | |
1129 | | | | | | |
1128 | node | p1 node | p2 node | base node | link node | flags |
1130 | node | p1 node | p2 node | base node | link node | flags |
1129 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1131 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1130 | | | | | | |
1132 | | | | | | |
1131 +------------------------------------------------------------------------------+
1133 +------------------------------------------------------------------------------+
1132
1134
1133 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1135 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1134 contain a series of *delta*s, densely packed (no separators). These deltas
1136 contain a series of *delta*s, densely packed (no separators). These deltas
1135 describe a diff from an existing entry (either that the recipient already
1137 describe a diff from an existing entry (either that the recipient already
1136 has, or previously specified in the bundle/changegroup). The format is
1138 has, or previously specified in the bundle/changegroup). The format is
1137 described more fully in "hg help internals.bdiff", but briefly:
1139 described more fully in "hg help internals.bdiff", but briefly:
1138
1140
1139 +---------------------------------------------------------------+
1141 +---------------------------------------------------------------+
1140 | | | | |
1142 | | | | |
1141 | start offset | end offset | new length | content |
1143 | start offset | end offset | new length | content |
1142 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1144 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1143 | | | | |
1145 | | | | |
1144 +---------------------------------------------------------------+
1146 +---------------------------------------------------------------+
1145
1147
1146 Please note that the length field in the delta data does *not* include
1148 Please note that the length field in the delta data does *not* include
1147 itself.
1149 itself.
1148
1150
1149 In version 1, the delta is always applied against the previous node from
1151 In version 1, the delta is always applied against the previous node from
1150 the changegroup or the first parent if this is the first entry in the
1152 the changegroup or the first parent if this is the first entry in the
1151 changegroup.
1153 changegroup.
1152
1154
1153 In version 2 and up, the delta base node is encoded in the entry in the
1155 In version 2 and up, the delta base node is encoded in the entry in the
1154 changegroup. This allows the delta to be expressed against any parent,
1156 changegroup. This allows the delta to be expressed against any parent,
1155 which can result in smaller deltas and more efficient encoding of data.
1157 which can result in smaller deltas and more efficient encoding of data.
1156
1158
1157 Changeset Segment
1159 Changeset Segment
1158 =================
1160 =================
1159
1161
1160 The *changeset segment* consists of a single *delta group* holding
1162 The *changeset segment* consists of a single *delta group* holding
1161 changelog data. The *empty chunk* at the end of the *delta group* denotes
1163 changelog data. The *empty chunk* at the end of the *delta group* denotes
1162 the boundary to the *manifest segment*.
1164 the boundary to the *manifest segment*.
1163
1165
1164 Manifest Segment
1166 Manifest Segment
1165 ================
1167 ================
1166
1168
1167 The *manifest segment* consists of a single *delta group* holding manifest
1169 The *manifest segment* consists of a single *delta group* holding manifest
1168 data. If treemanifests are in use, it contains only the manifest for the
1170 data. If treemanifests are in use, it contains only the manifest for the
1169 root directory of the repository. Otherwise, it contains the entire
1171 root directory of the repository. Otherwise, it contains the entire
1170 manifest data. The *empty chunk* at the end of the *delta group* denotes
1172 manifest data. The *empty chunk* at the end of the *delta group* denotes
1171 the boundary to the next segment (either the *treemanifests segment* or
1173 the boundary to the next segment (either the *treemanifests segment* or
1172 the *filelogs segment*, depending on version and the request options).
1174 the *filelogs segment*, depending on version and the request options).
1173
1175
1174 Treemanifests Segment
1176 Treemanifests Segment
1175 ---------------------
1177 ---------------------
1176
1178
1177 The *treemanifests segment* only exists in changegroup version "3", and
1179 The *treemanifests segment* only exists in changegroup version "3", and
1178 only if the 'treemanifest' param is part of the bundle2 changegroup part
1180 only if the 'treemanifest' param is part of the bundle2 changegroup part
1179 (it is not possible to use changegroup version 3 outside of bundle2).
1181 (it is not possible to use changegroup version 3 outside of bundle2).
1180 Aside from the filenames in the *treemanifests segment* containing a
1182 Aside from the filenames in the *treemanifests segment* containing a
1181 trailing "/" character, it behaves identically to the *filelogs segment*
1183 trailing "/" character, it behaves identically to the *filelogs segment*
1182 (see below). The final sub-segment is followed by an *empty chunk*
1184 (see below). The final sub-segment is followed by an *empty chunk*
1183 (logically, a sub-segment with filename size 0). This denotes the boundary
1185 (logically, a sub-segment with filename size 0). This denotes the boundary
1184 to the *filelogs segment*.
1186 to the *filelogs segment*.
1185
1187
1186 Filelogs Segment
1188 Filelogs Segment
1187 ================
1189 ================
1188
1190
1189 The *filelogs segment* consists of multiple sub-segments, each
1191 The *filelogs segment* consists of multiple sub-segments, each
1190 corresponding to an individual file whose data is being described:
1192 corresponding to an individual file whose data is being described:
1191
1193
1192 +--------------------------------------------------+
1194 +--------------------------------------------------+
1193 | | | | | |
1195 | | | | | |
1194 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1196 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1195 | | | | | (4 bytes) |
1197 | | | | | (4 bytes) |
1196 | | | | | |
1198 | | | | | |
1197 +--------------------------------------------------+
1199 +--------------------------------------------------+
1198
1200
1199 The final filelog sub-segment is followed by an *empty chunk* (logically,
1201 The final filelog sub-segment is followed by an *empty chunk* (logically,
1200 a sub-segment with filename size 0). This denotes the end of the segment
1202 a sub-segment with filename size 0). This denotes the end of the segment
1201 and of the overall changegroup.
1203 and of the overall changegroup.
1202
1204
1203 Each filelog sub-segment consists of the following:
1205 Each filelog sub-segment consists of the following:
1204
1206
1205 +------------------------------------------------------+
1207 +------------------------------------------------------+
1206 | | | |
1208 | | | |
1207 | filename length | filename | delta group |
1209 | filename length | filename | delta group |
1208 | (4 bytes) | (<length - 4> bytes) | (various) |
1210 | (4 bytes) | (<length - 4> bytes) | (various) |
1209 | | | |
1211 | | | |
1210 +------------------------------------------------------+
1212 +------------------------------------------------------+
1211
1213
1212 That is, a *chunk* consisting of the filename (not terminated or padded)
1214 That is, a *chunk* consisting of the filename (not terminated or padded)
1213 followed by N chunks constituting the *delta group* for this file. The
1215 followed by N chunks constituting the *delta group* for this file. The
1214 *empty chunk* at the end of each *delta group* denotes the boundary to the
1216 *empty chunk* at the end of each *delta group* denotes the boundary to the
1215 next filelog sub-segment.
1217 next filelog sub-segment.
1216
1218
1217 Test list of commands with command with no help text
1219 Test list of commands with command with no help text
1218
1220
1219 $ hg help helpext
1221 $ hg help helpext
1220 helpext extension - no help text available
1222 helpext extension - no help text available
1221
1223
1222 list of commands:
1224 list of commands:
1223
1225
1224 nohelp (no help text available)
1226 nohelp (no help text available)
1225
1227
1226 (use 'hg help -v helpext' to show built-in aliases and global options)
1228 (use 'hg help -v helpext' to show built-in aliases and global options)
1227
1229
1228
1230
1229 test advanced, deprecated and experimental options are hidden in command help
1231 test advanced, deprecated and experimental options are hidden in command help
1230 $ hg help debugoptADV
1232 $ hg help debugoptADV
1231 hg debugoptADV
1233 hg debugoptADV
1232
1234
1233 (no help text available)
1235 (no help text available)
1234
1236
1235 options:
1237 options:
1236
1238
1237 (some details hidden, use --verbose to show complete help)
1239 (some details hidden, use --verbose to show complete help)
1238 $ hg help debugoptDEP
1240 $ hg help debugoptDEP
1239 hg debugoptDEP
1241 hg debugoptDEP
1240
1242
1241 (no help text available)
1243 (no help text available)
1242
1244
1243 options:
1245 options:
1244
1246
1245 (some details hidden, use --verbose to show complete help)
1247 (some details hidden, use --verbose to show complete help)
1246
1248
1247 $ hg help debugoptEXP
1249 $ hg help debugoptEXP
1248 hg debugoptEXP
1250 hg debugoptEXP
1249
1251
1250 (no help text available)
1252 (no help text available)
1251
1253
1252 options:
1254 options:
1253
1255
1254 (some details hidden, use --verbose to show complete help)
1256 (some details hidden, use --verbose to show complete help)
1255
1257
1256 test advanced, deprecated and experimental options are shown with -v
1258 test advanced, deprecated and experimental options are shown with -v
1257 $ hg help -v debugoptADV | grep aopt
1259 $ hg help -v debugoptADV | grep aopt
1258 --aopt option is (ADVANCED)
1260 --aopt option is (ADVANCED)
1259 $ hg help -v debugoptDEP | grep dopt
1261 $ hg help -v debugoptDEP | grep dopt
1260 --dopt option is (DEPRECATED)
1262 --dopt option is (DEPRECATED)
1261 $ hg help -v debugoptEXP | grep eopt
1263 $ hg help -v debugoptEXP | grep eopt
1262 --eopt option is (EXPERIMENTAL)
1264 --eopt option is (EXPERIMENTAL)
1263
1265
1264 #if gettext
1266 #if gettext
1265 test deprecated option is hidden with translation with untranslated description
1267 test deprecated option is hidden with translation with untranslated description
1266 (use many globy for not failing on changed transaction)
1268 (use many globy for not failing on changed transaction)
1267 $ LANGUAGE=sv hg help debugoptDEP
1269 $ LANGUAGE=sv hg help debugoptDEP
1268 hg debugoptDEP
1270 hg debugoptDEP
1269
1271
1270 (*) (glob)
1272 (*) (glob)
1271
1273
1272 options:
1274 options:
1273
1275
1274 (some details hidden, use --verbose to show complete help)
1276 (some details hidden, use --verbose to show complete help)
1275 #endif
1277 #endif
1276
1278
1277 Test commands that collide with topics (issue4240)
1279 Test commands that collide with topics (issue4240)
1278
1280
1279 $ hg config -hq
1281 $ hg config -hq
1280 hg config [-u] [NAME]...
1282 hg config [-u] [NAME]...
1281
1283
1282 show combined config settings from all hgrc files
1284 show combined config settings from all hgrc files
1283 $ hg showconfig -hq
1285 $ hg showconfig -hq
1284 hg config [-u] [NAME]...
1286 hg config [-u] [NAME]...
1285
1287
1286 show combined config settings from all hgrc files
1288 show combined config settings from all hgrc files
1287
1289
1288 Test a help topic
1290 Test a help topic
1289
1291
1290 $ hg help dates
1292 $ hg help dates
1291 Date Formats
1293 Date Formats
1292 """"""""""""
1294 """"""""""""
1293
1295
1294 Some commands allow the user to specify a date, e.g.:
1296 Some commands allow the user to specify a date, e.g.:
1295
1297
1296 - backout, commit, import, tag: Specify the commit date.
1298 - backout, commit, import, tag: Specify the commit date.
1297 - log, revert, update: Select revision(s) by date.
1299 - log, revert, update: Select revision(s) by date.
1298
1300
1299 Many date formats are valid. Here are some examples:
1301 Many date formats are valid. Here are some examples:
1300
1302
1301 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1303 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1302 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1304 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1303 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1305 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1304 - "Dec 6" (midnight)
1306 - "Dec 6" (midnight)
1305 - "13:18" (today assumed)
1307 - "13:18" (today assumed)
1306 - "3:39" (3:39AM assumed)
1308 - "3:39" (3:39AM assumed)
1307 - "3:39pm" (15:39)
1309 - "3:39pm" (15:39)
1308 - "2006-12-06 13:18:29" (ISO 8601 format)
1310 - "2006-12-06 13:18:29" (ISO 8601 format)
1309 - "2006-12-6 13:18"
1311 - "2006-12-6 13:18"
1310 - "2006-12-6"
1312 - "2006-12-6"
1311 - "12-6"
1313 - "12-6"
1312 - "12/6"
1314 - "12/6"
1313 - "12/6/6" (Dec 6 2006)
1315 - "12/6/6" (Dec 6 2006)
1314 - "today" (midnight)
1316 - "today" (midnight)
1315 - "yesterday" (midnight)
1317 - "yesterday" (midnight)
1316 - "now" - right now
1318 - "now" - right now
1317
1319
1318 Lastly, there is Mercurial's internal format:
1320 Lastly, there is Mercurial's internal format:
1319
1321
1320 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1322 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1321
1323
1322 This is the internal representation format for dates. The first number is
1324 This is the internal representation format for dates. The first number is
1323 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1325 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1324 is the offset of the local timezone, in seconds west of UTC (negative if
1326 is the offset of the local timezone, in seconds west of UTC (negative if
1325 the timezone is east of UTC).
1327 the timezone is east of UTC).
1326
1328
1327 The log command also accepts date ranges:
1329 The log command also accepts date ranges:
1328
1330
1329 - "<DATE" - at or before a given date/time
1331 - "<DATE" - at or before a given date/time
1330 - ">DATE" - on or after a given date/time
1332 - ">DATE" - on or after a given date/time
1331 - "DATE to DATE" - a date range, inclusive
1333 - "DATE to DATE" - a date range, inclusive
1332 - "-DAYS" - within a given number of days of today
1334 - "-DAYS" - within a given number of days of today
1333
1335
1334 Test repeated config section name
1336 Test repeated config section name
1335
1337
1336 $ hg help config.host
1338 $ hg help config.host
1337 "http_proxy.host"
1339 "http_proxy.host"
1338 Host name and (optional) port of the proxy server, for example
1340 Host name and (optional) port of the proxy server, for example
1339 "myproxy:8000".
1341 "myproxy:8000".
1340
1342
1341 "smtp.host"
1343 "smtp.host"
1342 Host name of mail server, e.g. "mail.example.com".
1344 Host name of mail server, e.g. "mail.example.com".
1343
1345
1344
1346
1345 Test section name with dot
1347 Test section name with dot
1346
1348
1347 $ hg help config.ui.username
1349 $ hg help config.ui.username
1348 "ui.username"
1350 "ui.username"
1349 The committer of a changeset created when running "commit". Typically
1351 The committer of a changeset created when running "commit". Typically
1350 a person's name and email address, e.g. "Fred Widget
1352 a person's name and email address, e.g. "Fred Widget
1351 <fred@example.com>". Environment variables in the username are
1353 <fred@example.com>". Environment variables in the username are
1352 expanded.
1354 expanded.
1353
1355
1354 (default: "$EMAIL" or "username@hostname". If the username in hgrc is
1356 (default: "$EMAIL" or "username@hostname". If the username in hgrc is
1355 empty, e.g. if the system admin set "username =" in the system hgrc,
1357 empty, e.g. if the system admin set "username =" in the system hgrc,
1356 it has to be specified manually or in a different hgrc file)
1358 it has to be specified manually or in a different hgrc file)
1357
1359
1358
1360
1359 $ hg help config.annotate.git
1361 $ hg help config.annotate.git
1360 abort: help section not found: config.annotate.git
1362 abort: help section not found: config.annotate.git
1361 [255]
1363 [255]
1362
1364
1363 $ hg help config.update.check
1365 $ hg help config.update.check
1364 "commands.update.check"
1366 "commands.update.check"
1365 Determines what level of checking 'hg update' will perform before
1367 Determines what level of checking 'hg update' will perform before
1366 moving to a destination revision. Valid values are "abort", "none",
1368 moving to a destination revision. Valid values are "abort", "none",
1367 "linear", and "noconflict". "abort" always fails if the working
1369 "linear", and "noconflict". "abort" always fails if the working
1368 directory has uncommitted changes. "none" performs no checking, and
1370 directory has uncommitted changes. "none" performs no checking, and
1369 may result in a merge with uncommitted changes. "linear" allows any
1371 may result in a merge with uncommitted changes. "linear" allows any
1370 update as long as it follows a straight line in the revision history,
1372 update as long as it follows a straight line in the revision history,
1371 and may trigger a merge with uncommitted changes. "noconflict" will
1373 and may trigger a merge with uncommitted changes. "noconflict" will
1372 allow any update which would not trigger a merge with uncommitted
1374 allow any update which would not trigger a merge with uncommitted
1373 changes, if any are present. (default: "linear")
1375 changes, if any are present. (default: "linear")
1374
1376
1375
1377
1376 $ hg help config.commands.update.check
1378 $ hg help config.commands.update.check
1377 "commands.update.check"
1379 "commands.update.check"
1378 Determines what level of checking 'hg update' will perform before
1380 Determines what level of checking 'hg update' will perform before
1379 moving to a destination revision. Valid values are "abort", "none",
1381 moving to a destination revision. Valid values are "abort", "none",
1380 "linear", and "noconflict". "abort" always fails if the working
1382 "linear", and "noconflict". "abort" always fails if the working
1381 directory has uncommitted changes. "none" performs no checking, and
1383 directory has uncommitted changes. "none" performs no checking, and
1382 may result in a merge with uncommitted changes. "linear" allows any
1384 may result in a merge with uncommitted changes. "linear" allows any
1383 update as long as it follows a straight line in the revision history,
1385 update as long as it follows a straight line in the revision history,
1384 and may trigger a merge with uncommitted changes. "noconflict" will
1386 and may trigger a merge with uncommitted changes. "noconflict" will
1385 allow any update which would not trigger a merge with uncommitted
1387 allow any update which would not trigger a merge with uncommitted
1386 changes, if any are present. (default: "linear")
1388 changes, if any are present. (default: "linear")
1387
1389
1388
1390
1389 $ hg help config.ommands.update.check
1391 $ hg help config.ommands.update.check
1390 abort: help section not found: config.ommands.update.check
1392 abort: help section not found: config.ommands.update.check
1391 [255]
1393 [255]
1392
1394
1393 Unrelated trailing paragraphs shouldn't be included
1395 Unrelated trailing paragraphs shouldn't be included
1394
1396
1395 $ hg help config.extramsg | grep '^$'
1397 $ hg help config.extramsg | grep '^$'
1396
1398
1397
1399
1398 Test capitalized section name
1400 Test capitalized section name
1399
1401
1400 $ hg help scripting.HGPLAIN > /dev/null
1402 $ hg help scripting.HGPLAIN > /dev/null
1401
1403
1402 Help subsection:
1404 Help subsection:
1403
1405
1404 $ hg help config.charsets |grep "Email example:" > /dev/null
1406 $ hg help config.charsets |grep "Email example:" > /dev/null
1405 [1]
1407 [1]
1406
1408
1407 Show nested definitions
1409 Show nested definitions
1408 ("profiling.type"[break]"ls"[break]"stat"[break])
1410 ("profiling.type"[break]"ls"[break]"stat"[break])
1409
1411
1410 $ hg help config.type | egrep '^$'|wc -l
1412 $ hg help config.type | egrep '^$'|wc -l
1411 \s*3 (re)
1413 \s*3 (re)
1412
1414
1413 $ hg help config.profiling.type.ls
1415 $ hg help config.profiling.type.ls
1414 "profiling.type.ls"
1416 "profiling.type.ls"
1415 Use Python's built-in instrumenting profiler. This profiler works on
1417 Use Python's built-in instrumenting profiler. This profiler works on
1416 all platforms, but each line number it reports is the first line of
1418 all platforms, but each line number it reports is the first line of
1417 a function. This restriction makes it difficult to identify the
1419 a function. This restriction makes it difficult to identify the
1418 expensive parts of a non-trivial function.
1420 expensive parts of a non-trivial function.
1419
1421
1420
1422
1421 Separate sections from subsections
1423 Separate sections from subsections
1422
1424
1423 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1425 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1424 "format"
1426 "format"
1425 --------
1427 --------
1426
1428
1427 "usegeneraldelta"
1429 "usegeneraldelta"
1428
1430
1429 "dotencode"
1431 "dotencode"
1430
1432
1431 "usefncache"
1433 "usefncache"
1432
1434
1433 "usestore"
1435 "usestore"
1434
1436
1435 "profiling"
1437 "profiling"
1436 -----------
1438 -----------
1437
1439
1438 "format"
1440 "format"
1439
1441
1440 "progress"
1442 "progress"
1441 ----------
1443 ----------
1442
1444
1443 "format"
1445 "format"
1444
1446
1445
1447
1446 Last item in help config.*:
1448 Last item in help config.*:
1447
1449
1448 $ hg help config.`hg help config|grep '^ "'| \
1450 $ hg help config.`hg help config|grep '^ "'| \
1449 > tail -1|sed 's![ "]*!!g'`| \
1451 > tail -1|sed 's![ "]*!!g'`| \
1450 > grep 'hg help -c config' > /dev/null
1452 > grep 'hg help -c config' > /dev/null
1451 [1]
1453 [1]
1452
1454
1453 note to use help -c for general hg help config:
1455 note to use help -c for general hg help config:
1454
1456
1455 $ hg help config |grep 'hg help -c config' > /dev/null
1457 $ hg help config |grep 'hg help -c config' > /dev/null
1456
1458
1457 Test templating help
1459 Test templating help
1458
1460
1459 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1461 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1460 desc String. The text of the changeset description.
1462 desc String. The text of the changeset description.
1461 diffstat String. Statistics of changes with the following format:
1463 diffstat String. Statistics of changes with the following format:
1462 firstline Any text. Returns the first line of text.
1464 firstline Any text. Returns the first line of text.
1463 nonempty Any text. Returns '(none)' if the string is empty.
1465 nonempty Any text. Returns '(none)' if the string is empty.
1464
1466
1465 Test deprecated items
1467 Test deprecated items
1466
1468
1467 $ hg help -v templating | grep currentbookmark
1469 $ hg help -v templating | grep currentbookmark
1468 currentbookmark
1470 currentbookmark
1469 $ hg help templating | (grep currentbookmark || true)
1471 $ hg help templating | (grep currentbookmark || true)
1470
1472
1471 Test help hooks
1473 Test help hooks
1472
1474
1473 $ cat > helphook1.py <<EOF
1475 $ cat > helphook1.py <<EOF
1474 > from mercurial import help
1476 > from mercurial import help
1475 >
1477 >
1476 > def rewrite(ui, topic, doc):
1478 > def rewrite(ui, topic, doc):
1477 > return doc + '\nhelphook1\n'
1479 > return doc + '\nhelphook1\n'
1478 >
1480 >
1479 > def extsetup(ui):
1481 > def extsetup(ui):
1480 > help.addtopichook('revisions', rewrite)
1482 > help.addtopichook('revisions', rewrite)
1481 > EOF
1483 > EOF
1482 $ cat > helphook2.py <<EOF
1484 $ cat > helphook2.py <<EOF
1483 > from mercurial import help
1485 > from mercurial import help
1484 >
1486 >
1485 > def rewrite(ui, topic, doc):
1487 > def rewrite(ui, topic, doc):
1486 > return doc + '\nhelphook2\n'
1488 > return doc + '\nhelphook2\n'
1487 >
1489 >
1488 > def extsetup(ui):
1490 > def extsetup(ui):
1489 > help.addtopichook('revisions', rewrite)
1491 > help.addtopichook('revisions', rewrite)
1490 > EOF
1492 > EOF
1491 $ echo '[extensions]' >> $HGRCPATH
1493 $ echo '[extensions]' >> $HGRCPATH
1492 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1494 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1493 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1495 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1494 $ hg help revsets | grep helphook
1496 $ hg help revsets | grep helphook
1495 helphook1
1497 helphook1
1496 helphook2
1498 helphook2
1497
1499
1498 help -c should only show debug --debug
1500 help -c should only show debug --debug
1499
1501
1500 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1502 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1501 [1]
1503 [1]
1502
1504
1503 help -c should only show deprecated for -v
1505 help -c should only show deprecated for -v
1504
1506
1505 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1507 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1506 [1]
1508 [1]
1507
1509
1508 Test -s / --system
1510 Test -s / --system
1509
1511
1510 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1512 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1511 > wc -l | sed -e 's/ //g'
1513 > wc -l | sed -e 's/ //g'
1512 0
1514 0
1513 $ hg help config.files --system unix | grep 'USER' | \
1515 $ hg help config.files --system unix | grep 'USER' | \
1514 > wc -l | sed -e 's/ //g'
1516 > wc -l | sed -e 's/ //g'
1515 0
1517 0
1516
1518
1517 Test -e / -c / -k combinations
1519 Test -e / -c / -k combinations
1518
1520
1519 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1521 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1520 Commands:
1522 Commands:
1521 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1523 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1522 Extensions:
1524 Extensions:
1523 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1525 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1524 Topics:
1526 Topics:
1525 Commands:
1527 Commands:
1526 Extensions:
1528 Extensions:
1527 Extension Commands:
1529 Extension Commands:
1528 $ hg help -c schemes
1530 $ hg help -c schemes
1529 abort: no such help topic: schemes
1531 abort: no such help topic: schemes
1530 (try 'hg help --keyword schemes')
1532 (try 'hg help --keyword schemes')
1531 [255]
1533 [255]
1532 $ hg help -e schemes |head -1
1534 $ hg help -e schemes |head -1
1533 schemes extension - extend schemes with shortcuts to repository swarms
1535 schemes extension - extend schemes with shortcuts to repository swarms
1534 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1536 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1535 Commands:
1537 Commands:
1536 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1538 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1537 Extensions:
1539 Extensions:
1538 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1540 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1539 Extensions:
1541 Extensions:
1540 Commands:
1542 Commands:
1541 $ hg help -c commit > /dev/null
1543 $ hg help -c commit > /dev/null
1542 $ hg help -e -c commit > /dev/null
1544 $ hg help -e -c commit > /dev/null
1543 $ hg help -e commit
1545 $ hg help -e commit
1544 abort: no such help topic: commit
1546 abort: no such help topic: commit
1545 (try 'hg help --keyword commit')
1547 (try 'hg help --keyword commit')
1546 [255]
1548 [255]
1547
1549
1548 Test keyword search help
1550 Test keyword search help
1549
1551
1550 $ cat > prefixedname.py <<EOF
1552 $ cat > prefixedname.py <<EOF
1551 > '''matched against word "clone"
1553 > '''matched against word "clone"
1552 > '''
1554 > '''
1553 > EOF
1555 > EOF
1554 $ echo '[extensions]' >> $HGRCPATH
1556 $ echo '[extensions]' >> $HGRCPATH
1555 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1557 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1556 $ hg help -k clone
1558 $ hg help -k clone
1557 Topics:
1559 Topics:
1558
1560
1559 config Configuration Files
1561 config Configuration Files
1560 extensions Using Additional Features
1562 extensions Using Additional Features
1561 glossary Glossary
1563 glossary Glossary
1562 phases Working with Phases
1564 phases Working with Phases
1563 subrepos Subrepositories
1565 subrepos Subrepositories
1564 urls URL Paths
1566 urls URL Paths
1565
1567
1566 Commands:
1568 Commands:
1567
1569
1568 bookmarks create a new bookmark or list existing bookmarks
1570 bookmarks create a new bookmark or list existing bookmarks
1569 clone make a copy of an existing repository
1571 clone make a copy of an existing repository
1570 paths show aliases for remote repositories
1572 paths show aliases for remote repositories
1571 pull pull changes from the specified source
1573 pull pull changes from the specified source
1572 update update working directory (or switch revisions)
1574 update update working directory (or switch revisions)
1573
1575
1574 Extensions:
1576 Extensions:
1575
1577
1576 clonebundles advertise pre-generated bundles to seed clones
1578 clonebundles advertise pre-generated bundles to seed clones
1577 narrow create clones which fetch history data for subset of files
1579 narrow create clones which fetch history data for subset of files
1578 (EXPERIMENTAL)
1580 (EXPERIMENTAL)
1579 prefixedname matched against word "clone"
1581 prefixedname matched against word "clone"
1580 relink recreates hardlinks between repository clones
1582 relink recreates hardlinks between repository clones
1581
1583
1582 Extension Commands:
1584 Extension Commands:
1583
1585
1584 qclone clone main and patch repository at same time
1586 qclone clone main and patch repository at same time
1585
1587
1586 Test unfound topic
1588 Test unfound topic
1587
1589
1588 $ hg help nonexistingtopicthatwillneverexisteverever
1590 $ hg help nonexistingtopicthatwillneverexisteverever
1589 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1591 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1590 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1592 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1591 [255]
1593 [255]
1592
1594
1593 Test unfound keyword
1595 Test unfound keyword
1594
1596
1595 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1597 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1596 abort: no matches
1598 abort: no matches
1597 (try 'hg help' for a list of topics)
1599 (try 'hg help' for a list of topics)
1598 [255]
1600 [255]
1599
1601
1600 Test omit indicating for help
1602 Test omit indicating for help
1601
1603
1602 $ cat > addverboseitems.py <<EOF
1604 $ cat > addverboseitems.py <<EOF
1603 > '''extension to test omit indicating.
1605 > '''extension to test omit indicating.
1604 >
1606 >
1605 > This paragraph is never omitted (for extension)
1607 > This paragraph is never omitted (for extension)
1606 >
1608 >
1607 > .. container:: verbose
1609 > .. container:: verbose
1608 >
1610 >
1609 > This paragraph is omitted,
1611 > This paragraph is omitted,
1610 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1612 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1611 >
1613 >
1612 > This paragraph is never omitted, too (for extension)
1614 > This paragraph is never omitted, too (for extension)
1613 > '''
1615 > '''
1614 > from __future__ import absolute_import
1616 > from __future__ import absolute_import
1615 > from mercurial import commands, help
1617 > from mercurial import commands, help
1616 > testtopic = """This paragraph is never omitted (for topic).
1618 > testtopic = """This paragraph is never omitted (for topic).
1617 >
1619 >
1618 > .. container:: verbose
1620 > .. container:: verbose
1619 >
1621 >
1620 > This paragraph is omitted,
1622 > This paragraph is omitted,
1621 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1623 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1622 >
1624 >
1623 > This paragraph is never omitted, too (for topic)
1625 > This paragraph is never omitted, too (for topic)
1624 > """
1626 > """
1625 > def extsetup(ui):
1627 > def extsetup(ui):
1626 > help.helptable.append((["topic-containing-verbose"],
1628 > help.helptable.append((["topic-containing-verbose"],
1627 > "This is the topic to test omit indicating.",
1629 > "This is the topic to test omit indicating.",
1628 > lambda ui: testtopic))
1630 > lambda ui: testtopic))
1629 > EOF
1631 > EOF
1630 $ echo '[extensions]' >> $HGRCPATH
1632 $ echo '[extensions]' >> $HGRCPATH
1631 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1633 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1632 $ hg help addverboseitems
1634 $ hg help addverboseitems
1633 addverboseitems extension - extension to test omit indicating.
1635 addverboseitems extension - extension to test omit indicating.
1634
1636
1635 This paragraph is never omitted (for extension)
1637 This paragraph is never omitted (for extension)
1636
1638
1637 This paragraph is never omitted, too (for extension)
1639 This paragraph is never omitted, too (for extension)
1638
1640
1639 (some details hidden, use --verbose to show complete help)
1641 (some details hidden, use --verbose to show complete help)
1640
1642
1641 no commands defined
1643 no commands defined
1642 $ hg help -v addverboseitems
1644 $ hg help -v addverboseitems
1643 addverboseitems extension - extension to test omit indicating.
1645 addverboseitems extension - extension to test omit indicating.
1644
1646
1645 This paragraph is never omitted (for extension)
1647 This paragraph is never omitted (for extension)
1646
1648
1647 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1649 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1648 extension)
1650 extension)
1649
1651
1650 This paragraph is never omitted, too (for extension)
1652 This paragraph is never omitted, too (for extension)
1651
1653
1652 no commands defined
1654 no commands defined
1653 $ hg help topic-containing-verbose
1655 $ hg help topic-containing-verbose
1654 This is the topic to test omit indicating.
1656 This is the topic to test omit indicating.
1655 """"""""""""""""""""""""""""""""""""""""""
1657 """"""""""""""""""""""""""""""""""""""""""
1656
1658
1657 This paragraph is never omitted (for topic).
1659 This paragraph is never omitted (for topic).
1658
1660
1659 This paragraph is never omitted, too (for topic)
1661 This paragraph is never omitted, too (for topic)
1660
1662
1661 (some details hidden, use --verbose to show complete help)
1663 (some details hidden, use --verbose to show complete help)
1662 $ hg help -v topic-containing-verbose
1664 $ hg help -v topic-containing-verbose
1663 This is the topic to test omit indicating.
1665 This is the topic to test omit indicating.
1664 """"""""""""""""""""""""""""""""""""""""""
1666 """"""""""""""""""""""""""""""""""""""""""
1665
1667
1666 This paragraph is never omitted (for topic).
1668 This paragraph is never omitted (for topic).
1667
1669
1668 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1670 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1669 topic)
1671 topic)
1670
1672
1671 This paragraph is never omitted, too (for topic)
1673 This paragraph is never omitted, too (for topic)
1672
1674
1673 Test section lookup
1675 Test section lookup
1674
1676
1675 $ hg help revset.merge
1677 $ hg help revset.merge
1676 "merge()"
1678 "merge()"
1677 Changeset is a merge changeset.
1679 Changeset is a merge changeset.
1678
1680
1679 $ hg help glossary.dag
1681 $ hg help glossary.dag
1680 DAG
1682 DAG
1681 The repository of changesets of a distributed version control system
1683 The repository of changesets of a distributed version control system
1682 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1684 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1683 of nodes and edges, where nodes correspond to changesets and edges
1685 of nodes and edges, where nodes correspond to changesets and edges
1684 imply a parent -> child relation. This graph can be visualized by
1686 imply a parent -> child relation. This graph can be visualized by
1685 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1687 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1686 limited by the requirement for children to have at most two parents.
1688 limited by the requirement for children to have at most two parents.
1687
1689
1688
1690
1689 $ hg help hgrc.paths
1691 $ hg help hgrc.paths
1690 "paths"
1692 "paths"
1691 -------
1693 -------
1692
1694
1693 Assigns symbolic names and behavior to repositories.
1695 Assigns symbolic names and behavior to repositories.
1694
1696
1695 Options are symbolic names defining the URL or directory that is the
1697 Options are symbolic names defining the URL or directory that is the
1696 location of the repository. Example:
1698 location of the repository. Example:
1697
1699
1698 [paths]
1700 [paths]
1699 my_server = https://example.com/my_repo
1701 my_server = https://example.com/my_repo
1700 local_path = /home/me/repo
1702 local_path = /home/me/repo
1701
1703
1702 These symbolic names can be used from the command line. To pull from
1704 These symbolic names can be used from the command line. To pull from
1703 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1705 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1704 local_path'.
1706 local_path'.
1705
1707
1706 Options containing colons (":") denote sub-options that can influence
1708 Options containing colons (":") denote sub-options that can influence
1707 behavior for that specific path. Example:
1709 behavior for that specific path. Example:
1708
1710
1709 [paths]
1711 [paths]
1710 my_server = https://example.com/my_path
1712 my_server = https://example.com/my_path
1711 my_server:pushurl = ssh://example.com/my_path
1713 my_server:pushurl = ssh://example.com/my_path
1712
1714
1713 The following sub-options can be defined:
1715 The following sub-options can be defined:
1714
1716
1715 "pushurl"
1717 "pushurl"
1716 The URL to use for push operations. If not defined, the location
1718 The URL to use for push operations. If not defined, the location
1717 defined by the path's main entry is used.
1719 defined by the path's main entry is used.
1718
1720
1719 "pushrev"
1721 "pushrev"
1720 A revset defining which revisions to push by default.
1722 A revset defining which revisions to push by default.
1721
1723
1722 When 'hg push' is executed without a "-r" argument, the revset defined
1724 When 'hg push' is executed without a "-r" argument, the revset defined
1723 by this sub-option is evaluated to determine what to push.
1725 by this sub-option is evaluated to determine what to push.
1724
1726
1725 For example, a value of "." will push the working directory's revision
1727 For example, a value of "." will push the working directory's revision
1726 by default.
1728 by default.
1727
1729
1728 Revsets specifying bookmarks will not result in the bookmark being
1730 Revsets specifying bookmarks will not result in the bookmark being
1729 pushed.
1731 pushed.
1730
1732
1731 The following special named paths exist:
1733 The following special named paths exist:
1732
1734
1733 "default"
1735 "default"
1734 The URL or directory to use when no source or remote is specified.
1736 The URL or directory to use when no source or remote is specified.
1735
1737
1736 'hg clone' will automatically define this path to the location the
1738 'hg clone' will automatically define this path to the location the
1737 repository was cloned from.
1739 repository was cloned from.
1738
1740
1739 "default-push"
1741 "default-push"
1740 (deprecated) The URL or directory for the default 'hg push' location.
1742 (deprecated) The URL or directory for the default 'hg push' location.
1741 "default:pushurl" should be used instead.
1743 "default:pushurl" should be used instead.
1742
1744
1743 $ hg help glossary.mcguffin
1745 $ hg help glossary.mcguffin
1744 abort: help section not found: glossary.mcguffin
1746 abort: help section not found: glossary.mcguffin
1745 [255]
1747 [255]
1746
1748
1747 $ hg help glossary.mc.guffin
1749 $ hg help glossary.mc.guffin
1748 abort: help section not found: glossary.mc.guffin
1750 abort: help section not found: glossary.mc.guffin
1749 [255]
1751 [255]
1750
1752
1751 $ hg help template.files
1753 $ hg help template.files
1752 files List of strings. All files modified, added, or removed by
1754 files List of strings. All files modified, added, or removed by
1753 this changeset.
1755 this changeset.
1754 files(pattern)
1756 files(pattern)
1755 All files of the current changeset matching the pattern. See
1757 All files of the current changeset matching the pattern. See
1756 'hg help patterns'.
1758 'hg help patterns'.
1757
1759
1758 Test section lookup by translated message
1760 Test section lookup by translated message
1759
1761
1760 str.lower() instead of encoding.lower(str) on translated message might
1762 str.lower() instead of encoding.lower(str) on translated message might
1761 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1763 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1762 as the second or later byte of multi-byte character.
1764 as the second or later byte of multi-byte character.
1763
1765
1764 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1766 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1765 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1767 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1766 replacement makes message meaningless.
1768 replacement makes message meaningless.
1767
1769
1768 This tests that section lookup by translated string isn't broken by
1770 This tests that section lookup by translated string isn't broken by
1769 such str.lower().
1771 such str.lower().
1770
1772
1771 $ $PYTHON <<EOF
1773 $ $PYTHON <<EOF
1772 > def escape(s):
1774 > def escape(s):
1773 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1775 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1774 > # translation of "record" in ja_JP.cp932
1776 > # translation of "record" in ja_JP.cp932
1775 > upper = "\x8bL\x98^"
1777 > upper = "\x8bL\x98^"
1776 > # str.lower()-ed section name should be treated as different one
1778 > # str.lower()-ed section name should be treated as different one
1777 > lower = "\x8bl\x98^"
1779 > lower = "\x8bl\x98^"
1778 > with open('ambiguous.py', 'w') as fp:
1780 > with open('ambiguous.py', 'w') as fp:
1779 > fp.write("""# ambiguous section names in ja_JP.cp932
1781 > fp.write("""# ambiguous section names in ja_JP.cp932
1780 > u'''summary of extension
1782 > u'''summary of extension
1781 >
1783 >
1782 > %s
1784 > %s
1783 > ----
1785 > ----
1784 >
1786 >
1785 > Upper name should show only this message
1787 > Upper name should show only this message
1786 >
1788 >
1787 > %s
1789 > %s
1788 > ----
1790 > ----
1789 >
1791 >
1790 > Lower name should show only this message
1792 > Lower name should show only this message
1791 >
1793 >
1792 > subsequent section
1794 > subsequent section
1793 > ------------------
1795 > ------------------
1794 >
1796 >
1795 > This should be hidden at 'hg help ambiguous' with section name.
1797 > This should be hidden at 'hg help ambiguous' with section name.
1796 > '''
1798 > '''
1797 > """ % (escape(upper), escape(lower)))
1799 > """ % (escape(upper), escape(lower)))
1798 > EOF
1800 > EOF
1799
1801
1800 $ cat >> $HGRCPATH <<EOF
1802 $ cat >> $HGRCPATH <<EOF
1801 > [extensions]
1803 > [extensions]
1802 > ambiguous = ./ambiguous.py
1804 > ambiguous = ./ambiguous.py
1803 > EOF
1805 > EOF
1804
1806
1805 $ $PYTHON <<EOF | sh
1807 $ $PYTHON <<EOF | sh
1806 > upper = "\x8bL\x98^"
1808 > upper = "\x8bL\x98^"
1807 > print("hg --encoding cp932 help -e ambiguous.%s" % upper)
1809 > print("hg --encoding cp932 help -e ambiguous.%s" % upper)
1808 > EOF
1810 > EOF
1809 \x8bL\x98^ (esc)
1811 \x8bL\x98^ (esc)
1810 ----
1812 ----
1811
1813
1812 Upper name should show only this message
1814 Upper name should show only this message
1813
1815
1814
1816
1815 $ $PYTHON <<EOF | sh
1817 $ $PYTHON <<EOF | sh
1816 > lower = "\x8bl\x98^"
1818 > lower = "\x8bl\x98^"
1817 > print("hg --encoding cp932 help -e ambiguous.%s" % lower)
1819 > print("hg --encoding cp932 help -e ambiguous.%s" % lower)
1818 > EOF
1820 > EOF
1819 \x8bl\x98^ (esc)
1821 \x8bl\x98^ (esc)
1820 ----
1822 ----
1821
1823
1822 Lower name should show only this message
1824 Lower name should show only this message
1823
1825
1824
1826
1825 $ cat >> $HGRCPATH <<EOF
1827 $ cat >> $HGRCPATH <<EOF
1826 > [extensions]
1828 > [extensions]
1827 > ambiguous = !
1829 > ambiguous = !
1828 > EOF
1830 > EOF
1829
1831
1830 Show help content of disabled extensions
1832 Show help content of disabled extensions
1831
1833
1832 $ cat >> $HGRCPATH <<EOF
1834 $ cat >> $HGRCPATH <<EOF
1833 > [extensions]
1835 > [extensions]
1834 > ambiguous = !./ambiguous.py
1836 > ambiguous = !./ambiguous.py
1835 > EOF
1837 > EOF
1836 $ hg help -e ambiguous
1838 $ hg help -e ambiguous
1837 ambiguous extension - (no help text available)
1839 ambiguous extension - (no help text available)
1838
1840
1839 (use 'hg help extensions' for information on enabling extensions)
1841 (use 'hg help extensions' for information on enabling extensions)
1840
1842
1841 Test dynamic list of merge tools only shows up once
1843 Test dynamic list of merge tools only shows up once
1842 $ hg help merge-tools
1844 $ hg help merge-tools
1843 Merge Tools
1845 Merge Tools
1844 """""""""""
1846 """""""""""
1845
1847
1846 To merge files Mercurial uses merge tools.
1848 To merge files Mercurial uses merge tools.
1847
1849
1848 A merge tool combines two different versions of a file into a merged file.
1850 A merge tool combines two different versions of a file into a merged file.
1849 Merge tools are given the two files and the greatest common ancestor of
1851 Merge tools are given the two files and the greatest common ancestor of
1850 the two file versions, so they can determine the changes made on both
1852 the two file versions, so they can determine the changes made on both
1851 branches.
1853 branches.
1852
1854
1853 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1855 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1854 backout' and in several extensions.
1856 backout' and in several extensions.
1855
1857
1856 Usually, the merge tool tries to automatically reconcile the files by
1858 Usually, the merge tool tries to automatically reconcile the files by
1857 combining all non-overlapping changes that occurred separately in the two
1859 combining all non-overlapping changes that occurred separately in the two
1858 different evolutions of the same initial base file. Furthermore, some
1860 different evolutions of the same initial base file. Furthermore, some
1859 interactive merge programs make it easier to manually resolve conflicting
1861 interactive merge programs make it easier to manually resolve conflicting
1860 merges, either in a graphical way, or by inserting some conflict markers.
1862 merges, either in a graphical way, or by inserting some conflict markers.
1861 Mercurial does not include any interactive merge programs but relies on
1863 Mercurial does not include any interactive merge programs but relies on
1862 external tools for that.
1864 external tools for that.
1863
1865
1864 Available merge tools
1866 Available merge tools
1865 =====================
1867 =====================
1866
1868
1867 External merge tools and their properties are configured in the merge-
1869 External merge tools and their properties are configured in the merge-
1868 tools configuration section - see hgrc(5) - but they can often just be
1870 tools configuration section - see hgrc(5) - but they can often just be
1869 named by their executable.
1871 named by their executable.
1870
1872
1871 A merge tool is generally usable if its executable can be found on the
1873 A merge tool is generally usable if its executable can be found on the
1872 system and if it can handle the merge. The executable is found if it is an
1874 system and if it can handle the merge. The executable is found if it is an
1873 absolute or relative executable path or the name of an application in the
1875 absolute or relative executable path or the name of an application in the
1874 executable search path. The tool is assumed to be able to handle the merge
1876 executable search path. The tool is assumed to be able to handle the merge
1875 if it can handle symlinks if the file is a symlink, if it can handle
1877 if it can handle symlinks if the file is a symlink, if it can handle
1876 binary files if the file is binary, and if a GUI is available if the tool
1878 binary files if the file is binary, and if a GUI is available if the tool
1877 requires a GUI.
1879 requires a GUI.
1878
1880
1879 There are some internal merge tools which can be used. The internal merge
1881 There are some internal merge tools which can be used. The internal merge
1880 tools are:
1882 tools are:
1881
1883
1882 ":dump"
1884 ":dump"
1883 Creates three versions of the files to merge, containing the contents of
1885 Creates three versions of the files to merge, containing the contents of
1884 local, other and base. These files can then be used to perform a merge
1886 local, other and base. These files can then be used to perform a merge
1885 manually. If the file to be merged is named "a.txt", these files will
1887 manually. If the file to be merged is named "a.txt", these files will
1886 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1888 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1887 they will be placed in the same directory as "a.txt".
1889 they will be placed in the same directory as "a.txt".
1888
1890
1889 This implies premerge. Therefore, files aren't dumped, if premerge runs
1891 This implies premerge. Therefore, files aren't dumped, if premerge runs
1890 successfully. Use :forcedump to forcibly write files out.
1892 successfully. Use :forcedump to forcibly write files out.
1891
1893
1892 (actual capabilities: binary, symlink)
1894 (actual capabilities: binary, symlink)
1893
1895
1894 ":fail"
1896 ":fail"
1895 Rather than attempting to merge files that were modified on both
1897 Rather than attempting to merge files that were modified on both
1896 branches, it marks them as unresolved. The resolve command must be used
1898 branches, it marks them as unresolved. The resolve command must be used
1897 to resolve these conflicts.
1899 to resolve these conflicts.
1898
1900
1899 (actual capabilities: binary, symlink)
1901 (actual capabilities: binary, symlink)
1900
1902
1901 ":forcedump"
1903 ":forcedump"
1902 Creates three versions of the files as same as :dump, but omits
1904 Creates three versions of the files as same as :dump, but omits
1903 premerge.
1905 premerge.
1904
1906
1905 (actual capabilities: binary, symlink)
1907 (actual capabilities: binary, symlink)
1906
1908
1907 ":local"
1909 ":local"
1908 Uses the local 'p1()' version of files as the merged version.
1910 Uses the local 'p1()' version of files as the merged version.
1909
1911
1910 (actual capabilities: binary, symlink)
1912 (actual capabilities: binary, symlink)
1911
1913
1912 ":merge"
1914 ":merge"
1913 Uses the internal non-interactive simple merge algorithm for merging
1915 Uses the internal non-interactive simple merge algorithm for merging
1914 files. It will fail if there are any conflicts and leave markers in the
1916 files. It will fail if there are any conflicts and leave markers in the
1915 partially merged file. Markers will have two sections, one for each side
1917 partially merged file. Markers will have two sections, one for each side
1916 of merge.
1918 of merge.
1917
1919
1918 ":merge-local"
1920 ":merge-local"
1919 Like :merge, but resolve all conflicts non-interactively in favor of the
1921 Like :merge, but resolve all conflicts non-interactively in favor of the
1920 local 'p1()' changes.
1922 local 'p1()' changes.
1921
1923
1922 ":merge-other"
1924 ":merge-other"
1923 Like :merge, but resolve all conflicts non-interactively in favor of the
1925 Like :merge, but resolve all conflicts non-interactively in favor of the
1924 other 'p2()' changes.
1926 other 'p2()' changes.
1925
1927
1926 ":merge3"
1928 ":merge3"
1927 Uses the internal non-interactive simple merge algorithm for merging
1929 Uses the internal non-interactive simple merge algorithm for merging
1928 files. It will fail if there are any conflicts and leave markers in the
1930 files. It will fail if there are any conflicts and leave markers in the
1929 partially merged file. Marker will have three sections, one from each
1931 partially merged file. Marker will have three sections, one from each
1930 side of the merge and one for the base content.
1932 side of the merge and one for the base content.
1931
1933
1932 ":other"
1934 ":other"
1933 Uses the other 'p2()' version of files as the merged version.
1935 Uses the other 'p2()' version of files as the merged version.
1934
1936
1935 (actual capabilities: binary, symlink)
1937 (actual capabilities: binary, symlink)
1936
1938
1937 ":prompt"
1939 ":prompt"
1938 Asks the user which of the local 'p1()' or the other 'p2()' version to
1940 Asks the user which of the local 'p1()' or the other 'p2()' version to
1939 keep as the merged version.
1941 keep as the merged version.
1940
1942
1941 (actual capabilities: binary, symlink)
1943 (actual capabilities: binary, symlink)
1942
1944
1943 ":tagmerge"
1945 ":tagmerge"
1944 Uses the internal tag merge algorithm (experimental).
1946 Uses the internal tag merge algorithm (experimental).
1945
1947
1946 ":union"
1948 ":union"
1947 Uses the internal non-interactive simple merge algorithm for merging
1949 Uses the internal non-interactive simple merge algorithm for merging
1948 files. It will use both left and right sides for conflict regions. No
1950 files. It will use both left and right sides for conflict regions. No
1949 markers are inserted.
1951 markers are inserted.
1950
1952
1951 Internal tools are always available and do not require a GUI but will by
1953 Internal tools are always available and do not require a GUI but will by
1952 default not handle symlinks or binary files. See next section for detail
1954 default not handle symlinks or binary files. See next section for detail
1953 about "actual capabilities" described above.
1955 about "actual capabilities" described above.
1954
1956
1955 Choosing a merge tool
1957 Choosing a merge tool
1956 =====================
1958 =====================
1957
1959
1958 Mercurial uses these rules when deciding which merge tool to use:
1960 Mercurial uses these rules when deciding which merge tool to use:
1959
1961
1960 1. If a tool has been specified with the --tool option to merge or
1962 1. If a tool has been specified with the --tool option to merge or
1961 resolve, it is used. If it is the name of a tool in the merge-tools
1963 resolve, it is used. If it is the name of a tool in the merge-tools
1962 configuration, its configuration is used. Otherwise the specified tool
1964 configuration, its configuration is used. Otherwise the specified tool
1963 must be executable by the shell.
1965 must be executable by the shell.
1964 2. If the "HGMERGE" environment variable is present, its value is used and
1966 2. If the "HGMERGE" environment variable is present, its value is used and
1965 must be executable by the shell.
1967 must be executable by the shell.
1966 3. If the filename of the file to be merged matches any of the patterns in
1968 3. If the filename of the file to be merged matches any of the patterns in
1967 the merge-patterns configuration section, the first usable merge tool
1969 the merge-patterns configuration section, the first usable merge tool
1968 corresponding to a matching pattern is used.
1970 corresponding to a matching pattern is used.
1969 4. If ui.merge is set it will be considered next. If the value is not the
1971 4. If ui.merge is set it will be considered next. If the value is not the
1970 name of a configured tool, the specified value is used and must be
1972 name of a configured tool, the specified value is used and must be
1971 executable by the shell. Otherwise the named tool is used if it is
1973 executable by the shell. Otherwise the named tool is used if it is
1972 usable.
1974 usable.
1973 5. If any usable merge tools are present in the merge-tools configuration
1975 5. If any usable merge tools are present in the merge-tools configuration
1974 section, the one with the highest priority is used.
1976 section, the one with the highest priority is used.
1975 6. If a program named "hgmerge" can be found on the system, it is used -
1977 6. If a program named "hgmerge" can be found on the system, it is used -
1976 but it will by default not be used for symlinks and binary files.
1978 but it will by default not be used for symlinks and binary files.
1977 7. If the file to be merged is not binary and is not a symlink, then
1979 7. If the file to be merged is not binary and is not a symlink, then
1978 internal ":merge" is used.
1980 internal ":merge" is used.
1979 8. Otherwise, ":prompt" is used.
1981 8. Otherwise, ":prompt" is used.
1980
1982
1981 For historical reason, Mercurial treats merge tools as below while
1983 For historical reason, Mercurial treats merge tools as below while
1982 examining rules above.
1984 examining rules above.
1983
1985
1984 step specified via binary symlink
1986 step specified via binary symlink
1985 ----------------------------------
1987 ----------------------------------
1986 1. --tool o/o o/o
1988 1. --tool o/o o/o
1987 2. HGMERGE o/o o/o
1989 2. HGMERGE o/o o/o
1988 3. merge-patterns o/o(*) x/?(*)
1990 3. merge-patterns o/o(*) x/?(*)
1989 4. ui.merge x/?(*) x/?(*)
1991 4. ui.merge x/?(*) x/?(*)
1990
1992
1991 Each capability column indicates Mercurial behavior for internal/external
1993 Each capability column indicates Mercurial behavior for internal/external
1992 merge tools at examining each rule.
1994 merge tools at examining each rule.
1993
1995
1994 - "o": "assume that a tool has capability"
1996 - "o": "assume that a tool has capability"
1995 - "x": "assume that a tool does not have capability"
1997 - "x": "assume that a tool does not have capability"
1996 - "?": "check actual capability of a tool"
1998 - "?": "check actual capability of a tool"
1997
1999
1998 If "merge.strict-capability-check" configuration is true, Mercurial checks
2000 If "merge.strict-capability-check" configuration is true, Mercurial checks
1999 capabilities of merge tools strictly in (*) cases above (= each capability
2001 capabilities of merge tools strictly in (*) cases above (= each capability
2000 column becomes "?/?"). It is false by default for backward compatibility.
2002 column becomes "?/?"). It is false by default for backward compatibility.
2001
2003
2002 Note:
2004 Note:
2003 After selecting a merge program, Mercurial will by default attempt to
2005 After selecting a merge program, Mercurial will by default attempt to
2004 merge the files using a simple merge algorithm first. Only if it
2006 merge the files using a simple merge algorithm first. Only if it
2005 doesn't succeed because of conflicting changes will Mercurial actually
2007 doesn't succeed because of conflicting changes will Mercurial actually
2006 execute the merge program. Whether to use the simple merge algorithm
2008 execute the merge program. Whether to use the simple merge algorithm
2007 first can be controlled by the premerge setting of the merge tool.
2009 first can be controlled by the premerge setting of the merge tool.
2008 Premerge is enabled by default unless the file is binary or a symlink.
2010 Premerge is enabled by default unless the file is binary or a symlink.
2009
2011
2010 See the merge-tools and ui sections of hgrc(5) for details on the
2012 See the merge-tools and ui sections of hgrc(5) for details on the
2011 configuration of merge tools.
2013 configuration of merge tools.
2012
2014
2013 Compression engines listed in `hg help bundlespec`
2015 Compression engines listed in `hg help bundlespec`
2014
2016
2015 $ hg help bundlespec | grep gzip
2017 $ hg help bundlespec | grep gzip
2016 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
2018 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
2017 An algorithm that produces smaller bundles than "gzip".
2019 An algorithm that produces smaller bundles than "gzip".
2018 This engine will likely produce smaller bundles than "gzip" but will be
2020 This engine will likely produce smaller bundles than "gzip" but will be
2019 "gzip"
2021 "gzip"
2020 better compression than "gzip". It also frequently yields better (?)
2022 better compression than "gzip". It also frequently yields better (?)
2021
2023
2022 Test usage of section marks in help documents
2024 Test usage of section marks in help documents
2023
2025
2024 $ cd "$TESTDIR"/../doc
2026 $ cd "$TESTDIR"/../doc
2025 $ $PYTHON check-seclevel.py
2027 $ $PYTHON check-seclevel.py
2026 $ cd $TESTTMP
2028 $ cd $TESTTMP
2027
2029
2028 #if serve
2030 #if serve
2029
2031
2030 Test the help pages in hgweb.
2032 Test the help pages in hgweb.
2031
2033
2032 Dish up an empty repo; serve it cold.
2034 Dish up an empty repo; serve it cold.
2033
2035
2034 $ hg init "$TESTTMP/test"
2036 $ hg init "$TESTTMP/test"
2035 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
2037 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
2036 $ cat hg.pid >> $DAEMON_PIDS
2038 $ cat hg.pid >> $DAEMON_PIDS
2037
2039
2038 $ get-with-headers.py $LOCALIP:$HGPORT "help"
2040 $ get-with-headers.py $LOCALIP:$HGPORT "help"
2039 200 Script output follows
2041 200 Script output follows
2040
2042
2041 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2043 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2042 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2044 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2043 <head>
2045 <head>
2044 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2046 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2045 <meta name="robots" content="index, nofollow" />
2047 <meta name="robots" content="index, nofollow" />
2046 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2048 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2047 <script type="text/javascript" src="/static/mercurial.js"></script>
2049 <script type="text/javascript" src="/static/mercurial.js"></script>
2048
2050
2049 <title>Help: Index</title>
2051 <title>Help: Index</title>
2050 </head>
2052 </head>
2051 <body>
2053 <body>
2052
2054
2053 <div class="container">
2055 <div class="container">
2054 <div class="menu">
2056 <div class="menu">
2055 <div class="logo">
2057 <div class="logo">
2056 <a href="https://mercurial-scm.org/">
2058 <a href="https://mercurial-scm.org/">
2057 <img src="/static/hglogo.png" alt="mercurial" /></a>
2059 <img src="/static/hglogo.png" alt="mercurial" /></a>
2058 </div>
2060 </div>
2059 <ul>
2061 <ul>
2060 <li><a href="/shortlog">log</a></li>
2062 <li><a href="/shortlog">log</a></li>
2061 <li><a href="/graph">graph</a></li>
2063 <li><a href="/graph">graph</a></li>
2062 <li><a href="/tags">tags</a></li>
2064 <li><a href="/tags">tags</a></li>
2063 <li><a href="/bookmarks">bookmarks</a></li>
2065 <li><a href="/bookmarks">bookmarks</a></li>
2064 <li><a href="/branches">branches</a></li>
2066 <li><a href="/branches">branches</a></li>
2065 </ul>
2067 </ul>
2066 <ul>
2068 <ul>
2067 <li class="active">help</li>
2069 <li class="active">help</li>
2068 </ul>
2070 </ul>
2069 </div>
2071 </div>
2070
2072
2071 <div class="main">
2073 <div class="main">
2072 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2074 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2073
2075
2074 <form class="search" action="/log">
2076 <form class="search" action="/log">
2075
2077
2076 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2078 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2077 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2079 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2078 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2080 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2079 </form>
2081 </form>
2080 <table class="bigtable">
2082 <table class="bigtable">
2081 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2083 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2082
2084
2083 <tr><td>
2085 <tr><td>
2084 <a href="/help/bundlespec">
2086 <a href="/help/bundlespec">
2085 bundlespec
2087 bundlespec
2086 </a>
2088 </a>
2087 </td><td>
2089 </td><td>
2088 Bundle File Formats
2090 Bundle File Formats
2089 </td></tr>
2091 </td></tr>
2090 <tr><td>
2092 <tr><td>
2091 <a href="/help/color">
2093 <a href="/help/color">
2092 color
2094 color
2093 </a>
2095 </a>
2094 </td><td>
2096 </td><td>
2095 Colorizing Outputs
2097 Colorizing Outputs
2096 </td></tr>
2098 </td></tr>
2097 <tr><td>
2099 <tr><td>
2098 <a href="/help/config">
2100 <a href="/help/config">
2099 config
2101 config
2100 </a>
2102 </a>
2101 </td><td>
2103 </td><td>
2102 Configuration Files
2104 Configuration Files
2103 </td></tr>
2105 </td></tr>
2104 <tr><td>
2106 <tr><td>
2105 <a href="/help/dates">
2107 <a href="/help/dates">
2106 dates
2108 dates
2107 </a>
2109 </a>
2108 </td><td>
2110 </td><td>
2109 Date Formats
2111 Date Formats
2110 </td></tr>
2112 </td></tr>
2111 <tr><td>
2113 <tr><td>
2112 <a href="/help/deprecated">
2114 <a href="/help/deprecated">
2113 deprecated
2115 deprecated
2114 </a>
2116 </a>
2115 </td><td>
2117 </td><td>
2116 Deprecated Features
2118 Deprecated Features
2117 </td></tr>
2119 </td></tr>
2118 <tr><td>
2120 <tr><td>
2119 <a href="/help/diffs">
2121 <a href="/help/diffs">
2120 diffs
2122 diffs
2121 </a>
2123 </a>
2122 </td><td>
2124 </td><td>
2123 Diff Formats
2125 Diff Formats
2124 </td></tr>
2126 </td></tr>
2125 <tr><td>
2127 <tr><td>
2126 <a href="/help/environment">
2128 <a href="/help/environment">
2127 environment
2129 environment
2128 </a>
2130 </a>
2129 </td><td>
2131 </td><td>
2130 Environment Variables
2132 Environment Variables
2131 </td></tr>
2133 </td></tr>
2132 <tr><td>
2134 <tr><td>
2133 <a href="/help/extensions">
2135 <a href="/help/extensions">
2134 extensions
2136 extensions
2135 </a>
2137 </a>
2136 </td><td>
2138 </td><td>
2137 Using Additional Features
2139 Using Additional Features
2138 </td></tr>
2140 </td></tr>
2139 <tr><td>
2141 <tr><td>
2140 <a href="/help/filesets">
2142 <a href="/help/filesets">
2141 filesets
2143 filesets
2142 </a>
2144 </a>
2143 </td><td>
2145 </td><td>
2144 Specifying File Sets
2146 Specifying File Sets
2145 </td></tr>
2147 </td></tr>
2146 <tr><td>
2148 <tr><td>
2147 <a href="/help/flags">
2149 <a href="/help/flags">
2148 flags
2150 flags
2149 </a>
2151 </a>
2150 </td><td>
2152 </td><td>
2151 Command-line flags
2153 Command-line flags
2152 </td></tr>
2154 </td></tr>
2153 <tr><td>
2155 <tr><td>
2154 <a href="/help/glossary">
2156 <a href="/help/glossary">
2155 glossary
2157 glossary
2156 </a>
2158 </a>
2157 </td><td>
2159 </td><td>
2158 Glossary
2160 Glossary
2159 </td></tr>
2161 </td></tr>
2160 <tr><td>
2162 <tr><td>
2161 <a href="/help/hgignore">
2163 <a href="/help/hgignore">
2162 hgignore
2164 hgignore
2163 </a>
2165 </a>
2164 </td><td>
2166 </td><td>
2165 Syntax for Mercurial Ignore Files
2167 Syntax for Mercurial Ignore Files
2166 </td></tr>
2168 </td></tr>
2167 <tr><td>
2169 <tr><td>
2168 <a href="/help/hgweb">
2170 <a href="/help/hgweb">
2169 hgweb
2171 hgweb
2170 </a>
2172 </a>
2171 </td><td>
2173 </td><td>
2172 Configuring hgweb
2174 Configuring hgweb
2173 </td></tr>
2175 </td></tr>
2174 <tr><td>
2176 <tr><td>
2175 <a href="/help/internals">
2177 <a href="/help/internals">
2176 internals
2178 internals
2177 </a>
2179 </a>
2178 </td><td>
2180 </td><td>
2179 Technical implementation topics
2181 Technical implementation topics
2180 </td></tr>
2182 </td></tr>
2181 <tr><td>
2183 <tr><td>
2182 <a href="/help/merge-tools">
2184 <a href="/help/merge-tools">
2183 merge-tools
2185 merge-tools
2184 </a>
2186 </a>
2185 </td><td>
2187 </td><td>
2186 Merge Tools
2188 Merge Tools
2187 </td></tr>
2189 </td></tr>
2188 <tr><td>
2190 <tr><td>
2189 <a href="/help/pager">
2191 <a href="/help/pager">
2190 pager
2192 pager
2191 </a>
2193 </a>
2192 </td><td>
2194 </td><td>
2193 Pager Support
2195 Pager Support
2194 </td></tr>
2196 </td></tr>
2195 <tr><td>
2197 <tr><td>
2196 <a href="/help/patterns">
2198 <a href="/help/patterns">
2197 patterns
2199 patterns
2198 </a>
2200 </a>
2199 </td><td>
2201 </td><td>
2200 File Name Patterns
2202 File Name Patterns
2201 </td></tr>
2203 </td></tr>
2202 <tr><td>
2204 <tr><td>
2203 <a href="/help/phases">
2205 <a href="/help/phases">
2204 phases
2206 phases
2205 </a>
2207 </a>
2206 </td><td>
2208 </td><td>
2207 Working with Phases
2209 Working with Phases
2208 </td></tr>
2210 </td></tr>
2209 <tr><td>
2211 <tr><td>
2210 <a href="/help/revisions">
2212 <a href="/help/revisions">
2211 revisions
2213 revisions
2212 </a>
2214 </a>
2213 </td><td>
2215 </td><td>
2214 Specifying Revisions
2216 Specifying Revisions
2215 </td></tr>
2217 </td></tr>
2216 <tr><td>
2218 <tr><td>
2217 <a href="/help/scripting">
2219 <a href="/help/scripting">
2218 scripting
2220 scripting
2219 </a>
2221 </a>
2220 </td><td>
2222 </td><td>
2221 Using Mercurial from scripts and automation
2223 Using Mercurial from scripts and automation
2222 </td></tr>
2224 </td></tr>
2223 <tr><td>
2225 <tr><td>
2224 <a href="/help/subrepos">
2226 <a href="/help/subrepos">
2225 subrepos
2227 subrepos
2226 </a>
2228 </a>
2227 </td><td>
2229 </td><td>
2228 Subrepositories
2230 Subrepositories
2229 </td></tr>
2231 </td></tr>
2230 <tr><td>
2232 <tr><td>
2231 <a href="/help/templating">
2233 <a href="/help/templating">
2232 templating
2234 templating
2233 </a>
2235 </a>
2234 </td><td>
2236 </td><td>
2235 Template Usage
2237 Template Usage
2236 </td></tr>
2238 </td></tr>
2237 <tr><td>
2239 <tr><td>
2238 <a href="/help/urls">
2240 <a href="/help/urls">
2239 urls
2241 urls
2240 </a>
2242 </a>
2241 </td><td>
2243 </td><td>
2242 URL Paths
2244 URL Paths
2243 </td></tr>
2245 </td></tr>
2244 <tr><td>
2246 <tr><td>
2245 <a href="/help/topic-containing-verbose">
2247 <a href="/help/topic-containing-verbose">
2246 topic-containing-verbose
2248 topic-containing-verbose
2247 </a>
2249 </a>
2248 </td><td>
2250 </td><td>
2249 This is the topic to test omit indicating.
2251 This is the topic to test omit indicating.
2250 </td></tr>
2252 </td></tr>
2251
2253
2252
2254
2253 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2255 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2254
2256
2255 <tr><td>
2257 <tr><td>
2256 <a href="/help/add">
2258 <a href="/help/add">
2257 add
2259 add
2258 </a>
2260 </a>
2259 </td><td>
2261 </td><td>
2260 add the specified files on the next commit
2262 add the specified files on the next commit
2261 </td></tr>
2263 </td></tr>
2262 <tr><td>
2264 <tr><td>
2263 <a href="/help/annotate">
2265 <a href="/help/annotate">
2264 annotate
2266 annotate
2265 </a>
2267 </a>
2266 </td><td>
2268 </td><td>
2267 show changeset information by line for each file
2269 show changeset information by line for each file
2268 </td></tr>
2270 </td></tr>
2269 <tr><td>
2271 <tr><td>
2270 <a href="/help/clone">
2272 <a href="/help/clone">
2271 clone
2273 clone
2272 </a>
2274 </a>
2273 </td><td>
2275 </td><td>
2274 make a copy of an existing repository
2276 make a copy of an existing repository
2275 </td></tr>
2277 </td></tr>
2276 <tr><td>
2278 <tr><td>
2277 <a href="/help/commit">
2279 <a href="/help/commit">
2278 commit
2280 commit
2279 </a>
2281 </a>
2280 </td><td>
2282 </td><td>
2281 commit the specified files or all outstanding changes
2283 commit the specified files or all outstanding changes
2282 </td></tr>
2284 </td></tr>
2283 <tr><td>
2285 <tr><td>
2284 <a href="/help/diff">
2286 <a href="/help/diff">
2285 diff
2287 diff
2286 </a>
2288 </a>
2287 </td><td>
2289 </td><td>
2288 diff repository (or selected files)
2290 diff repository (or selected files)
2289 </td></tr>
2291 </td></tr>
2290 <tr><td>
2292 <tr><td>
2291 <a href="/help/export">
2293 <a href="/help/export">
2292 export
2294 export
2293 </a>
2295 </a>
2294 </td><td>
2296 </td><td>
2295 dump the header and diffs for one or more changesets
2297 dump the header and diffs for one or more changesets
2296 </td></tr>
2298 </td></tr>
2297 <tr><td>
2299 <tr><td>
2298 <a href="/help/forget">
2300 <a href="/help/forget">
2299 forget
2301 forget
2300 </a>
2302 </a>
2301 </td><td>
2303 </td><td>
2302 forget the specified files on the next commit
2304 forget the specified files on the next commit
2303 </td></tr>
2305 </td></tr>
2304 <tr><td>
2306 <tr><td>
2305 <a href="/help/init">
2307 <a href="/help/init">
2306 init
2308 init
2307 </a>
2309 </a>
2308 </td><td>
2310 </td><td>
2309 create a new repository in the given directory
2311 create a new repository in the given directory
2310 </td></tr>
2312 </td></tr>
2311 <tr><td>
2313 <tr><td>
2312 <a href="/help/log">
2314 <a href="/help/log">
2313 log
2315 log
2314 </a>
2316 </a>
2315 </td><td>
2317 </td><td>
2316 show revision history of entire repository or files
2318 show revision history of entire repository or files
2317 </td></tr>
2319 </td></tr>
2318 <tr><td>
2320 <tr><td>
2319 <a href="/help/merge">
2321 <a href="/help/merge">
2320 merge
2322 merge
2321 </a>
2323 </a>
2322 </td><td>
2324 </td><td>
2323 merge another revision into working directory
2325 merge another revision into working directory
2324 </td></tr>
2326 </td></tr>
2325 <tr><td>
2327 <tr><td>
2326 <a href="/help/pull">
2328 <a href="/help/pull">
2327 pull
2329 pull
2328 </a>
2330 </a>
2329 </td><td>
2331 </td><td>
2330 pull changes from the specified source
2332 pull changes from the specified source
2331 </td></tr>
2333 </td></tr>
2332 <tr><td>
2334 <tr><td>
2333 <a href="/help/push">
2335 <a href="/help/push">
2334 push
2336 push
2335 </a>
2337 </a>
2336 </td><td>
2338 </td><td>
2337 push changes to the specified destination
2339 push changes to the specified destination
2338 </td></tr>
2340 </td></tr>
2339 <tr><td>
2341 <tr><td>
2340 <a href="/help/remove">
2342 <a href="/help/remove">
2341 remove
2343 remove
2342 </a>
2344 </a>
2343 </td><td>
2345 </td><td>
2344 remove the specified files on the next commit
2346 remove the specified files on the next commit
2345 </td></tr>
2347 </td></tr>
2346 <tr><td>
2348 <tr><td>
2347 <a href="/help/serve">
2349 <a href="/help/serve">
2348 serve
2350 serve
2349 </a>
2351 </a>
2350 </td><td>
2352 </td><td>
2351 start stand-alone webserver
2353 start stand-alone webserver
2352 </td></tr>
2354 </td></tr>
2353 <tr><td>
2355 <tr><td>
2354 <a href="/help/status">
2356 <a href="/help/status">
2355 status
2357 status
2356 </a>
2358 </a>
2357 </td><td>
2359 </td><td>
2358 show changed files in the working directory
2360 show changed files in the working directory
2359 </td></tr>
2361 </td></tr>
2360 <tr><td>
2362 <tr><td>
2361 <a href="/help/summary">
2363 <a href="/help/summary">
2362 summary
2364 summary
2363 </a>
2365 </a>
2364 </td><td>
2366 </td><td>
2365 summarize working directory state
2367 summarize working directory state
2366 </td></tr>
2368 </td></tr>
2367 <tr><td>
2369 <tr><td>
2368 <a href="/help/update">
2370 <a href="/help/update">
2369 update
2371 update
2370 </a>
2372 </a>
2371 </td><td>
2373 </td><td>
2372 update working directory (or switch revisions)
2374 update working directory (or switch revisions)
2373 </td></tr>
2375 </td></tr>
2374
2376
2375
2377
2376
2378
2377 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2379 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2378
2380
2379 <tr><td>
2381 <tr><td>
2380 <a href="/help/addremove">
2382 <a href="/help/addremove">
2381 addremove
2383 addremove
2382 </a>
2384 </a>
2383 </td><td>
2385 </td><td>
2384 add all new files, delete all missing files
2386 add all new files, delete all missing files
2385 </td></tr>
2387 </td></tr>
2386 <tr><td>
2388 <tr><td>
2387 <a href="/help/archive">
2389 <a href="/help/archive">
2388 archive
2390 archive
2389 </a>
2391 </a>
2390 </td><td>
2392 </td><td>
2391 create an unversioned archive of a repository revision
2393 create an unversioned archive of a repository revision
2392 </td></tr>
2394 </td></tr>
2393 <tr><td>
2395 <tr><td>
2394 <a href="/help/backout">
2396 <a href="/help/backout">
2395 backout
2397 backout
2396 </a>
2398 </a>
2397 </td><td>
2399 </td><td>
2398 reverse effect of earlier changeset
2400 reverse effect of earlier changeset
2399 </td></tr>
2401 </td></tr>
2400 <tr><td>
2402 <tr><td>
2401 <a href="/help/bisect">
2403 <a href="/help/bisect">
2402 bisect
2404 bisect
2403 </a>
2405 </a>
2404 </td><td>
2406 </td><td>
2405 subdivision search of changesets
2407 subdivision search of changesets
2406 </td></tr>
2408 </td></tr>
2407 <tr><td>
2409 <tr><td>
2408 <a href="/help/bookmarks">
2410 <a href="/help/bookmarks">
2409 bookmarks
2411 bookmarks
2410 </a>
2412 </a>
2411 </td><td>
2413 </td><td>
2412 create a new bookmark or list existing bookmarks
2414 create a new bookmark or list existing bookmarks
2413 </td></tr>
2415 </td></tr>
2414 <tr><td>
2416 <tr><td>
2415 <a href="/help/branch">
2417 <a href="/help/branch">
2416 branch
2418 branch
2417 </a>
2419 </a>
2418 </td><td>
2420 </td><td>
2419 set or show the current branch name
2421 set or show the current branch name
2420 </td></tr>
2422 </td></tr>
2421 <tr><td>
2423 <tr><td>
2422 <a href="/help/branches">
2424 <a href="/help/branches">
2423 branches
2425 branches
2424 </a>
2426 </a>
2425 </td><td>
2427 </td><td>
2426 list repository named branches
2428 list repository named branches
2427 </td></tr>
2429 </td></tr>
2428 <tr><td>
2430 <tr><td>
2429 <a href="/help/bundle">
2431 <a href="/help/bundle">
2430 bundle
2432 bundle
2431 </a>
2433 </a>
2432 </td><td>
2434 </td><td>
2433 create a bundle file
2435 create a bundle file
2434 </td></tr>
2436 </td></tr>
2435 <tr><td>
2437 <tr><td>
2436 <a href="/help/cat">
2438 <a href="/help/cat">
2437 cat
2439 cat
2438 </a>
2440 </a>
2439 </td><td>
2441 </td><td>
2440 output the current or given revision of files
2442 output the current or given revision of files
2441 </td></tr>
2443 </td></tr>
2442 <tr><td>
2444 <tr><td>
2443 <a href="/help/config">
2445 <a href="/help/config">
2444 config
2446 config
2445 </a>
2447 </a>
2446 </td><td>
2448 </td><td>
2447 show combined config settings from all hgrc files
2449 show combined config settings from all hgrc files
2448 </td></tr>
2450 </td></tr>
2449 <tr><td>
2451 <tr><td>
2450 <a href="/help/copy">
2452 <a href="/help/copy">
2451 copy
2453 copy
2452 </a>
2454 </a>
2453 </td><td>
2455 </td><td>
2454 mark files as copied for the next commit
2456 mark files as copied for the next commit
2455 </td></tr>
2457 </td></tr>
2456 <tr><td>
2458 <tr><td>
2457 <a href="/help/files">
2459 <a href="/help/files">
2458 files
2460 files
2459 </a>
2461 </a>
2460 </td><td>
2462 </td><td>
2461 list tracked files
2463 list tracked files
2462 </td></tr>
2464 </td></tr>
2463 <tr><td>
2465 <tr><td>
2464 <a href="/help/graft">
2466 <a href="/help/graft">
2465 graft
2467 graft
2466 </a>
2468 </a>
2467 </td><td>
2469 </td><td>
2468 copy changes from other branches onto the current branch
2470 copy changes from other branches onto the current branch
2469 </td></tr>
2471 </td></tr>
2470 <tr><td>
2472 <tr><td>
2471 <a href="/help/grep">
2473 <a href="/help/grep">
2472 grep
2474 grep
2473 </a>
2475 </a>
2474 </td><td>
2476 </td><td>
2475 search revision history for a pattern in specified files
2477 search revision history for a pattern in specified files
2476 </td></tr>
2478 </td></tr>
2477 <tr><td>
2479 <tr><td>
2478 <a href="/help/heads">
2480 <a href="/help/heads">
2479 heads
2481 heads
2480 </a>
2482 </a>
2481 </td><td>
2483 </td><td>
2482 show branch heads
2484 show branch heads
2483 </td></tr>
2485 </td></tr>
2484 <tr><td>
2486 <tr><td>
2485 <a href="/help/help">
2487 <a href="/help/help">
2486 help
2488 help
2487 </a>
2489 </a>
2488 </td><td>
2490 </td><td>
2489 show help for a given topic or a help overview
2491 show help for a given topic or a help overview
2490 </td></tr>
2492 </td></tr>
2491 <tr><td>
2493 <tr><td>
2492 <a href="/help/hgalias">
2494 <a href="/help/hgalias">
2493 hgalias
2495 hgalias
2494 </a>
2496 </a>
2495 </td><td>
2497 </td><td>
2496 summarize working directory state
2498 summarize working directory state
2497 </td></tr>
2499 </td></tr>
2498 <tr><td>
2500 <tr><td>
2499 <a href="/help/identify">
2501 <a href="/help/identify">
2500 identify
2502 identify
2501 </a>
2503 </a>
2502 </td><td>
2504 </td><td>
2503 identify the working directory or specified revision
2505 identify the working directory or specified revision
2504 </td></tr>
2506 </td></tr>
2505 <tr><td>
2507 <tr><td>
2506 <a href="/help/import">
2508 <a href="/help/import">
2507 import
2509 import
2508 </a>
2510 </a>
2509 </td><td>
2511 </td><td>
2510 import an ordered set of patches
2512 import an ordered set of patches
2511 </td></tr>
2513 </td></tr>
2512 <tr><td>
2514 <tr><td>
2513 <a href="/help/incoming">
2515 <a href="/help/incoming">
2514 incoming
2516 incoming
2515 </a>
2517 </a>
2516 </td><td>
2518 </td><td>
2517 show new changesets found in source
2519 show new changesets found in source
2518 </td></tr>
2520 </td></tr>
2519 <tr><td>
2521 <tr><td>
2520 <a href="/help/manifest">
2522 <a href="/help/manifest">
2521 manifest
2523 manifest
2522 </a>
2524 </a>
2523 </td><td>
2525 </td><td>
2524 output the current or given revision of the project manifest
2526 output the current or given revision of the project manifest
2525 </td></tr>
2527 </td></tr>
2526 <tr><td>
2528 <tr><td>
2527 <a href="/help/nohelp">
2529 <a href="/help/nohelp">
2528 nohelp
2530 nohelp
2529 </a>
2531 </a>
2530 </td><td>
2532 </td><td>
2531 (no help text available)
2533 (no help text available)
2532 </td></tr>
2534 </td></tr>
2533 <tr><td>
2535 <tr><td>
2534 <a href="/help/outgoing">
2536 <a href="/help/outgoing">
2535 outgoing
2537 outgoing
2536 </a>
2538 </a>
2537 </td><td>
2539 </td><td>
2538 show changesets not found in the destination
2540 show changesets not found in the destination
2539 </td></tr>
2541 </td></tr>
2540 <tr><td>
2542 <tr><td>
2541 <a href="/help/paths">
2543 <a href="/help/paths">
2542 paths
2544 paths
2543 </a>
2545 </a>
2544 </td><td>
2546 </td><td>
2545 show aliases for remote repositories
2547 show aliases for remote repositories
2546 </td></tr>
2548 </td></tr>
2547 <tr><td>
2549 <tr><td>
2548 <a href="/help/phase">
2550 <a href="/help/phase">
2549 phase
2551 phase
2550 </a>
2552 </a>
2551 </td><td>
2553 </td><td>
2552 set or show the current phase name
2554 set or show the current phase name
2553 </td></tr>
2555 </td></tr>
2554 <tr><td>
2556 <tr><td>
2555 <a href="/help/recover">
2557 <a href="/help/recover">
2556 recover
2558 recover
2557 </a>
2559 </a>
2558 </td><td>
2560 </td><td>
2559 roll back an interrupted transaction
2561 roll back an interrupted transaction
2560 </td></tr>
2562 </td></tr>
2561 <tr><td>
2563 <tr><td>
2562 <a href="/help/rename">
2564 <a href="/help/rename">
2563 rename
2565 rename
2564 </a>
2566 </a>
2565 </td><td>
2567 </td><td>
2566 rename files; equivalent of copy + remove
2568 rename files; equivalent of copy + remove
2567 </td></tr>
2569 </td></tr>
2568 <tr><td>
2570 <tr><td>
2569 <a href="/help/resolve">
2571 <a href="/help/resolve">
2570 resolve
2572 resolve
2571 </a>
2573 </a>
2572 </td><td>
2574 </td><td>
2573 redo merges or set/view the merge status of files
2575 redo merges or set/view the merge status of files
2574 </td></tr>
2576 </td></tr>
2575 <tr><td>
2577 <tr><td>
2576 <a href="/help/revert">
2578 <a href="/help/revert">
2577 revert
2579 revert
2578 </a>
2580 </a>
2579 </td><td>
2581 </td><td>
2580 restore files to their checkout state
2582 restore files to their checkout state
2581 </td></tr>
2583 </td></tr>
2582 <tr><td>
2584 <tr><td>
2583 <a href="/help/root">
2585 <a href="/help/root">
2584 root
2586 root
2585 </a>
2587 </a>
2586 </td><td>
2588 </td><td>
2587 print the root (top) of the current working directory
2589 print the root (top) of the current working directory
2588 </td></tr>
2590 </td></tr>
2589 <tr><td>
2591 <tr><td>
2590 <a href="/help/shellalias">
2592 <a href="/help/shellalias">
2591 shellalias
2593 shellalias
2592 </a>
2594 </a>
2593 </td><td>
2595 </td><td>
2594 (no help text available)
2596 (no help text available)
2595 </td></tr>
2597 </td></tr>
2596 <tr><td>
2598 <tr><td>
2597 <a href="/help/tag">
2599 <a href="/help/tag">
2598 tag
2600 tag
2599 </a>
2601 </a>
2600 </td><td>
2602 </td><td>
2601 add one or more tags for the current or given revision
2603 add one or more tags for the current or given revision
2602 </td></tr>
2604 </td></tr>
2603 <tr><td>
2605 <tr><td>
2604 <a href="/help/tags">
2606 <a href="/help/tags">
2605 tags
2607 tags
2606 </a>
2608 </a>
2607 </td><td>
2609 </td><td>
2608 list repository tags
2610 list repository tags
2609 </td></tr>
2611 </td></tr>
2610 <tr><td>
2612 <tr><td>
2611 <a href="/help/unbundle">
2613 <a href="/help/unbundle">
2612 unbundle
2614 unbundle
2613 </a>
2615 </a>
2614 </td><td>
2616 </td><td>
2615 apply one or more bundle files
2617 apply one or more bundle files
2616 </td></tr>
2618 </td></tr>
2617 <tr><td>
2619 <tr><td>
2618 <a href="/help/verify">
2620 <a href="/help/verify">
2619 verify
2621 verify
2620 </a>
2622 </a>
2621 </td><td>
2623 </td><td>
2622 verify the integrity of the repository
2624 verify the integrity of the repository
2623 </td></tr>
2625 </td></tr>
2624 <tr><td>
2626 <tr><td>
2625 <a href="/help/version">
2627 <a href="/help/version">
2626 version
2628 version
2627 </a>
2629 </a>
2628 </td><td>
2630 </td><td>
2629 output version and copyright information
2631 output version and copyright information
2630 </td></tr>
2632 </td></tr>
2631
2633
2632
2634
2633 </table>
2635 </table>
2634 </div>
2636 </div>
2635 </div>
2637 </div>
2636
2638
2637
2639
2638
2640
2639 </body>
2641 </body>
2640 </html>
2642 </html>
2641
2643
2642
2644
2643 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2645 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2644 200 Script output follows
2646 200 Script output follows
2645
2647
2646 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2648 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2647 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2649 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2648 <head>
2650 <head>
2649 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2651 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2650 <meta name="robots" content="index, nofollow" />
2652 <meta name="robots" content="index, nofollow" />
2651 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2653 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2652 <script type="text/javascript" src="/static/mercurial.js"></script>
2654 <script type="text/javascript" src="/static/mercurial.js"></script>
2653
2655
2654 <title>Help: add</title>
2656 <title>Help: add</title>
2655 </head>
2657 </head>
2656 <body>
2658 <body>
2657
2659
2658 <div class="container">
2660 <div class="container">
2659 <div class="menu">
2661 <div class="menu">
2660 <div class="logo">
2662 <div class="logo">
2661 <a href="https://mercurial-scm.org/">
2663 <a href="https://mercurial-scm.org/">
2662 <img src="/static/hglogo.png" alt="mercurial" /></a>
2664 <img src="/static/hglogo.png" alt="mercurial" /></a>
2663 </div>
2665 </div>
2664 <ul>
2666 <ul>
2665 <li><a href="/shortlog">log</a></li>
2667 <li><a href="/shortlog">log</a></li>
2666 <li><a href="/graph">graph</a></li>
2668 <li><a href="/graph">graph</a></li>
2667 <li><a href="/tags">tags</a></li>
2669 <li><a href="/tags">tags</a></li>
2668 <li><a href="/bookmarks">bookmarks</a></li>
2670 <li><a href="/bookmarks">bookmarks</a></li>
2669 <li><a href="/branches">branches</a></li>
2671 <li><a href="/branches">branches</a></li>
2670 </ul>
2672 </ul>
2671 <ul>
2673 <ul>
2672 <li class="active"><a href="/help">help</a></li>
2674 <li class="active"><a href="/help">help</a></li>
2673 </ul>
2675 </ul>
2674 </div>
2676 </div>
2675
2677
2676 <div class="main">
2678 <div class="main">
2677 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2679 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2678 <h3>Help: add</h3>
2680 <h3>Help: add</h3>
2679
2681
2680 <form class="search" action="/log">
2682 <form class="search" action="/log">
2681
2683
2682 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2684 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2683 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2685 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2684 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2686 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2685 </form>
2687 </form>
2686 <div id="doc">
2688 <div id="doc">
2687 <p>
2689 <p>
2688 hg add [OPTION]... [FILE]...
2690 hg add [OPTION]... [FILE]...
2689 </p>
2691 </p>
2690 <p>
2692 <p>
2691 add the specified files on the next commit
2693 add the specified files on the next commit
2692 </p>
2694 </p>
2693 <p>
2695 <p>
2694 Schedule files to be version controlled and added to the
2696 Schedule files to be version controlled and added to the
2695 repository.
2697 repository.
2696 </p>
2698 </p>
2697 <p>
2699 <p>
2698 The files will be added to the repository at the next commit. To
2700 The files will be added to the repository at the next commit. To
2699 undo an add before that, see 'hg forget'.
2701 undo an add before that, see 'hg forget'.
2700 </p>
2702 </p>
2701 <p>
2703 <p>
2702 If no names are given, add all files to the repository (except
2704 If no names are given, add all files to the repository (except
2703 files matching &quot;.hgignore&quot;).
2705 files matching &quot;.hgignore&quot;).
2704 </p>
2706 </p>
2705 <p>
2707 <p>
2706 Examples:
2708 Examples:
2707 </p>
2709 </p>
2708 <ul>
2710 <ul>
2709 <li> New (unknown) files are added automatically by 'hg add':
2711 <li> New (unknown) files are added automatically by 'hg add':
2710 <pre>
2712 <pre>
2711 \$ ls (re)
2713 \$ ls (re)
2712 foo.c
2714 foo.c
2713 \$ hg status (re)
2715 \$ hg status (re)
2714 ? foo.c
2716 ? foo.c
2715 \$ hg add (re)
2717 \$ hg add (re)
2716 adding foo.c
2718 adding foo.c
2717 \$ hg status (re)
2719 \$ hg status (re)
2718 A foo.c
2720 A foo.c
2719 </pre>
2721 </pre>
2720 <li> Specific files to be added can be specified:
2722 <li> Specific files to be added can be specified:
2721 <pre>
2723 <pre>
2722 \$ ls (re)
2724 \$ ls (re)
2723 bar.c foo.c
2725 bar.c foo.c
2724 \$ hg status (re)
2726 \$ hg status (re)
2725 ? bar.c
2727 ? bar.c
2726 ? foo.c
2728 ? foo.c
2727 \$ hg add bar.c (re)
2729 \$ hg add bar.c (re)
2728 \$ hg status (re)
2730 \$ hg status (re)
2729 A bar.c
2731 A bar.c
2730 ? foo.c
2732 ? foo.c
2731 </pre>
2733 </pre>
2732 </ul>
2734 </ul>
2733 <p>
2735 <p>
2734 Returns 0 if all files are successfully added.
2736 Returns 0 if all files are successfully added.
2735 </p>
2737 </p>
2736 <p>
2738 <p>
2737 options ([+] can be repeated):
2739 options ([+] can be repeated):
2738 </p>
2740 </p>
2739 <table>
2741 <table>
2740 <tr><td>-I</td>
2742 <tr><td>-I</td>
2741 <td>--include PATTERN [+]</td>
2743 <td>--include PATTERN [+]</td>
2742 <td>include names matching the given patterns</td></tr>
2744 <td>include names matching the given patterns</td></tr>
2743 <tr><td>-X</td>
2745 <tr><td>-X</td>
2744 <td>--exclude PATTERN [+]</td>
2746 <td>--exclude PATTERN [+]</td>
2745 <td>exclude names matching the given patterns</td></tr>
2747 <td>exclude names matching the given patterns</td></tr>
2746 <tr><td>-S</td>
2748 <tr><td>-S</td>
2747 <td>--subrepos</td>
2749 <td>--subrepos</td>
2748 <td>recurse into subrepositories</td></tr>
2750 <td>recurse into subrepositories</td></tr>
2749 <tr><td>-n</td>
2751 <tr><td>-n</td>
2750 <td>--dry-run</td>
2752 <td>--dry-run</td>
2751 <td>do not perform actions, just print output</td></tr>
2753 <td>do not perform actions, just print output</td></tr>
2752 </table>
2754 </table>
2753 <p>
2755 <p>
2754 global options ([+] can be repeated):
2756 global options ([+] can be repeated):
2755 </p>
2757 </p>
2756 <table>
2758 <table>
2757 <tr><td>-R</td>
2759 <tr><td>-R</td>
2758 <td>--repository REPO</td>
2760 <td>--repository REPO</td>
2759 <td>repository root directory or name of overlay bundle file</td></tr>
2761 <td>repository root directory or name of overlay bundle file</td></tr>
2760 <tr><td></td>
2762 <tr><td></td>
2761 <td>--cwd DIR</td>
2763 <td>--cwd DIR</td>
2762 <td>change working directory</td></tr>
2764 <td>change working directory</td></tr>
2763 <tr><td>-y</td>
2765 <tr><td>-y</td>
2764 <td>--noninteractive</td>
2766 <td>--noninteractive</td>
2765 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2767 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2766 <tr><td>-q</td>
2768 <tr><td>-q</td>
2767 <td>--quiet</td>
2769 <td>--quiet</td>
2768 <td>suppress output</td></tr>
2770 <td>suppress output</td></tr>
2769 <tr><td>-v</td>
2771 <tr><td>-v</td>
2770 <td>--verbose</td>
2772 <td>--verbose</td>
2771 <td>enable additional output</td></tr>
2773 <td>enable additional output</td></tr>
2772 <tr><td></td>
2774 <tr><td></td>
2773 <td>--color TYPE</td>
2775 <td>--color TYPE</td>
2774 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2776 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2775 <tr><td></td>
2777 <tr><td></td>
2776 <td>--config CONFIG [+]</td>
2778 <td>--config CONFIG [+]</td>
2777 <td>set/override config option (use 'section.name=value')</td></tr>
2779 <td>set/override config option (use 'section.name=value')</td></tr>
2778 <tr><td></td>
2780 <tr><td></td>
2779 <td>--debug</td>
2781 <td>--debug</td>
2780 <td>enable debugging output</td></tr>
2782 <td>enable debugging output</td></tr>
2781 <tr><td></td>
2783 <tr><td></td>
2782 <td>--debugger</td>
2784 <td>--debugger</td>
2783 <td>start debugger</td></tr>
2785 <td>start debugger</td></tr>
2784 <tr><td></td>
2786 <tr><td></td>
2785 <td>--encoding ENCODE</td>
2787 <td>--encoding ENCODE</td>
2786 <td>set the charset encoding (default: ascii)</td></tr>
2788 <td>set the charset encoding (default: ascii)</td></tr>
2787 <tr><td></td>
2789 <tr><td></td>
2788 <td>--encodingmode MODE</td>
2790 <td>--encodingmode MODE</td>
2789 <td>set the charset encoding mode (default: strict)</td></tr>
2791 <td>set the charset encoding mode (default: strict)</td></tr>
2790 <tr><td></td>
2792 <tr><td></td>
2791 <td>--traceback</td>
2793 <td>--traceback</td>
2792 <td>always print a traceback on exception</td></tr>
2794 <td>always print a traceback on exception</td></tr>
2793 <tr><td></td>
2795 <tr><td></td>
2794 <td>--time</td>
2796 <td>--time</td>
2795 <td>time how long the command takes</td></tr>
2797 <td>time how long the command takes</td></tr>
2796 <tr><td></td>
2798 <tr><td></td>
2797 <td>--profile</td>
2799 <td>--profile</td>
2798 <td>print command execution profile</td></tr>
2800 <td>print command execution profile</td></tr>
2799 <tr><td></td>
2801 <tr><td></td>
2800 <td>--version</td>
2802 <td>--version</td>
2801 <td>output version information and exit</td></tr>
2803 <td>output version information and exit</td></tr>
2802 <tr><td>-h</td>
2804 <tr><td>-h</td>
2803 <td>--help</td>
2805 <td>--help</td>
2804 <td>display help and exit</td></tr>
2806 <td>display help and exit</td></tr>
2805 <tr><td></td>
2807 <tr><td></td>
2806 <td>--hidden</td>
2808 <td>--hidden</td>
2807 <td>consider hidden changesets</td></tr>
2809 <td>consider hidden changesets</td></tr>
2808 <tr><td></td>
2810 <tr><td></td>
2809 <td>--pager TYPE</td>
2811 <td>--pager TYPE</td>
2810 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2812 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2811 </table>
2813 </table>
2812
2814
2813 </div>
2815 </div>
2814 </div>
2816 </div>
2815 </div>
2817 </div>
2816
2818
2817
2819
2818
2820
2819 </body>
2821 </body>
2820 </html>
2822 </html>
2821
2823
2822
2824
2823 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2825 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2824 200 Script output follows
2826 200 Script output follows
2825
2827
2826 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2828 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2827 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2829 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2828 <head>
2830 <head>
2829 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2831 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2830 <meta name="robots" content="index, nofollow" />
2832 <meta name="robots" content="index, nofollow" />
2831 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2833 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2832 <script type="text/javascript" src="/static/mercurial.js"></script>
2834 <script type="text/javascript" src="/static/mercurial.js"></script>
2833
2835
2834 <title>Help: remove</title>
2836 <title>Help: remove</title>
2835 </head>
2837 </head>
2836 <body>
2838 <body>
2837
2839
2838 <div class="container">
2840 <div class="container">
2839 <div class="menu">
2841 <div class="menu">
2840 <div class="logo">
2842 <div class="logo">
2841 <a href="https://mercurial-scm.org/">
2843 <a href="https://mercurial-scm.org/">
2842 <img src="/static/hglogo.png" alt="mercurial" /></a>
2844 <img src="/static/hglogo.png" alt="mercurial" /></a>
2843 </div>
2845 </div>
2844 <ul>
2846 <ul>
2845 <li><a href="/shortlog">log</a></li>
2847 <li><a href="/shortlog">log</a></li>
2846 <li><a href="/graph">graph</a></li>
2848 <li><a href="/graph">graph</a></li>
2847 <li><a href="/tags">tags</a></li>
2849 <li><a href="/tags">tags</a></li>
2848 <li><a href="/bookmarks">bookmarks</a></li>
2850 <li><a href="/bookmarks">bookmarks</a></li>
2849 <li><a href="/branches">branches</a></li>
2851 <li><a href="/branches">branches</a></li>
2850 </ul>
2852 </ul>
2851 <ul>
2853 <ul>
2852 <li class="active"><a href="/help">help</a></li>
2854 <li class="active"><a href="/help">help</a></li>
2853 </ul>
2855 </ul>
2854 </div>
2856 </div>
2855
2857
2856 <div class="main">
2858 <div class="main">
2857 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2859 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2858 <h3>Help: remove</h3>
2860 <h3>Help: remove</h3>
2859
2861
2860 <form class="search" action="/log">
2862 <form class="search" action="/log">
2861
2863
2862 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2864 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2863 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2865 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2864 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2866 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2865 </form>
2867 </form>
2866 <div id="doc">
2868 <div id="doc">
2867 <p>
2869 <p>
2868 hg remove [OPTION]... FILE...
2870 hg remove [OPTION]... FILE...
2869 </p>
2871 </p>
2870 <p>
2872 <p>
2871 aliases: rm
2873 aliases: rm
2872 </p>
2874 </p>
2873 <p>
2875 <p>
2874 remove the specified files on the next commit
2876 remove the specified files on the next commit
2875 </p>
2877 </p>
2876 <p>
2878 <p>
2877 Schedule the indicated files for removal from the current branch.
2879 Schedule the indicated files for removal from the current branch.
2878 </p>
2880 </p>
2879 <p>
2881 <p>
2880 This command schedules the files to be removed at the next commit.
2882 This command schedules the files to be removed at the next commit.
2881 To undo a remove before that, see 'hg revert'. To undo added
2883 To undo a remove before that, see 'hg revert'. To undo added
2882 files, see 'hg forget'.
2884 files, see 'hg forget'.
2883 </p>
2885 </p>
2884 <p>
2886 <p>
2885 -A/--after can be used to remove only files that have already
2887 -A/--after can be used to remove only files that have already
2886 been deleted, -f/--force can be used to force deletion, and -Af
2888 been deleted, -f/--force can be used to force deletion, and -Af
2887 can be used to remove files from the next revision without
2889 can be used to remove files from the next revision without
2888 deleting them from the working directory.
2890 deleting them from the working directory.
2889 </p>
2891 </p>
2890 <p>
2892 <p>
2891 The following table details the behavior of remove for different
2893 The following table details the behavior of remove for different
2892 file states (columns) and option combinations (rows). The file
2894 file states (columns) and option combinations (rows). The file
2893 states are Added [A], Clean [C], Modified [M] and Missing [!]
2895 states are Added [A], Clean [C], Modified [M] and Missing [!]
2894 (as reported by 'hg status'). The actions are Warn, Remove
2896 (as reported by 'hg status'). The actions are Warn, Remove
2895 (from branch) and Delete (from disk):
2897 (from branch) and Delete (from disk):
2896 </p>
2898 </p>
2897 <table>
2899 <table>
2898 <tr><td>opt/state</td>
2900 <tr><td>opt/state</td>
2899 <td>A</td>
2901 <td>A</td>
2900 <td>C</td>
2902 <td>C</td>
2901 <td>M</td>
2903 <td>M</td>
2902 <td>!</td></tr>
2904 <td>!</td></tr>
2903 <tr><td>none</td>
2905 <tr><td>none</td>
2904 <td>W</td>
2906 <td>W</td>
2905 <td>RD</td>
2907 <td>RD</td>
2906 <td>W</td>
2908 <td>W</td>
2907 <td>R</td></tr>
2909 <td>R</td></tr>
2908 <tr><td>-f</td>
2910 <tr><td>-f</td>
2909 <td>R</td>
2911 <td>R</td>
2910 <td>RD</td>
2912 <td>RD</td>
2911 <td>RD</td>
2913 <td>RD</td>
2912 <td>R</td></tr>
2914 <td>R</td></tr>
2913 <tr><td>-A</td>
2915 <tr><td>-A</td>
2914 <td>W</td>
2916 <td>W</td>
2915 <td>W</td>
2917 <td>W</td>
2916 <td>W</td>
2918 <td>W</td>
2917 <td>R</td></tr>
2919 <td>R</td></tr>
2918 <tr><td>-Af</td>
2920 <tr><td>-Af</td>
2919 <td>R</td>
2921 <td>R</td>
2920 <td>R</td>
2922 <td>R</td>
2921 <td>R</td>
2923 <td>R</td>
2922 <td>R</td></tr>
2924 <td>R</td></tr>
2923 </table>
2925 </table>
2924 <p>
2926 <p>
2925 <b>Note:</b>
2927 <b>Note:</b>
2926 </p>
2928 </p>
2927 <p>
2929 <p>
2928 'hg remove' never deletes files in Added [A] state from the
2930 'hg remove' never deletes files in Added [A] state from the
2929 working directory, not even if &quot;--force&quot; is specified.
2931 working directory, not even if &quot;--force&quot; is specified.
2930 </p>
2932 </p>
2931 <p>
2933 <p>
2932 Returns 0 on success, 1 if any warnings encountered.
2934 Returns 0 on success, 1 if any warnings encountered.
2933 </p>
2935 </p>
2934 <p>
2936 <p>
2935 options ([+] can be repeated):
2937 options ([+] can be repeated):
2936 </p>
2938 </p>
2937 <table>
2939 <table>
2938 <tr><td>-A</td>
2940 <tr><td>-A</td>
2939 <td>--after</td>
2941 <td>--after</td>
2940 <td>record delete for missing files</td></tr>
2942 <td>record delete for missing files</td></tr>
2941 <tr><td>-f</td>
2943 <tr><td>-f</td>
2942 <td>--force</td>
2944 <td>--force</td>
2943 <td>forget added files, delete modified files</td></tr>
2945 <td>forget added files, delete modified files</td></tr>
2944 <tr><td>-S</td>
2946 <tr><td>-S</td>
2945 <td>--subrepos</td>
2947 <td>--subrepos</td>
2946 <td>recurse into subrepositories</td></tr>
2948 <td>recurse into subrepositories</td></tr>
2947 <tr><td>-I</td>
2949 <tr><td>-I</td>
2948 <td>--include PATTERN [+]</td>
2950 <td>--include PATTERN [+]</td>
2949 <td>include names matching the given patterns</td></tr>
2951 <td>include names matching the given patterns</td></tr>
2950 <tr><td>-X</td>
2952 <tr><td>-X</td>
2951 <td>--exclude PATTERN [+]</td>
2953 <td>--exclude PATTERN [+]</td>
2952 <td>exclude names matching the given patterns</td></tr>
2954 <td>exclude names matching the given patterns</td></tr>
2953 <tr><td>-n</td>
2955 <tr><td>-n</td>
2954 <td>--dry-run</td>
2956 <td>--dry-run</td>
2955 <td>do not perform actions, just print output</td></tr>
2957 <td>do not perform actions, just print output</td></tr>
2956 </table>
2958 </table>
2957 <p>
2959 <p>
2958 global options ([+] can be repeated):
2960 global options ([+] can be repeated):
2959 </p>
2961 </p>
2960 <table>
2962 <table>
2961 <tr><td>-R</td>
2963 <tr><td>-R</td>
2962 <td>--repository REPO</td>
2964 <td>--repository REPO</td>
2963 <td>repository root directory or name of overlay bundle file</td></tr>
2965 <td>repository root directory or name of overlay bundle file</td></tr>
2964 <tr><td></td>
2966 <tr><td></td>
2965 <td>--cwd DIR</td>
2967 <td>--cwd DIR</td>
2966 <td>change working directory</td></tr>
2968 <td>change working directory</td></tr>
2967 <tr><td>-y</td>
2969 <tr><td>-y</td>
2968 <td>--noninteractive</td>
2970 <td>--noninteractive</td>
2969 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2971 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2970 <tr><td>-q</td>
2972 <tr><td>-q</td>
2971 <td>--quiet</td>
2973 <td>--quiet</td>
2972 <td>suppress output</td></tr>
2974 <td>suppress output</td></tr>
2973 <tr><td>-v</td>
2975 <tr><td>-v</td>
2974 <td>--verbose</td>
2976 <td>--verbose</td>
2975 <td>enable additional output</td></tr>
2977 <td>enable additional output</td></tr>
2976 <tr><td></td>
2978 <tr><td></td>
2977 <td>--color TYPE</td>
2979 <td>--color TYPE</td>
2978 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2980 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2979 <tr><td></td>
2981 <tr><td></td>
2980 <td>--config CONFIG [+]</td>
2982 <td>--config CONFIG [+]</td>
2981 <td>set/override config option (use 'section.name=value')</td></tr>
2983 <td>set/override config option (use 'section.name=value')</td></tr>
2982 <tr><td></td>
2984 <tr><td></td>
2983 <td>--debug</td>
2985 <td>--debug</td>
2984 <td>enable debugging output</td></tr>
2986 <td>enable debugging output</td></tr>
2985 <tr><td></td>
2987 <tr><td></td>
2986 <td>--debugger</td>
2988 <td>--debugger</td>
2987 <td>start debugger</td></tr>
2989 <td>start debugger</td></tr>
2988 <tr><td></td>
2990 <tr><td></td>
2989 <td>--encoding ENCODE</td>
2991 <td>--encoding ENCODE</td>
2990 <td>set the charset encoding (default: ascii)</td></tr>
2992 <td>set the charset encoding (default: ascii)</td></tr>
2991 <tr><td></td>
2993 <tr><td></td>
2992 <td>--encodingmode MODE</td>
2994 <td>--encodingmode MODE</td>
2993 <td>set the charset encoding mode (default: strict)</td></tr>
2995 <td>set the charset encoding mode (default: strict)</td></tr>
2994 <tr><td></td>
2996 <tr><td></td>
2995 <td>--traceback</td>
2997 <td>--traceback</td>
2996 <td>always print a traceback on exception</td></tr>
2998 <td>always print a traceback on exception</td></tr>
2997 <tr><td></td>
2999 <tr><td></td>
2998 <td>--time</td>
3000 <td>--time</td>
2999 <td>time how long the command takes</td></tr>
3001 <td>time how long the command takes</td></tr>
3000 <tr><td></td>
3002 <tr><td></td>
3001 <td>--profile</td>
3003 <td>--profile</td>
3002 <td>print command execution profile</td></tr>
3004 <td>print command execution profile</td></tr>
3003 <tr><td></td>
3005 <tr><td></td>
3004 <td>--version</td>
3006 <td>--version</td>
3005 <td>output version information and exit</td></tr>
3007 <td>output version information and exit</td></tr>
3006 <tr><td>-h</td>
3008 <tr><td>-h</td>
3007 <td>--help</td>
3009 <td>--help</td>
3008 <td>display help and exit</td></tr>
3010 <td>display help and exit</td></tr>
3009 <tr><td></td>
3011 <tr><td></td>
3010 <td>--hidden</td>
3012 <td>--hidden</td>
3011 <td>consider hidden changesets</td></tr>
3013 <td>consider hidden changesets</td></tr>
3012 <tr><td></td>
3014 <tr><td></td>
3013 <td>--pager TYPE</td>
3015 <td>--pager TYPE</td>
3014 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3016 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3015 </table>
3017 </table>
3016
3018
3017 </div>
3019 </div>
3018 </div>
3020 </div>
3019 </div>
3021 </div>
3020
3022
3021
3023
3022
3024
3023 </body>
3025 </body>
3024 </html>
3026 </html>
3025
3027
3026
3028
3027 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
3029 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
3028 200 Script output follows
3030 200 Script output follows
3029
3031
3030 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3032 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3031 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3033 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3032 <head>
3034 <head>
3033 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3035 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3034 <meta name="robots" content="index, nofollow" />
3036 <meta name="robots" content="index, nofollow" />
3035 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3037 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3036 <script type="text/javascript" src="/static/mercurial.js"></script>
3038 <script type="text/javascript" src="/static/mercurial.js"></script>
3037
3039
3038 <title>Help: dates</title>
3040 <title>Help: dates</title>
3039 </head>
3041 </head>
3040 <body>
3042 <body>
3041
3043
3042 <div class="container">
3044 <div class="container">
3043 <div class="menu">
3045 <div class="menu">
3044 <div class="logo">
3046 <div class="logo">
3045 <a href="https://mercurial-scm.org/">
3047 <a href="https://mercurial-scm.org/">
3046 <img src="/static/hglogo.png" alt="mercurial" /></a>
3048 <img src="/static/hglogo.png" alt="mercurial" /></a>
3047 </div>
3049 </div>
3048 <ul>
3050 <ul>
3049 <li><a href="/shortlog">log</a></li>
3051 <li><a href="/shortlog">log</a></li>
3050 <li><a href="/graph">graph</a></li>
3052 <li><a href="/graph">graph</a></li>
3051 <li><a href="/tags">tags</a></li>
3053 <li><a href="/tags">tags</a></li>
3052 <li><a href="/bookmarks">bookmarks</a></li>
3054 <li><a href="/bookmarks">bookmarks</a></li>
3053 <li><a href="/branches">branches</a></li>
3055 <li><a href="/branches">branches</a></li>
3054 </ul>
3056 </ul>
3055 <ul>
3057 <ul>
3056 <li class="active"><a href="/help">help</a></li>
3058 <li class="active"><a href="/help">help</a></li>
3057 </ul>
3059 </ul>
3058 </div>
3060 </div>
3059
3061
3060 <div class="main">
3062 <div class="main">
3061 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3063 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3062 <h3>Help: dates</h3>
3064 <h3>Help: dates</h3>
3063
3065
3064 <form class="search" action="/log">
3066 <form class="search" action="/log">
3065
3067
3066 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3068 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3067 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3069 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3068 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3070 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3069 </form>
3071 </form>
3070 <div id="doc">
3072 <div id="doc">
3071 <h1>Date Formats</h1>
3073 <h1>Date Formats</h1>
3072 <p>
3074 <p>
3073 Some commands allow the user to specify a date, e.g.:
3075 Some commands allow the user to specify a date, e.g.:
3074 </p>
3076 </p>
3075 <ul>
3077 <ul>
3076 <li> backout, commit, import, tag: Specify the commit date.
3078 <li> backout, commit, import, tag: Specify the commit date.
3077 <li> log, revert, update: Select revision(s) by date.
3079 <li> log, revert, update: Select revision(s) by date.
3078 </ul>
3080 </ul>
3079 <p>
3081 <p>
3080 Many date formats are valid. Here are some examples:
3082 Many date formats are valid. Here are some examples:
3081 </p>
3083 </p>
3082 <ul>
3084 <ul>
3083 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3085 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3084 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3086 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3085 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3087 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3086 <li> &quot;Dec 6&quot; (midnight)
3088 <li> &quot;Dec 6&quot; (midnight)
3087 <li> &quot;13:18&quot; (today assumed)
3089 <li> &quot;13:18&quot; (today assumed)
3088 <li> &quot;3:39&quot; (3:39AM assumed)
3090 <li> &quot;3:39&quot; (3:39AM assumed)
3089 <li> &quot;3:39pm&quot; (15:39)
3091 <li> &quot;3:39pm&quot; (15:39)
3090 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3092 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3091 <li> &quot;2006-12-6 13:18&quot;
3093 <li> &quot;2006-12-6 13:18&quot;
3092 <li> &quot;2006-12-6&quot;
3094 <li> &quot;2006-12-6&quot;
3093 <li> &quot;12-6&quot;
3095 <li> &quot;12-6&quot;
3094 <li> &quot;12/6&quot;
3096 <li> &quot;12/6&quot;
3095 <li> &quot;12/6/6&quot; (Dec 6 2006)
3097 <li> &quot;12/6/6&quot; (Dec 6 2006)
3096 <li> &quot;today&quot; (midnight)
3098 <li> &quot;today&quot; (midnight)
3097 <li> &quot;yesterday&quot; (midnight)
3099 <li> &quot;yesterday&quot; (midnight)
3098 <li> &quot;now&quot; - right now
3100 <li> &quot;now&quot; - right now
3099 </ul>
3101 </ul>
3100 <p>
3102 <p>
3101 Lastly, there is Mercurial's internal format:
3103 Lastly, there is Mercurial's internal format:
3102 </p>
3104 </p>
3103 <ul>
3105 <ul>
3104 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3106 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3105 </ul>
3107 </ul>
3106 <p>
3108 <p>
3107 This is the internal representation format for dates. The first number
3109 This is the internal representation format for dates. The first number
3108 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3110 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3109 second is the offset of the local timezone, in seconds west of UTC
3111 second is the offset of the local timezone, in seconds west of UTC
3110 (negative if the timezone is east of UTC).
3112 (negative if the timezone is east of UTC).
3111 </p>
3113 </p>
3112 <p>
3114 <p>
3113 The log command also accepts date ranges:
3115 The log command also accepts date ranges:
3114 </p>
3116 </p>
3115 <ul>
3117 <ul>
3116 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3118 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3117 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3119 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3118 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3120 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3119 <li> &quot;-DAYS&quot; - within a given number of days of today
3121 <li> &quot;-DAYS&quot; - within a given number of days of today
3120 </ul>
3122 </ul>
3121
3123
3122 </div>
3124 </div>
3123 </div>
3125 </div>
3124 </div>
3126 </div>
3125
3127
3126
3128
3127
3129
3128 </body>
3130 </body>
3129 </html>
3131 </html>
3130
3132
3131
3133
3132 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3134 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3133 200 Script output follows
3135 200 Script output follows
3134
3136
3135 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3137 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3136 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3138 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3137 <head>
3139 <head>
3138 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3140 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3139 <meta name="robots" content="index, nofollow" />
3141 <meta name="robots" content="index, nofollow" />
3140 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3142 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3141 <script type="text/javascript" src="/static/mercurial.js"></script>
3143 <script type="text/javascript" src="/static/mercurial.js"></script>
3142
3144
3143 <title>Help: pager</title>
3145 <title>Help: pager</title>
3144 </head>
3146 </head>
3145 <body>
3147 <body>
3146
3148
3147 <div class="container">
3149 <div class="container">
3148 <div class="menu">
3150 <div class="menu">
3149 <div class="logo">
3151 <div class="logo">
3150 <a href="https://mercurial-scm.org/">
3152 <a href="https://mercurial-scm.org/">
3151 <img src="/static/hglogo.png" alt="mercurial" /></a>
3153 <img src="/static/hglogo.png" alt="mercurial" /></a>
3152 </div>
3154 </div>
3153 <ul>
3155 <ul>
3154 <li><a href="/shortlog">log</a></li>
3156 <li><a href="/shortlog">log</a></li>
3155 <li><a href="/graph">graph</a></li>
3157 <li><a href="/graph">graph</a></li>
3156 <li><a href="/tags">tags</a></li>
3158 <li><a href="/tags">tags</a></li>
3157 <li><a href="/bookmarks">bookmarks</a></li>
3159 <li><a href="/bookmarks">bookmarks</a></li>
3158 <li><a href="/branches">branches</a></li>
3160 <li><a href="/branches">branches</a></li>
3159 </ul>
3161 </ul>
3160 <ul>
3162 <ul>
3161 <li class="active"><a href="/help">help</a></li>
3163 <li class="active"><a href="/help">help</a></li>
3162 </ul>
3164 </ul>
3163 </div>
3165 </div>
3164
3166
3165 <div class="main">
3167 <div class="main">
3166 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3168 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3167 <h3>Help: pager</h3>
3169 <h3>Help: pager</h3>
3168
3170
3169 <form class="search" action="/log">
3171 <form class="search" action="/log">
3170
3172
3171 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3173 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3172 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3174 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3173 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3175 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3174 </form>
3176 </form>
3175 <div id="doc">
3177 <div id="doc">
3176 <h1>Pager Support</h1>
3178 <h1>Pager Support</h1>
3177 <p>
3179 <p>
3178 Some Mercurial commands can produce a lot of output, and Mercurial will
3180 Some Mercurial commands can produce a lot of output, and Mercurial will
3179 attempt to use a pager to make those commands more pleasant.
3181 attempt to use a pager to make those commands more pleasant.
3180 </p>
3182 </p>
3181 <p>
3183 <p>
3182 To set the pager that should be used, set the application variable:
3184 To set the pager that should be used, set the application variable:
3183 </p>
3185 </p>
3184 <pre>
3186 <pre>
3185 [pager]
3187 [pager]
3186 pager = less -FRX
3188 pager = less -FRX
3187 </pre>
3189 </pre>
3188 <p>
3190 <p>
3189 If no pager is set in the user or repository configuration, Mercurial uses the
3191 If no pager is set in the user or repository configuration, Mercurial uses the
3190 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3192 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3191 or system configuration is used. If none of these are set, a default pager will
3193 or system configuration is used. If none of these are set, a default pager will
3192 be used, typically 'less' on Unix and 'more' on Windows.
3194 be used, typically 'less' on Unix and 'more' on Windows.
3193 </p>
3195 </p>
3194 <p>
3196 <p>
3195 You can disable the pager for certain commands by adding them to the
3197 You can disable the pager for certain commands by adding them to the
3196 pager.ignore list:
3198 pager.ignore list:
3197 </p>
3199 </p>
3198 <pre>
3200 <pre>
3199 [pager]
3201 [pager]
3200 ignore = version, help, update
3202 ignore = version, help, update
3201 </pre>
3203 </pre>
3202 <p>
3204 <p>
3203 To ignore global commands like 'hg version' or 'hg help', you have
3205 To ignore global commands like 'hg version' or 'hg help', you have
3204 to specify them in your user configuration file.
3206 to specify them in your user configuration file.
3205 </p>
3207 </p>
3206 <p>
3208 <p>
3207 To control whether the pager is used at all for an individual command,
3209 To control whether the pager is used at all for an individual command,
3208 you can use --pager=&lt;value&gt;:
3210 you can use --pager=&lt;value&gt;:
3209 </p>
3211 </p>
3210 <ul>
3212 <ul>
3211 <li> use as needed: 'auto'.
3213 <li> use as needed: 'auto'.
3212 <li> require the pager: 'yes' or 'on'.
3214 <li> require the pager: 'yes' or 'on'.
3213 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3215 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3214 </ul>
3216 </ul>
3215 <p>
3217 <p>
3216 To globally turn off all attempts to use a pager, set:
3218 To globally turn off all attempts to use a pager, set:
3217 </p>
3219 </p>
3218 <pre>
3220 <pre>
3219 [ui]
3221 [ui]
3220 paginate = never
3222 paginate = never
3221 </pre>
3223 </pre>
3222 <p>
3224 <p>
3223 which will prevent the pager from running.
3225 which will prevent the pager from running.
3224 </p>
3226 </p>
3225
3227
3226 </div>
3228 </div>
3227 </div>
3229 </div>
3228 </div>
3230 </div>
3229
3231
3230
3232
3231
3233
3232 </body>
3234 </body>
3233 </html>
3235 </html>
3234
3236
3235
3237
3236 Sub-topic indexes rendered properly
3238 Sub-topic indexes rendered properly
3237
3239
3238 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3240 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3239 200 Script output follows
3241 200 Script output follows
3240
3242
3241 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3243 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3242 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3244 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3243 <head>
3245 <head>
3244 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3246 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3245 <meta name="robots" content="index, nofollow" />
3247 <meta name="robots" content="index, nofollow" />
3246 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3248 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3247 <script type="text/javascript" src="/static/mercurial.js"></script>
3249 <script type="text/javascript" src="/static/mercurial.js"></script>
3248
3250
3249 <title>Help: internals</title>
3251 <title>Help: internals</title>
3250 </head>
3252 </head>
3251 <body>
3253 <body>
3252
3254
3253 <div class="container">
3255 <div class="container">
3254 <div class="menu">
3256 <div class="menu">
3255 <div class="logo">
3257 <div class="logo">
3256 <a href="https://mercurial-scm.org/">
3258 <a href="https://mercurial-scm.org/">
3257 <img src="/static/hglogo.png" alt="mercurial" /></a>
3259 <img src="/static/hglogo.png" alt="mercurial" /></a>
3258 </div>
3260 </div>
3259 <ul>
3261 <ul>
3260 <li><a href="/shortlog">log</a></li>
3262 <li><a href="/shortlog">log</a></li>
3261 <li><a href="/graph">graph</a></li>
3263 <li><a href="/graph">graph</a></li>
3262 <li><a href="/tags">tags</a></li>
3264 <li><a href="/tags">tags</a></li>
3263 <li><a href="/bookmarks">bookmarks</a></li>
3265 <li><a href="/bookmarks">bookmarks</a></li>
3264 <li><a href="/branches">branches</a></li>
3266 <li><a href="/branches">branches</a></li>
3265 </ul>
3267 </ul>
3266 <ul>
3268 <ul>
3267 <li><a href="/help">help</a></li>
3269 <li><a href="/help">help</a></li>
3268 </ul>
3270 </ul>
3269 </div>
3271 </div>
3270
3272
3271 <div class="main">
3273 <div class="main">
3272 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3274 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3273
3275
3274 <form class="search" action="/log">
3276 <form class="search" action="/log">
3275
3277
3276 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3278 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3277 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3279 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3278 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3280 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3279 </form>
3281 </form>
3280 <table class="bigtable">
3282 <table class="bigtable">
3281 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3283 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3282
3284
3283 <tr><td>
3285 <tr><td>
3284 <a href="/help/internals.bundle2">
3286 <a href="/help/internals.bundle2">
3285 bundle2
3287 bundle2
3286 </a>
3288 </a>
3287 </td><td>
3289 </td><td>
3288 Bundle2
3290 Bundle2
3289 </td></tr>
3291 </td></tr>
3290 <tr><td>
3292 <tr><td>
3291 <a href="/help/internals.bundles">
3293 <a href="/help/internals.bundles">
3292 bundles
3294 bundles
3293 </a>
3295 </a>
3294 </td><td>
3296 </td><td>
3295 Bundles
3297 Bundles
3296 </td></tr>
3298 </td></tr>
3297 <tr><td>
3299 <tr><td>
3298 <a href="/help/internals.cbor">
3300 <a href="/help/internals.cbor">
3299 cbor
3301 cbor
3300 </a>
3302 </a>
3301 </td><td>
3303 </td><td>
3302 CBOR
3304 CBOR
3303 </td></tr>
3305 </td></tr>
3304 <tr><td>
3306 <tr><td>
3305 <a href="/help/internals.censor">
3307 <a href="/help/internals.censor">
3306 censor
3308 censor
3307 </a>
3309 </a>
3308 </td><td>
3310 </td><td>
3309 Censor
3311 Censor
3310 </td></tr>
3312 </td></tr>
3311 <tr><td>
3313 <tr><td>
3312 <a href="/help/internals.changegroups">
3314 <a href="/help/internals.changegroups">
3313 changegroups
3315 changegroups
3314 </a>
3316 </a>
3315 </td><td>
3317 </td><td>
3316 Changegroups
3318 Changegroups
3317 </td></tr>
3319 </td></tr>
3318 <tr><td>
3320 <tr><td>
3319 <a href="/help/internals.config">
3321 <a href="/help/internals.config">
3320 config
3322 config
3321 </a>
3323 </a>
3322 </td><td>
3324 </td><td>
3323 Config Registrar
3325 Config Registrar
3324 </td></tr>
3326 </td></tr>
3325 <tr><td>
3327 <tr><td>
3326 <a href="/help/internals.requirements">
3328 <a href="/help/internals.requirements">
3327 requirements
3329 requirements
3328 </a>
3330 </a>
3329 </td><td>
3331 </td><td>
3330 Repository Requirements
3332 Repository Requirements
3331 </td></tr>
3333 </td></tr>
3332 <tr><td>
3334 <tr><td>
3333 <a href="/help/internals.revlogs">
3335 <a href="/help/internals.revlogs">
3334 revlogs
3336 revlogs
3335 </a>
3337 </a>
3336 </td><td>
3338 </td><td>
3337 Revision Logs
3339 Revision Logs
3338 </td></tr>
3340 </td></tr>
3339 <tr><td>
3341 <tr><td>
3340 <a href="/help/internals.wireprotocol">
3342 <a href="/help/internals.wireprotocol">
3341 wireprotocol
3343 wireprotocol
3342 </a>
3344 </a>
3343 </td><td>
3345 </td><td>
3344 Wire Protocol
3346 Wire Protocol
3345 </td></tr>
3347 </td></tr>
3348 <tr><td>
3349 <a href="/help/internals.wireprotocolv2">
3350 wireprotocolv2
3351 </a>
3352 </td><td>
3353 Wire Protocol Version 2
3354 </td></tr>
3346
3355
3347
3356
3348
3357
3349
3358
3350
3359
3351 </table>
3360 </table>
3352 </div>
3361 </div>
3353 </div>
3362 </div>
3354
3363
3355
3364
3356
3365
3357 </body>
3366 </body>
3358 </html>
3367 </html>
3359
3368
3360
3369
3361 Sub-topic topics rendered properly
3370 Sub-topic topics rendered properly
3362
3371
3363 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3372 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3364 200 Script output follows
3373 200 Script output follows
3365
3374
3366 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3375 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3367 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3376 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3368 <head>
3377 <head>
3369 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3378 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3370 <meta name="robots" content="index, nofollow" />
3379 <meta name="robots" content="index, nofollow" />
3371 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3380 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3372 <script type="text/javascript" src="/static/mercurial.js"></script>
3381 <script type="text/javascript" src="/static/mercurial.js"></script>
3373
3382
3374 <title>Help: internals.changegroups</title>
3383 <title>Help: internals.changegroups</title>
3375 </head>
3384 </head>
3376 <body>
3385 <body>
3377
3386
3378 <div class="container">
3387 <div class="container">
3379 <div class="menu">
3388 <div class="menu">
3380 <div class="logo">
3389 <div class="logo">
3381 <a href="https://mercurial-scm.org/">
3390 <a href="https://mercurial-scm.org/">
3382 <img src="/static/hglogo.png" alt="mercurial" /></a>
3391 <img src="/static/hglogo.png" alt="mercurial" /></a>
3383 </div>
3392 </div>
3384 <ul>
3393 <ul>
3385 <li><a href="/shortlog">log</a></li>
3394 <li><a href="/shortlog">log</a></li>
3386 <li><a href="/graph">graph</a></li>
3395 <li><a href="/graph">graph</a></li>
3387 <li><a href="/tags">tags</a></li>
3396 <li><a href="/tags">tags</a></li>
3388 <li><a href="/bookmarks">bookmarks</a></li>
3397 <li><a href="/bookmarks">bookmarks</a></li>
3389 <li><a href="/branches">branches</a></li>
3398 <li><a href="/branches">branches</a></li>
3390 </ul>
3399 </ul>
3391 <ul>
3400 <ul>
3392 <li class="active"><a href="/help">help</a></li>
3401 <li class="active"><a href="/help">help</a></li>
3393 </ul>
3402 </ul>
3394 </div>
3403 </div>
3395
3404
3396 <div class="main">
3405 <div class="main">
3397 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3406 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3398 <h3>Help: internals.changegroups</h3>
3407 <h3>Help: internals.changegroups</h3>
3399
3408
3400 <form class="search" action="/log">
3409 <form class="search" action="/log">
3401
3410
3402 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3411 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3403 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3412 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3404 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3413 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3405 </form>
3414 </form>
3406 <div id="doc">
3415 <div id="doc">
3407 <h1>Changegroups</h1>
3416 <h1>Changegroups</h1>
3408 <p>
3417 <p>
3409 Changegroups are representations of repository revlog data, specifically
3418 Changegroups are representations of repository revlog data, specifically
3410 the changelog data, root/flat manifest data, treemanifest data, and
3419 the changelog data, root/flat manifest data, treemanifest data, and
3411 filelogs.
3420 filelogs.
3412 </p>
3421 </p>
3413 <p>
3422 <p>
3414 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3423 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3415 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3424 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3416 only difference being an additional item in the *delta header*. Version
3425 only difference being an additional item in the *delta header*. Version
3417 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3426 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3418 exchanging treemanifests (enabled by setting an option on the
3427 exchanging treemanifests (enabled by setting an option on the
3419 &quot;changegroup&quot; part in the bundle2).
3428 &quot;changegroup&quot; part in the bundle2).
3420 </p>
3429 </p>
3421 <p>
3430 <p>
3422 Changegroups when not exchanging treemanifests consist of 3 logical
3431 Changegroups when not exchanging treemanifests consist of 3 logical
3423 segments:
3432 segments:
3424 </p>
3433 </p>
3425 <pre>
3434 <pre>
3426 +---------------------------------+
3435 +---------------------------------+
3427 | | | |
3436 | | | |
3428 | changeset | manifest | filelogs |
3437 | changeset | manifest | filelogs |
3429 | | | |
3438 | | | |
3430 | | | |
3439 | | | |
3431 +---------------------------------+
3440 +---------------------------------+
3432 </pre>
3441 </pre>
3433 <p>
3442 <p>
3434 When exchanging treemanifests, there are 4 logical segments:
3443 When exchanging treemanifests, there are 4 logical segments:
3435 </p>
3444 </p>
3436 <pre>
3445 <pre>
3437 +-------------------------------------------------+
3446 +-------------------------------------------------+
3438 | | | | |
3447 | | | | |
3439 | changeset | root | treemanifests | filelogs |
3448 | changeset | root | treemanifests | filelogs |
3440 | | manifest | | |
3449 | | manifest | | |
3441 | | | | |
3450 | | | | |
3442 +-------------------------------------------------+
3451 +-------------------------------------------------+
3443 </pre>
3452 </pre>
3444 <p>
3453 <p>
3445 The principle building block of each segment is a *chunk*. A *chunk*
3454 The principle building block of each segment is a *chunk*. A *chunk*
3446 is a framed piece of data:
3455 is a framed piece of data:
3447 </p>
3456 </p>
3448 <pre>
3457 <pre>
3449 +---------------------------------------+
3458 +---------------------------------------+
3450 | | |
3459 | | |
3451 | length | data |
3460 | length | data |
3452 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3461 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3453 | | |
3462 | | |
3454 +---------------------------------------+
3463 +---------------------------------------+
3455 </pre>
3464 </pre>
3456 <p>
3465 <p>
3457 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3466 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3458 integer indicating the length of the entire chunk (including the length field
3467 integer indicating the length of the entire chunk (including the length field
3459 itself).
3468 itself).
3460 </p>
3469 </p>
3461 <p>
3470 <p>
3462 There is a special case chunk that has a value of 0 for the length
3471 There is a special case chunk that has a value of 0 for the length
3463 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3472 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3464 </p>
3473 </p>
3465 <h2>Delta Groups</h2>
3474 <h2>Delta Groups</h2>
3466 <p>
3475 <p>
3467 A *delta group* expresses the content of a revlog as a series of deltas,
3476 A *delta group* expresses the content of a revlog as a series of deltas,
3468 or patches against previous revisions.
3477 or patches against previous revisions.
3469 </p>
3478 </p>
3470 <p>
3479 <p>
3471 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3480 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3472 to signal the end of the delta group:
3481 to signal the end of the delta group:
3473 </p>
3482 </p>
3474 <pre>
3483 <pre>
3475 +------------------------------------------------------------------------+
3484 +------------------------------------------------------------------------+
3476 | | | | | |
3485 | | | | | |
3477 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3486 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3478 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3487 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3479 | | | | | |
3488 | | | | | |
3480 +------------------------------------------------------------------------+
3489 +------------------------------------------------------------------------+
3481 </pre>
3490 </pre>
3482 <p>
3491 <p>
3483 Each *chunk*'s data consists of the following:
3492 Each *chunk*'s data consists of the following:
3484 </p>
3493 </p>
3485 <pre>
3494 <pre>
3486 +---------------------------------------+
3495 +---------------------------------------+
3487 | | |
3496 | | |
3488 | delta header | delta data |
3497 | delta header | delta data |
3489 | (various by version) | (various) |
3498 | (various by version) | (various) |
3490 | | |
3499 | | |
3491 +---------------------------------------+
3500 +---------------------------------------+
3492 </pre>
3501 </pre>
3493 <p>
3502 <p>
3494 The *delta data* is a series of *delta*s that describe a diff from an existing
3503 The *delta data* is a series of *delta*s that describe a diff from an existing
3495 entry (either that the recipient already has, or previously specified in the
3504 entry (either that the recipient already has, or previously specified in the
3496 bundle/changegroup).
3505 bundle/changegroup).
3497 </p>
3506 </p>
3498 <p>
3507 <p>
3499 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3508 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3500 &quot;3&quot; of the changegroup format.
3509 &quot;3&quot; of the changegroup format.
3501 </p>
3510 </p>
3502 <p>
3511 <p>
3503 Version 1 (headerlen=80):
3512 Version 1 (headerlen=80):
3504 </p>
3513 </p>
3505 <pre>
3514 <pre>
3506 +------------------------------------------------------+
3515 +------------------------------------------------------+
3507 | | | | |
3516 | | | | |
3508 | node | p1 node | p2 node | link node |
3517 | node | p1 node | p2 node | link node |
3509 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3518 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3510 | | | | |
3519 | | | | |
3511 +------------------------------------------------------+
3520 +------------------------------------------------------+
3512 </pre>
3521 </pre>
3513 <p>
3522 <p>
3514 Version 2 (headerlen=100):
3523 Version 2 (headerlen=100):
3515 </p>
3524 </p>
3516 <pre>
3525 <pre>
3517 +------------------------------------------------------------------+
3526 +------------------------------------------------------------------+
3518 | | | | | |
3527 | | | | | |
3519 | node | p1 node | p2 node | base node | link node |
3528 | node | p1 node | p2 node | base node | link node |
3520 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3529 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3521 | | | | | |
3530 | | | | | |
3522 +------------------------------------------------------------------+
3531 +------------------------------------------------------------------+
3523 </pre>
3532 </pre>
3524 <p>
3533 <p>
3525 Version 3 (headerlen=102):
3534 Version 3 (headerlen=102):
3526 </p>
3535 </p>
3527 <pre>
3536 <pre>
3528 +------------------------------------------------------------------------------+
3537 +------------------------------------------------------------------------------+
3529 | | | | | | |
3538 | | | | | | |
3530 | node | p1 node | p2 node | base node | link node | flags |
3539 | node | p1 node | p2 node | base node | link node | flags |
3531 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3540 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3532 | | | | | | |
3541 | | | | | | |
3533 +------------------------------------------------------------------------------+
3542 +------------------------------------------------------------------------------+
3534 </pre>
3543 </pre>
3535 <p>
3544 <p>
3536 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3545 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3537 series of *delta*s, densely packed (no separators). These deltas describe a diff
3546 series of *delta*s, densely packed (no separators). These deltas describe a diff
3538 from an existing entry (either that the recipient already has, or previously
3547 from an existing entry (either that the recipient already has, or previously
3539 specified in the bundle/changegroup). The format is described more fully in
3548 specified in the bundle/changegroup). The format is described more fully in
3540 &quot;hg help internals.bdiff&quot;, but briefly:
3549 &quot;hg help internals.bdiff&quot;, but briefly:
3541 </p>
3550 </p>
3542 <pre>
3551 <pre>
3543 +---------------------------------------------------------------+
3552 +---------------------------------------------------------------+
3544 | | | | |
3553 | | | | |
3545 | start offset | end offset | new length | content |
3554 | start offset | end offset | new length | content |
3546 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3555 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3547 | | | | |
3556 | | | | |
3548 +---------------------------------------------------------------+
3557 +---------------------------------------------------------------+
3549 </pre>
3558 </pre>
3550 <p>
3559 <p>
3551 Please note that the length field in the delta data does *not* include itself.
3560 Please note that the length field in the delta data does *not* include itself.
3552 </p>
3561 </p>
3553 <p>
3562 <p>
3554 In version 1, the delta is always applied against the previous node from
3563 In version 1, the delta is always applied against the previous node from
3555 the changegroup or the first parent if this is the first entry in the
3564 the changegroup or the first parent if this is the first entry in the
3556 changegroup.
3565 changegroup.
3557 </p>
3566 </p>
3558 <p>
3567 <p>
3559 In version 2 and up, the delta base node is encoded in the entry in the
3568 In version 2 and up, the delta base node is encoded in the entry in the
3560 changegroup. This allows the delta to be expressed against any parent,
3569 changegroup. This allows the delta to be expressed against any parent,
3561 which can result in smaller deltas and more efficient encoding of data.
3570 which can result in smaller deltas and more efficient encoding of data.
3562 </p>
3571 </p>
3563 <h2>Changeset Segment</h2>
3572 <h2>Changeset Segment</h2>
3564 <p>
3573 <p>
3565 The *changeset segment* consists of a single *delta group* holding
3574 The *changeset segment* consists of a single *delta group* holding
3566 changelog data. The *empty chunk* at the end of the *delta group* denotes
3575 changelog data. The *empty chunk* at the end of the *delta group* denotes
3567 the boundary to the *manifest segment*.
3576 the boundary to the *manifest segment*.
3568 </p>
3577 </p>
3569 <h2>Manifest Segment</h2>
3578 <h2>Manifest Segment</h2>
3570 <p>
3579 <p>
3571 The *manifest segment* consists of a single *delta group* holding manifest
3580 The *manifest segment* consists of a single *delta group* holding manifest
3572 data. If treemanifests are in use, it contains only the manifest for the
3581 data. If treemanifests are in use, it contains only the manifest for the
3573 root directory of the repository. Otherwise, it contains the entire
3582 root directory of the repository. Otherwise, it contains the entire
3574 manifest data. The *empty chunk* at the end of the *delta group* denotes
3583 manifest data. The *empty chunk* at the end of the *delta group* denotes
3575 the boundary to the next segment (either the *treemanifests segment* or the
3584 the boundary to the next segment (either the *treemanifests segment* or the
3576 *filelogs segment*, depending on version and the request options).
3585 *filelogs segment*, depending on version and the request options).
3577 </p>
3586 </p>
3578 <h3>Treemanifests Segment</h3>
3587 <h3>Treemanifests Segment</h3>
3579 <p>
3588 <p>
3580 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3589 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3581 only if the 'treemanifest' param is part of the bundle2 changegroup part
3590 only if the 'treemanifest' param is part of the bundle2 changegroup part
3582 (it is not possible to use changegroup version 3 outside of bundle2).
3591 (it is not possible to use changegroup version 3 outside of bundle2).
3583 Aside from the filenames in the *treemanifests segment* containing a
3592 Aside from the filenames in the *treemanifests segment* containing a
3584 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3593 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3585 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3594 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3586 a sub-segment with filename size 0). This denotes the boundary to the
3595 a sub-segment with filename size 0). This denotes the boundary to the
3587 *filelogs segment*.
3596 *filelogs segment*.
3588 </p>
3597 </p>
3589 <h2>Filelogs Segment</h2>
3598 <h2>Filelogs Segment</h2>
3590 <p>
3599 <p>
3591 The *filelogs segment* consists of multiple sub-segments, each
3600 The *filelogs segment* consists of multiple sub-segments, each
3592 corresponding to an individual file whose data is being described:
3601 corresponding to an individual file whose data is being described:
3593 </p>
3602 </p>
3594 <pre>
3603 <pre>
3595 +--------------------------------------------------+
3604 +--------------------------------------------------+
3596 | | | | | |
3605 | | | | | |
3597 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3606 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3598 | | | | | (4 bytes) |
3607 | | | | | (4 bytes) |
3599 | | | | | |
3608 | | | | | |
3600 +--------------------------------------------------+
3609 +--------------------------------------------------+
3601 </pre>
3610 </pre>
3602 <p>
3611 <p>
3603 The final filelog sub-segment is followed by an *empty chunk* (logically,
3612 The final filelog sub-segment is followed by an *empty chunk* (logically,
3604 a sub-segment with filename size 0). This denotes the end of the segment
3613 a sub-segment with filename size 0). This denotes the end of the segment
3605 and of the overall changegroup.
3614 and of the overall changegroup.
3606 </p>
3615 </p>
3607 <p>
3616 <p>
3608 Each filelog sub-segment consists of the following:
3617 Each filelog sub-segment consists of the following:
3609 </p>
3618 </p>
3610 <pre>
3619 <pre>
3611 +------------------------------------------------------+
3620 +------------------------------------------------------+
3612 | | | |
3621 | | | |
3613 | filename length | filename | delta group |
3622 | filename length | filename | delta group |
3614 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3623 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3615 | | | |
3624 | | | |
3616 +------------------------------------------------------+
3625 +------------------------------------------------------+
3617 </pre>
3626 </pre>
3618 <p>
3627 <p>
3619 That is, a *chunk* consisting of the filename (not terminated or padded)
3628 That is, a *chunk* consisting of the filename (not terminated or padded)
3620 followed by N chunks constituting the *delta group* for this file. The
3629 followed by N chunks constituting the *delta group* for this file. The
3621 *empty chunk* at the end of each *delta group* denotes the boundary to the
3630 *empty chunk* at the end of each *delta group* denotes the boundary to the
3622 next filelog sub-segment.
3631 next filelog sub-segment.
3623 </p>
3632 </p>
3624
3633
3625 </div>
3634 </div>
3626 </div>
3635 </div>
3627 </div>
3636 </div>
3628
3637
3629
3638
3630
3639
3631 </body>
3640 </body>
3632 </html>
3641 </html>
3633
3642
3634
3643
3635 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3644 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3636 404 Not Found
3645 404 Not Found
3637
3646
3638 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3647 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3639 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3648 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3640 <head>
3649 <head>
3641 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3650 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3642 <meta name="robots" content="index, nofollow" />
3651 <meta name="robots" content="index, nofollow" />
3643 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3652 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3644 <script type="text/javascript" src="/static/mercurial.js"></script>
3653 <script type="text/javascript" src="/static/mercurial.js"></script>
3645
3654
3646 <title>test: error</title>
3655 <title>test: error</title>
3647 </head>
3656 </head>
3648 <body>
3657 <body>
3649
3658
3650 <div class="container">
3659 <div class="container">
3651 <div class="menu">
3660 <div class="menu">
3652 <div class="logo">
3661 <div class="logo">
3653 <a href="https://mercurial-scm.org/">
3662 <a href="https://mercurial-scm.org/">
3654 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3663 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3655 </div>
3664 </div>
3656 <ul>
3665 <ul>
3657 <li><a href="/shortlog">log</a></li>
3666 <li><a href="/shortlog">log</a></li>
3658 <li><a href="/graph">graph</a></li>
3667 <li><a href="/graph">graph</a></li>
3659 <li><a href="/tags">tags</a></li>
3668 <li><a href="/tags">tags</a></li>
3660 <li><a href="/bookmarks">bookmarks</a></li>
3669 <li><a href="/bookmarks">bookmarks</a></li>
3661 <li><a href="/branches">branches</a></li>
3670 <li><a href="/branches">branches</a></li>
3662 </ul>
3671 </ul>
3663 <ul>
3672 <ul>
3664 <li><a href="/help">help</a></li>
3673 <li><a href="/help">help</a></li>
3665 </ul>
3674 </ul>
3666 </div>
3675 </div>
3667
3676
3668 <div class="main">
3677 <div class="main">
3669
3678
3670 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3679 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3671 <h3>error</h3>
3680 <h3>error</h3>
3672
3681
3673
3682
3674 <form class="search" action="/log">
3683 <form class="search" action="/log">
3675
3684
3676 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3685 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3677 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3686 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3678 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3687 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3679 </form>
3688 </form>
3680
3689
3681 <div class="description">
3690 <div class="description">
3682 <p>
3691 <p>
3683 An error occurred while processing your request:
3692 An error occurred while processing your request:
3684 </p>
3693 </p>
3685 <p>
3694 <p>
3686 Not Found
3695 Not Found
3687 </p>
3696 </p>
3688 </div>
3697 </div>
3689 </div>
3698 </div>
3690 </div>
3699 </div>
3691
3700
3692
3701
3693
3702
3694 </body>
3703 </body>
3695 </html>
3704 </html>
3696
3705
3697 [1]
3706 [1]
3698
3707
3699 $ killdaemons.py
3708 $ killdaemons.py
3700
3709
3701 #endif
3710 #endif
General Comments 0
You need to be logged in to leave comments. Login now