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