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