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