##// END OF EJS Templates
docs: add documentation about Rust...
Raphaël Gomès -
r49364:7ccd31fd stable
parent child Browse files
Show More
@@ -0,0 +1,94 b''
1 Mercurial can be augmented with Rust extensions for speeding up certain
2 operations.
3
4 Compatibility
5 =============
6
7 Though the Rust extensions are only tested by the project under Linux, users of
8 MacOS, FreeBSD and other UNIX-likes have been using the Rust extensions. Your
9 mileage may vary, but by all means do give us feedback or signal your interest
10 for better support.
11
12 No Rust extensions are available for Windows at this time.
13
14 Features
15 ========
16
17 The following operations are sped up when using Rust:
18 - discovery of differences between repositories (pull/push)
19 - nodemap (see :hg:`help config.format.use-persistent-nodemap`)
20 - all commands using the dirstate (status, commit, diff, add, update, etc.)
21 - dirstate-v2 (see :hg:`help config.format.exp-rc-dirstate-v2`)
22 - iteration over ancestors in a graph
23
24 More features are in the works, and improvements on the above listed are still
25 in progress. For more experimental work see the "rhg" section.
26
27 Checking for Rust
28 =================
29
30 You may already have the Rust extensions depending on how you install Mercurial.
31
32 $ hg debuginstall | grep -i rust
33 checking Rust extensions (installed)
34 checking module policy (rust+c-allow)
35
36 If those lines don't even exist, you're using an old version of `hg` which does
37 not have any Rust extensions yet.
38
39 Installing
40 ==========
41
42 You will need `cargo` to be in your `$PATH`. See the "MSRV" section for which
43 version to use.
44
45 Using pip
46 ---------
47
48 Users of `pip` can install the Rust extensions with the following command:
49
50 $ pip install mercurial --global-option --rust --no-use-pep517
51
52 `--no-use-pep517` is here to tell `pip` to preserve backwards compatibility with
53 the legacy `setup.py` system. Mercurial has not yet migrated its complex setup
54 to the new system, so we still need this to add compiled extensions.
55
56 This might take a couple of minutes because you're compiling everything.
57
58 See the "Checking for Rust" section to see if the install succeeded.
59
60 From your distribution
61 ----------------------
62
63 Some distributions are shipping Mercurial with Rust extensions enabled and
64 pre-compiled (meaning you won't have to install `cargo`), or allow you to
65 specify an install flag. Check with your specific distribution for how to do
66 that, or ask their team to add support for hg+Rust!
67
68 From source
69 -----------
70
71 Please refer to the `rust/README.rst` file in the Mercurial repository for
72 instructions on how to install from source.
73
74 MSRV
75 ====
76
77 The minimum supported Rust version is currently 1.48.0. The project's policy is
78 to follow the version from Debian stable, to make the distributions' job easier.
79
80 rhg
81 ===
82
83 There exists an experimental pure-Rust version of Mercurial called `rhg` with a
84 fallback mechanism for unsupported invocations. It allows for much faster
85 execution of certain commands while adding no discernable overhead for the rest.
86
87 The only way of trying it out is by building it from source. Please refer to
88 `rust/README.rst` in the Mercurial repository.
89
90 Contributing
91 ============
92
93 If you would like to help the Rust endeavor, please refer to `rust/README.rst`
94 in the Mercurial repository.
@@ -1,1172 +1,1181 b''
1 # help.py - help data for mercurial
1 # help.py - help data for mercurial
2 #
2 #
3 # Copyright 2006 Olivia Mackall <olivia@selenic.com>
3 # Copyright 2006 Olivia Mackall <olivia@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 re
11 import re
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 .pycompat import getattr
18 from .pycompat import getattr
19 from . import (
19 from . import (
20 cmdutil,
20 cmdutil,
21 encoding,
21 encoding,
22 error,
22 error,
23 extensions,
23 extensions,
24 fancyopts,
24 fancyopts,
25 filemerge,
25 filemerge,
26 fileset,
26 fileset,
27 minirst,
27 minirst,
28 pycompat,
28 pycompat,
29 registrar,
29 registrar,
30 revset,
30 revset,
31 templatefilters,
31 templatefilters,
32 templatefuncs,
32 templatefuncs,
33 templatekw,
33 templatekw,
34 ui as uimod,
34 ui as uimod,
35 util,
35 util,
36 )
36 )
37 from .hgweb import webcommands
37 from .hgweb import webcommands
38 from .utils import (
38 from .utils import (
39 compression,
39 compression,
40 resourceutil,
40 resourceutil,
41 )
41 )
42
42
43 _exclkeywords = {
43 _exclkeywords = {
44 b"(ADVANCED)",
44 b"(ADVANCED)",
45 b"(DEPRECATED)",
45 b"(DEPRECATED)",
46 b"(EXPERIMENTAL)",
46 b"(EXPERIMENTAL)",
47 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
47 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
48 _(b"(ADVANCED)"),
48 _(b"(ADVANCED)"),
49 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
49 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
50 _(b"(DEPRECATED)"),
50 _(b"(DEPRECATED)"),
51 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
51 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
52 _(b"(EXPERIMENTAL)"),
52 _(b"(EXPERIMENTAL)"),
53 }
53 }
54
54
55 # The order in which command categories will be displayed.
55 # The order in which command categories will be displayed.
56 # Extensions with custom categories should insert them into this list
56 # Extensions with custom categories should insert them into this list
57 # after/before the appropriate item, rather than replacing the list or
57 # after/before the appropriate item, rather than replacing the list or
58 # assuming absolute positions.
58 # assuming absolute positions.
59 CATEGORY_ORDER = [
59 CATEGORY_ORDER = [
60 registrar.command.CATEGORY_REPO_CREATION,
60 registrar.command.CATEGORY_REPO_CREATION,
61 registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT,
61 registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT,
62 registrar.command.CATEGORY_COMMITTING,
62 registrar.command.CATEGORY_COMMITTING,
63 registrar.command.CATEGORY_CHANGE_MANAGEMENT,
63 registrar.command.CATEGORY_CHANGE_MANAGEMENT,
64 registrar.command.CATEGORY_CHANGE_ORGANIZATION,
64 registrar.command.CATEGORY_CHANGE_ORGANIZATION,
65 registrar.command.CATEGORY_FILE_CONTENTS,
65 registrar.command.CATEGORY_FILE_CONTENTS,
66 registrar.command.CATEGORY_CHANGE_NAVIGATION,
66 registrar.command.CATEGORY_CHANGE_NAVIGATION,
67 registrar.command.CATEGORY_WORKING_DIRECTORY,
67 registrar.command.CATEGORY_WORKING_DIRECTORY,
68 registrar.command.CATEGORY_IMPORT_EXPORT,
68 registrar.command.CATEGORY_IMPORT_EXPORT,
69 registrar.command.CATEGORY_MAINTENANCE,
69 registrar.command.CATEGORY_MAINTENANCE,
70 registrar.command.CATEGORY_HELP,
70 registrar.command.CATEGORY_HELP,
71 registrar.command.CATEGORY_MISC,
71 registrar.command.CATEGORY_MISC,
72 registrar.command.CATEGORY_NONE,
72 registrar.command.CATEGORY_NONE,
73 ]
73 ]
74
74
75 # Human-readable category names. These are translated.
75 # Human-readable category names. These are translated.
76 # Extensions with custom categories should add their names here.
76 # Extensions with custom categories should add their names here.
77 CATEGORY_NAMES = {
77 CATEGORY_NAMES = {
78 registrar.command.CATEGORY_REPO_CREATION: b'Repository creation',
78 registrar.command.CATEGORY_REPO_CREATION: b'Repository creation',
79 registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: b'Remote repository management',
79 registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: b'Remote repository management',
80 registrar.command.CATEGORY_COMMITTING: b'Change creation',
80 registrar.command.CATEGORY_COMMITTING: b'Change creation',
81 registrar.command.CATEGORY_CHANGE_NAVIGATION: b'Change navigation',
81 registrar.command.CATEGORY_CHANGE_NAVIGATION: b'Change navigation',
82 registrar.command.CATEGORY_CHANGE_MANAGEMENT: b'Change manipulation',
82 registrar.command.CATEGORY_CHANGE_MANAGEMENT: b'Change manipulation',
83 registrar.command.CATEGORY_CHANGE_ORGANIZATION: b'Change organization',
83 registrar.command.CATEGORY_CHANGE_ORGANIZATION: b'Change organization',
84 registrar.command.CATEGORY_WORKING_DIRECTORY: b'Working directory management',
84 registrar.command.CATEGORY_WORKING_DIRECTORY: b'Working directory management',
85 registrar.command.CATEGORY_FILE_CONTENTS: b'File content management',
85 registrar.command.CATEGORY_FILE_CONTENTS: b'File content management',
86 registrar.command.CATEGORY_IMPORT_EXPORT: b'Change import/export',
86 registrar.command.CATEGORY_IMPORT_EXPORT: b'Change import/export',
87 registrar.command.CATEGORY_MAINTENANCE: b'Repository maintenance',
87 registrar.command.CATEGORY_MAINTENANCE: b'Repository maintenance',
88 registrar.command.CATEGORY_HELP: b'Help',
88 registrar.command.CATEGORY_HELP: b'Help',
89 registrar.command.CATEGORY_MISC: b'Miscellaneous commands',
89 registrar.command.CATEGORY_MISC: b'Miscellaneous commands',
90 registrar.command.CATEGORY_NONE: b'Uncategorized commands',
90 registrar.command.CATEGORY_NONE: b'Uncategorized commands',
91 }
91 }
92
92
93 # Topic categories.
93 # Topic categories.
94 TOPIC_CATEGORY_IDS = b'ids'
94 TOPIC_CATEGORY_IDS = b'ids'
95 TOPIC_CATEGORY_OUTPUT = b'output'
95 TOPIC_CATEGORY_OUTPUT = b'output'
96 TOPIC_CATEGORY_CONFIG = b'config'
96 TOPIC_CATEGORY_CONFIG = b'config'
97 TOPIC_CATEGORY_CONCEPTS = b'concepts'
97 TOPIC_CATEGORY_CONCEPTS = b'concepts'
98 TOPIC_CATEGORY_MISC = b'misc'
98 TOPIC_CATEGORY_MISC = b'misc'
99 TOPIC_CATEGORY_NONE = b'none'
99 TOPIC_CATEGORY_NONE = b'none'
100
100
101 # The order in which topic categories will be displayed.
101 # The order in which topic categories will be displayed.
102 # Extensions with custom categories should insert them into this list
102 # Extensions with custom categories should insert them into this list
103 # after/before the appropriate item, rather than replacing the list or
103 # after/before the appropriate item, rather than replacing the list or
104 # assuming absolute positions.
104 # assuming absolute positions.
105 TOPIC_CATEGORY_ORDER = [
105 TOPIC_CATEGORY_ORDER = [
106 TOPIC_CATEGORY_IDS,
106 TOPIC_CATEGORY_IDS,
107 TOPIC_CATEGORY_OUTPUT,
107 TOPIC_CATEGORY_OUTPUT,
108 TOPIC_CATEGORY_CONFIG,
108 TOPIC_CATEGORY_CONFIG,
109 TOPIC_CATEGORY_CONCEPTS,
109 TOPIC_CATEGORY_CONCEPTS,
110 TOPIC_CATEGORY_MISC,
110 TOPIC_CATEGORY_MISC,
111 TOPIC_CATEGORY_NONE,
111 TOPIC_CATEGORY_NONE,
112 ]
112 ]
113
113
114 # Human-readable topic category names. These are translated.
114 # Human-readable topic category names. These are translated.
115 TOPIC_CATEGORY_NAMES = {
115 TOPIC_CATEGORY_NAMES = {
116 TOPIC_CATEGORY_IDS: b'Mercurial identifiers',
116 TOPIC_CATEGORY_IDS: b'Mercurial identifiers',
117 TOPIC_CATEGORY_OUTPUT: b'Mercurial output',
117 TOPIC_CATEGORY_OUTPUT: b'Mercurial output',
118 TOPIC_CATEGORY_CONFIG: b'Mercurial configuration',
118 TOPIC_CATEGORY_CONFIG: b'Mercurial configuration',
119 TOPIC_CATEGORY_CONCEPTS: b'Concepts',
119 TOPIC_CATEGORY_CONCEPTS: b'Concepts',
120 TOPIC_CATEGORY_MISC: b'Miscellaneous',
120 TOPIC_CATEGORY_MISC: b'Miscellaneous',
121 TOPIC_CATEGORY_NONE: b'Uncategorized topics',
121 TOPIC_CATEGORY_NONE: b'Uncategorized topics',
122 }
122 }
123
123
124
124
125 def listexts(header, exts, indent=1, showdeprecated=False):
125 def listexts(header, exts, indent=1, showdeprecated=False):
126 '''return a text listing of the given extensions'''
126 '''return a text listing of the given extensions'''
127 rst = []
127 rst = []
128 if exts:
128 if exts:
129 for name, desc in sorted(pycompat.iteritems(exts)):
129 for name, desc in sorted(pycompat.iteritems(exts)):
130 if not showdeprecated and any(w in desc for w in _exclkeywords):
130 if not showdeprecated and any(w in desc for w in _exclkeywords):
131 continue
131 continue
132 rst.append(b'%s:%s: %s\n' % (b' ' * indent, name, desc))
132 rst.append(b'%s:%s: %s\n' % (b' ' * indent, name, desc))
133 if rst:
133 if rst:
134 rst.insert(0, b'\n%s\n\n' % header)
134 rst.insert(0, b'\n%s\n\n' % header)
135 return rst
135 return rst
136
136
137
137
138 def extshelp(ui):
138 def extshelp(ui):
139 rst = loaddoc(b'extensions')(ui).splitlines(True)
139 rst = loaddoc(b'extensions')(ui).splitlines(True)
140 rst.extend(
140 rst.extend(
141 listexts(
141 listexts(
142 _(b'enabled extensions:'), extensions.enabled(), showdeprecated=True
142 _(b'enabled extensions:'), extensions.enabled(), showdeprecated=True
143 )
143 )
144 )
144 )
145 rst.extend(
145 rst.extend(
146 listexts(
146 listexts(
147 _(b'disabled extensions:'),
147 _(b'disabled extensions:'),
148 extensions.disabled(),
148 extensions.disabled(),
149 showdeprecated=ui.verbose,
149 showdeprecated=ui.verbose,
150 )
150 )
151 )
151 )
152 doc = b''.join(rst)
152 doc = b''.join(rst)
153 return doc
153 return doc
154
154
155
155
156 def parsedefaultmarker(text):
156 def parsedefaultmarker(text):
157 """given a text 'abc (DEFAULT: def.ghi)',
157 """given a text 'abc (DEFAULT: def.ghi)',
158 returns (b'abc', (b'def', b'ghi')). Otherwise return None"""
158 returns (b'abc', (b'def', b'ghi')). Otherwise return None"""
159 if text[-1:] == b')':
159 if text[-1:] == b')':
160 marker = b' (DEFAULT: '
160 marker = b' (DEFAULT: '
161 pos = text.find(marker)
161 pos = text.find(marker)
162 if pos >= 0:
162 if pos >= 0:
163 item = text[pos + len(marker) : -1]
163 item = text[pos + len(marker) : -1]
164 return text[:pos], item.split(b'.', 2)
164 return text[:pos], item.split(b'.', 2)
165
165
166
166
167 def optrst(header, options, verbose, ui):
167 def optrst(header, options, verbose, ui):
168 data = []
168 data = []
169 multioccur = False
169 multioccur = False
170 for option in options:
170 for option in options:
171 if len(option) == 5:
171 if len(option) == 5:
172 shortopt, longopt, default, desc, optlabel = option
172 shortopt, longopt, default, desc, optlabel = option
173 else:
173 else:
174 shortopt, longopt, default, desc = option
174 shortopt, longopt, default, desc = option
175 optlabel = _(b"VALUE") # default label
175 optlabel = _(b"VALUE") # default label
176
176
177 if not verbose and any(w in desc for w in _exclkeywords):
177 if not verbose and any(w in desc for w in _exclkeywords):
178 continue
178 continue
179 defaultstrsuffix = b''
179 defaultstrsuffix = b''
180 if default is None:
180 if default is None:
181 parseresult = parsedefaultmarker(desc)
181 parseresult = parsedefaultmarker(desc)
182 if parseresult is not None:
182 if parseresult is not None:
183 (desc, (section, name)) = parseresult
183 (desc, (section, name)) = parseresult
184 if ui.configbool(section, name):
184 if ui.configbool(section, name):
185 default = True
185 default = True
186 defaultstrsuffix = _(b' from config')
186 defaultstrsuffix = _(b' from config')
187 so = b''
187 so = b''
188 if shortopt:
188 if shortopt:
189 so = b'-' + shortopt
189 so = b'-' + shortopt
190 lo = b'--' + longopt
190 lo = b'--' + longopt
191 if default is True:
191 if default is True:
192 lo = b'--[no-]' + longopt
192 lo = b'--[no-]' + longopt
193
193
194 if isinstance(default, fancyopts.customopt):
194 if isinstance(default, fancyopts.customopt):
195 default = default.getdefaultvalue()
195 default = default.getdefaultvalue()
196 if default and not callable(default):
196 if default and not callable(default):
197 # default is of unknown type, and in Python 2 we abused
197 # default is of unknown type, and in Python 2 we abused
198 # the %s-shows-repr property to handle integers etc. To
198 # the %s-shows-repr property to handle integers etc. To
199 # match that behavior on Python 3, we do str(default) and
199 # match that behavior on Python 3, we do str(default) and
200 # then convert it to bytes.
200 # then convert it to bytes.
201 defaultstr = pycompat.bytestr(default)
201 defaultstr = pycompat.bytestr(default)
202 if default is True:
202 if default is True:
203 defaultstr = _(b"on")
203 defaultstr = _(b"on")
204 desc += _(b" (default: %s)") % (defaultstr + defaultstrsuffix)
204 desc += _(b" (default: %s)") % (defaultstr + defaultstrsuffix)
205
205
206 if isinstance(default, list):
206 if isinstance(default, list):
207 lo += b" %s [+]" % optlabel
207 lo += b" %s [+]" % optlabel
208 multioccur = True
208 multioccur = True
209 elif (default is not None) and not isinstance(default, bool):
209 elif (default is not None) and not isinstance(default, bool):
210 lo += b" %s" % optlabel
210 lo += b" %s" % optlabel
211
211
212 data.append((so, lo, desc))
212 data.append((so, lo, desc))
213
213
214 if multioccur:
214 if multioccur:
215 header += _(b" ([+] can be repeated)")
215 header += _(b" ([+] can be repeated)")
216
216
217 rst = [b'\n%s:\n\n' % header]
217 rst = [b'\n%s:\n\n' % header]
218 rst.extend(minirst.maketable(data, 1))
218 rst.extend(minirst.maketable(data, 1))
219
219
220 return b''.join(rst)
220 return b''.join(rst)
221
221
222
222
223 def indicateomitted(rst, omitted, notomitted=None):
223 def indicateomitted(rst, omitted, notomitted=None):
224 rst.append(b'\n\n.. container:: omitted\n\n %s\n\n' % omitted)
224 rst.append(b'\n\n.. container:: omitted\n\n %s\n\n' % omitted)
225 if notomitted:
225 if notomitted:
226 rst.append(b'\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
226 rst.append(b'\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
227
227
228
228
229 def filtercmd(ui, cmd, func, kw, doc):
229 def filtercmd(ui, cmd, func, kw, doc):
230 if not ui.debugflag and cmd.startswith(b"debug") and kw != b"debug":
230 if not ui.debugflag and cmd.startswith(b"debug") and kw != b"debug":
231 # Debug command, and user is not looking for those.
231 # Debug command, and user is not looking for those.
232 return True
232 return True
233 if not ui.verbose:
233 if not ui.verbose:
234 if not kw and not doc:
234 if not kw and not doc:
235 # Command had no documentation, no point in showing it by default.
235 # Command had no documentation, no point in showing it by default.
236 return True
236 return True
237 if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False):
237 if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False):
238 # Alias didn't have its own documentation.
238 # Alias didn't have its own documentation.
239 return True
239 return True
240 if doc and any(w in doc for w in _exclkeywords):
240 if doc and any(w in doc for w in _exclkeywords):
241 # Documentation has excluded keywords.
241 # Documentation has excluded keywords.
242 return True
242 return True
243 if kw == b"shortlist" and not getattr(func, 'helpbasic', False):
243 if kw == b"shortlist" and not getattr(func, 'helpbasic', False):
244 # We're presenting the short list but the command is not basic.
244 # We're presenting the short list but the command is not basic.
245 return True
245 return True
246 if ui.configbool(b'help', b'hidden-command.%s' % cmd):
246 if ui.configbool(b'help', b'hidden-command.%s' % cmd):
247 # Configuration explicitly hides the command.
247 # Configuration explicitly hides the command.
248 return True
248 return True
249 return False
249 return False
250
250
251
251
252 def filtertopic(ui, topic):
252 def filtertopic(ui, topic):
253 return ui.configbool(b'help', b'hidden-topic.%s' % topic, False)
253 return ui.configbool(b'help', b'hidden-topic.%s' % topic, False)
254
254
255
255
256 def topicmatch(ui, commands, kw):
256 def topicmatch(ui, commands, kw):
257 """Return help topics matching kw.
257 """Return help topics matching kw.
258
258
259 Returns {'section': [(name, summary), ...], ...} where section is
259 Returns {'section': [(name, summary), ...], ...} where section is
260 one of topics, commands, extensions, or extensioncommands.
260 one of topics, commands, extensions, or extensioncommands.
261 """
261 """
262 kw = encoding.lower(kw)
262 kw = encoding.lower(kw)
263
263
264 def lowercontains(container):
264 def lowercontains(container):
265 return kw in encoding.lower(container) # translated in helptable
265 return kw in encoding.lower(container) # translated in helptable
266
266
267 results = {
267 results = {
268 b'topics': [],
268 b'topics': [],
269 b'commands': [],
269 b'commands': [],
270 b'extensions': [],
270 b'extensions': [],
271 b'extensioncommands': [],
271 b'extensioncommands': [],
272 }
272 }
273 for topic in helptable:
273 for topic in helptable:
274 names, header, doc = topic[0:3]
274 names, header, doc = topic[0:3]
275 # Old extensions may use a str as doc.
275 # Old extensions may use a str as doc.
276 if (
276 if (
277 sum(map(lowercontains, names))
277 sum(map(lowercontains, names))
278 or lowercontains(header)
278 or lowercontains(header)
279 or (callable(doc) and lowercontains(doc(ui)))
279 or (callable(doc) and lowercontains(doc(ui)))
280 ):
280 ):
281 name = names[0]
281 name = names[0]
282 if not filtertopic(ui, name):
282 if not filtertopic(ui, name):
283 results[b'topics'].append((names[0], header))
283 results[b'topics'].append((names[0], header))
284 for cmd, entry in pycompat.iteritems(commands.table):
284 for cmd, entry in pycompat.iteritems(commands.table):
285 if len(entry) == 3:
285 if len(entry) == 3:
286 summary = entry[2]
286 summary = entry[2]
287 else:
287 else:
288 summary = b''
288 summary = b''
289 # translate docs *before* searching there
289 # translate docs *before* searching there
290 func = entry[0]
290 func = entry[0]
291 docs = _(pycompat.getdoc(func)) or b''
291 docs = _(pycompat.getdoc(func)) or b''
292 if kw in cmd or lowercontains(summary) or lowercontains(docs):
292 if kw in cmd or lowercontains(summary) or lowercontains(docs):
293 doclines = docs.splitlines()
293 doclines = docs.splitlines()
294 if doclines:
294 if doclines:
295 summary = doclines[0]
295 summary = doclines[0]
296 cmdname = cmdutil.parsealiases(cmd)[0]
296 cmdname = cmdutil.parsealiases(cmd)[0]
297 if filtercmd(ui, cmdname, func, kw, docs):
297 if filtercmd(ui, cmdname, func, kw, docs):
298 continue
298 continue
299 results[b'commands'].append((cmdname, summary))
299 results[b'commands'].append((cmdname, summary))
300 for name, docs in itertools.chain(
300 for name, docs in itertools.chain(
301 pycompat.iteritems(extensions.enabled(False)),
301 pycompat.iteritems(extensions.enabled(False)),
302 pycompat.iteritems(extensions.disabled()),
302 pycompat.iteritems(extensions.disabled()),
303 ):
303 ):
304 if not docs:
304 if not docs:
305 continue
305 continue
306 name = name.rpartition(b'.')[-1]
306 name = name.rpartition(b'.')[-1]
307 if lowercontains(name) or lowercontains(docs):
307 if lowercontains(name) or lowercontains(docs):
308 # extension docs are already translated
308 # extension docs are already translated
309 results[b'extensions'].append((name, docs.splitlines()[0]))
309 results[b'extensions'].append((name, docs.splitlines()[0]))
310 try:
310 try:
311 mod = extensions.load(ui, name, b'')
311 mod = extensions.load(ui, name, b'')
312 except ImportError:
312 except ImportError:
313 # debug message would be printed in extensions.load()
313 # debug message would be printed in extensions.load()
314 continue
314 continue
315 for cmd, entry in pycompat.iteritems(getattr(mod, 'cmdtable', {})):
315 for cmd, entry in pycompat.iteritems(getattr(mod, 'cmdtable', {})):
316 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
316 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
317 cmdname = cmdutil.parsealiases(cmd)[0]
317 cmdname = cmdutil.parsealiases(cmd)[0]
318 func = entry[0]
318 func = entry[0]
319 cmddoc = pycompat.getdoc(func)
319 cmddoc = pycompat.getdoc(func)
320 if cmddoc:
320 if cmddoc:
321 cmddoc = gettext(cmddoc).splitlines()[0]
321 cmddoc = gettext(cmddoc).splitlines()[0]
322 else:
322 else:
323 cmddoc = _(b'(no help text available)')
323 cmddoc = _(b'(no help text available)')
324 if filtercmd(ui, cmdname, func, kw, cmddoc):
324 if filtercmd(ui, cmdname, func, kw, cmddoc):
325 continue
325 continue
326 results[b'extensioncommands'].append((cmdname, cmddoc))
326 results[b'extensioncommands'].append((cmdname, cmddoc))
327 return results
327 return results
328
328
329
329
330 def loaddoc(topic, subdir=None):
330 def loaddoc(topic, subdir=None):
331 """Return a delayed loader for help/topic.txt."""
331 """Return a delayed loader for help/topic.txt."""
332
332
333 def loader(ui):
333 def loader(ui):
334 package = b'mercurial.helptext'
334 package = b'mercurial.helptext'
335 if subdir:
335 if subdir:
336 package += b'.' + subdir
336 package += b'.' + subdir
337 with resourceutil.open_resource(package, topic + b'.txt') as fp:
337 with resourceutil.open_resource(package, topic + b'.txt') as fp:
338 doc = gettext(fp.read())
338 doc = gettext(fp.read())
339 for rewriter in helphooks.get(topic, []):
339 for rewriter in helphooks.get(topic, []):
340 doc = rewriter(ui, topic, doc)
340 doc = rewriter(ui, topic, doc)
341 return doc
341 return doc
342
342
343 return loader
343 return loader
344
344
345
345
346 internalstable = sorted(
346 internalstable = sorted(
347 [
347 [
348 (
348 (
349 [b'bid-merge'],
349 [b'bid-merge'],
350 _(b'Bid Merge Algorithm'),
350 _(b'Bid Merge Algorithm'),
351 loaddoc(b'bid-merge', subdir=b'internals'),
351 loaddoc(b'bid-merge', subdir=b'internals'),
352 ),
352 ),
353 ([b'bundle2'], _(b'Bundle2'), loaddoc(b'bundle2', subdir=b'internals')),
353 ([b'bundle2'], _(b'Bundle2'), loaddoc(b'bundle2', subdir=b'internals')),
354 ([b'bundles'], _(b'Bundles'), loaddoc(b'bundles', subdir=b'internals')),
354 ([b'bundles'], _(b'Bundles'), loaddoc(b'bundles', subdir=b'internals')),
355 ([b'cbor'], _(b'CBOR'), loaddoc(b'cbor', subdir=b'internals')),
355 ([b'cbor'], _(b'CBOR'), loaddoc(b'cbor', subdir=b'internals')),
356 ([b'censor'], _(b'Censor'), loaddoc(b'censor', subdir=b'internals')),
356 ([b'censor'], _(b'Censor'), loaddoc(b'censor', subdir=b'internals')),
357 (
357 (
358 [b'changegroups'],
358 [b'changegroups'],
359 _(b'Changegroups'),
359 _(b'Changegroups'),
360 loaddoc(b'changegroups', subdir=b'internals'),
360 loaddoc(b'changegroups', subdir=b'internals'),
361 ),
361 ),
362 (
362 (
363 [b'config'],
363 [b'config'],
364 _(b'Config Registrar'),
364 _(b'Config Registrar'),
365 loaddoc(b'config', subdir=b'internals'),
365 loaddoc(b'config', subdir=b'internals'),
366 ),
366 ),
367 (
367 (
368 [b'dirstate-v2'],
368 [b'dirstate-v2'],
369 _(b'dirstate-v2 file format'),
369 _(b'dirstate-v2 file format'),
370 loaddoc(b'dirstate-v2', subdir=b'internals'),
370 loaddoc(b'dirstate-v2', subdir=b'internals'),
371 ),
371 ),
372 (
372 (
373 [b'extensions', b'extension'],
373 [b'extensions', b'extension'],
374 _(b'Extension API'),
374 _(b'Extension API'),
375 loaddoc(b'extensions', subdir=b'internals'),
375 loaddoc(b'extensions', subdir=b'internals'),
376 ),
376 ),
377 (
377 (
378 [b'mergestate'],
378 [b'mergestate'],
379 _(b'Mergestate'),
379 _(b'Mergestate'),
380 loaddoc(b'mergestate', subdir=b'internals'),
380 loaddoc(b'mergestate', subdir=b'internals'),
381 ),
381 ),
382 (
382 (
383 [b'requirements'],
383 [b'requirements'],
384 _(b'Repository Requirements'),
384 _(b'Repository Requirements'),
385 loaddoc(b'requirements', subdir=b'internals'),
385 loaddoc(b'requirements', subdir=b'internals'),
386 ),
386 ),
387 (
387 (
388 [b'revlogs'],
388 [b'revlogs'],
389 _(b'Revision Logs'),
389 _(b'Revision Logs'),
390 loaddoc(b'revlogs', subdir=b'internals'),
390 loaddoc(b'revlogs', subdir=b'internals'),
391 ),
391 ),
392 (
392 (
393 [b'wireprotocol'],
393 [b'wireprotocol'],
394 _(b'Wire Protocol'),
394 _(b'Wire Protocol'),
395 loaddoc(b'wireprotocol', subdir=b'internals'),
395 loaddoc(b'wireprotocol', subdir=b'internals'),
396 ),
396 ),
397 (
397 (
398 [b'wireprotocolrpc'],
398 [b'wireprotocolrpc'],
399 _(b'Wire Protocol RPC'),
399 _(b'Wire Protocol RPC'),
400 loaddoc(b'wireprotocolrpc', subdir=b'internals'),
400 loaddoc(b'wireprotocolrpc', subdir=b'internals'),
401 ),
401 ),
402 (
402 (
403 [b'wireprotocolv2'],
403 [b'wireprotocolv2'],
404 _(b'Wire Protocol Version 2'),
404 _(b'Wire Protocol Version 2'),
405 loaddoc(b'wireprotocolv2', subdir=b'internals'),
405 loaddoc(b'wireprotocolv2', subdir=b'internals'),
406 ),
406 ),
407 ]
407 ]
408 )
408 )
409
409
410
410
411 def internalshelp(ui):
411 def internalshelp(ui):
412 """Generate the index for the "internals" topic."""
412 """Generate the index for the "internals" topic."""
413 lines = [
413 lines = [
414 b'To access a subtopic, use "hg help internals.{subtopic-name}"\n',
414 b'To access a subtopic, use "hg help internals.{subtopic-name}"\n',
415 b'\n',
415 b'\n',
416 ]
416 ]
417 for names, header, doc in internalstable:
417 for names, header, doc in internalstable:
418 lines.append(b' :%s: %s\n' % (names[0], header))
418 lines.append(b' :%s: %s\n' % (names[0], header))
419
419
420 return b''.join(lines)
420 return b''.join(lines)
421
421
422
422
423 helptable = sorted(
423 helptable = sorted(
424 [
424 [
425 (
425 (
426 [b'bundlespec'],
426 [b'bundlespec'],
427 _(b"Bundle File Formats"),
427 _(b"Bundle File Formats"),
428 loaddoc(b'bundlespec'),
428 loaddoc(b'bundlespec'),
429 TOPIC_CATEGORY_CONCEPTS,
429 TOPIC_CATEGORY_CONCEPTS,
430 ),
430 ),
431 (
431 (
432 [b'color'],
432 [b'color'],
433 _(b"Colorizing Outputs"),
433 _(b"Colorizing Outputs"),
434 loaddoc(b'color'),
434 loaddoc(b'color'),
435 TOPIC_CATEGORY_OUTPUT,
435 TOPIC_CATEGORY_OUTPUT,
436 ),
436 ),
437 (
437 (
438 [b"config", b"hgrc"],
438 [b"config", b"hgrc"],
439 _(b"Configuration Files"),
439 _(b"Configuration Files"),
440 loaddoc(b'config'),
440 loaddoc(b'config'),
441 TOPIC_CATEGORY_CONFIG,
441 TOPIC_CATEGORY_CONFIG,
442 ),
442 ),
443 (
443 (
444 [b'deprecated'],
444 [b'deprecated'],
445 _(b"Deprecated Features"),
445 _(b"Deprecated Features"),
446 loaddoc(b'deprecated'),
446 loaddoc(b'deprecated'),
447 TOPIC_CATEGORY_MISC,
447 TOPIC_CATEGORY_MISC,
448 ),
448 ),
449 (
449 (
450 [b"dates"],
450 [b"dates"],
451 _(b"Date Formats"),
451 _(b"Date Formats"),
452 loaddoc(b'dates'),
452 loaddoc(b'dates'),
453 TOPIC_CATEGORY_OUTPUT,
453 TOPIC_CATEGORY_OUTPUT,
454 ),
454 ),
455 (
455 (
456 [b"flags"],
456 [b"flags"],
457 _(b"Command-line flags"),
457 _(b"Command-line flags"),
458 loaddoc(b'flags'),
458 loaddoc(b'flags'),
459 TOPIC_CATEGORY_CONFIG,
459 TOPIC_CATEGORY_CONFIG,
460 ),
460 ),
461 (
461 (
462 [b"patterns"],
462 [b"patterns"],
463 _(b"File Name Patterns"),
463 _(b"File Name Patterns"),
464 loaddoc(b'patterns'),
464 loaddoc(b'patterns'),
465 TOPIC_CATEGORY_IDS,
465 TOPIC_CATEGORY_IDS,
466 ),
466 ),
467 (
467 (
468 [b'environment', b'env'],
468 [b'environment', b'env'],
469 _(b'Environment Variables'),
469 _(b'Environment Variables'),
470 loaddoc(b'environment'),
470 loaddoc(b'environment'),
471 TOPIC_CATEGORY_CONFIG,
471 TOPIC_CATEGORY_CONFIG,
472 ),
472 ),
473 (
473 (
474 [
474 [
475 b'revisions',
475 b'revisions',
476 b'revs',
476 b'revs',
477 b'revsets',
477 b'revsets',
478 b'revset',
478 b'revset',
479 b'multirevs',
479 b'multirevs',
480 b'mrevs',
480 b'mrevs',
481 ],
481 ],
482 _(b'Specifying Revisions'),
482 _(b'Specifying Revisions'),
483 loaddoc(b'revisions'),
483 loaddoc(b'revisions'),
484 TOPIC_CATEGORY_IDS,
484 TOPIC_CATEGORY_IDS,
485 ),
485 ),
486 (
486 (
487 [
488 b'rust',
489 b'rustext',
490 ],
491 _(b'Rust in Mercurial'),
492 loaddoc(b'rust'),
493 TOPIC_CATEGORY_CONFIG,
494 ),
495 (
487 [b'filesets', b'fileset'],
496 [b'filesets', b'fileset'],
488 _(b"Specifying File Sets"),
497 _(b"Specifying File Sets"),
489 loaddoc(b'filesets'),
498 loaddoc(b'filesets'),
490 TOPIC_CATEGORY_IDS,
499 TOPIC_CATEGORY_IDS,
491 ),
500 ),
492 (
501 (
493 [b'diffs'],
502 [b'diffs'],
494 _(b'Diff Formats'),
503 _(b'Diff Formats'),
495 loaddoc(b'diffs'),
504 loaddoc(b'diffs'),
496 TOPIC_CATEGORY_OUTPUT,
505 TOPIC_CATEGORY_OUTPUT,
497 ),
506 ),
498 (
507 (
499 [b'merge-tools', b'mergetools', b'mergetool'],
508 [b'merge-tools', b'mergetools', b'mergetool'],
500 _(b'Merge Tools'),
509 _(b'Merge Tools'),
501 loaddoc(b'merge-tools'),
510 loaddoc(b'merge-tools'),
502 TOPIC_CATEGORY_CONFIG,
511 TOPIC_CATEGORY_CONFIG,
503 ),
512 ),
504 (
513 (
505 [b'templating', b'templates', b'template', b'style'],
514 [b'templating', b'templates', b'template', b'style'],
506 _(b'Template Usage'),
515 _(b'Template Usage'),
507 loaddoc(b'templates'),
516 loaddoc(b'templates'),
508 TOPIC_CATEGORY_OUTPUT,
517 TOPIC_CATEGORY_OUTPUT,
509 ),
518 ),
510 ([b'urls'], _(b'URL Paths'), loaddoc(b'urls'), TOPIC_CATEGORY_IDS),
519 ([b'urls'], _(b'URL Paths'), loaddoc(b'urls'), TOPIC_CATEGORY_IDS),
511 (
520 (
512 [b"extensions"],
521 [b"extensions"],
513 _(b"Using Additional Features"),
522 _(b"Using Additional Features"),
514 extshelp,
523 extshelp,
515 TOPIC_CATEGORY_CONFIG,
524 TOPIC_CATEGORY_CONFIG,
516 ),
525 ),
517 (
526 (
518 [b"subrepos", b"subrepo"],
527 [b"subrepos", b"subrepo"],
519 _(b"Subrepositories"),
528 _(b"Subrepositories"),
520 loaddoc(b'subrepos'),
529 loaddoc(b'subrepos'),
521 TOPIC_CATEGORY_CONCEPTS,
530 TOPIC_CATEGORY_CONCEPTS,
522 ),
531 ),
523 (
532 (
524 [b"hgweb"],
533 [b"hgweb"],
525 _(b"Configuring hgweb"),
534 _(b"Configuring hgweb"),
526 loaddoc(b'hgweb'),
535 loaddoc(b'hgweb'),
527 TOPIC_CATEGORY_CONFIG,
536 TOPIC_CATEGORY_CONFIG,
528 ),
537 ),
529 (
538 (
530 [b"glossary"],
539 [b"glossary"],
531 _(b"Glossary"),
540 _(b"Glossary"),
532 loaddoc(b'glossary'),
541 loaddoc(b'glossary'),
533 TOPIC_CATEGORY_CONCEPTS,
542 TOPIC_CATEGORY_CONCEPTS,
534 ),
543 ),
535 (
544 (
536 [b"hgignore", b"ignore"],
545 [b"hgignore", b"ignore"],
537 _(b"Syntax for Mercurial Ignore Files"),
546 _(b"Syntax for Mercurial Ignore Files"),
538 loaddoc(b'hgignore'),
547 loaddoc(b'hgignore'),
539 TOPIC_CATEGORY_IDS,
548 TOPIC_CATEGORY_IDS,
540 ),
549 ),
541 (
550 (
542 [b"phases"],
551 [b"phases"],
543 _(b"Working with Phases"),
552 _(b"Working with Phases"),
544 loaddoc(b'phases'),
553 loaddoc(b'phases'),
545 TOPIC_CATEGORY_CONCEPTS,
554 TOPIC_CATEGORY_CONCEPTS,
546 ),
555 ),
547 (
556 (
548 [b"evolution"],
557 [b"evolution"],
549 _(b"Safely rewriting history (EXPERIMENTAL)"),
558 _(b"Safely rewriting history (EXPERIMENTAL)"),
550 loaddoc(b'evolution'),
559 loaddoc(b'evolution'),
551 TOPIC_CATEGORY_CONCEPTS,
560 TOPIC_CATEGORY_CONCEPTS,
552 ),
561 ),
553 (
562 (
554 [b'scripting'],
563 [b'scripting'],
555 _(b'Using Mercurial from scripts and automation'),
564 _(b'Using Mercurial from scripts and automation'),
556 loaddoc(b'scripting'),
565 loaddoc(b'scripting'),
557 TOPIC_CATEGORY_MISC,
566 TOPIC_CATEGORY_MISC,
558 ),
567 ),
559 (
568 (
560 [b'internals'],
569 [b'internals'],
561 _(b"Technical implementation topics"),
570 _(b"Technical implementation topics"),
562 internalshelp,
571 internalshelp,
563 TOPIC_CATEGORY_MISC,
572 TOPIC_CATEGORY_MISC,
564 ),
573 ),
565 (
574 (
566 [b'pager'],
575 [b'pager'],
567 _(b"Pager Support"),
576 _(b"Pager Support"),
568 loaddoc(b'pager'),
577 loaddoc(b'pager'),
569 TOPIC_CATEGORY_CONFIG,
578 TOPIC_CATEGORY_CONFIG,
570 ),
579 ),
571 ]
580 ]
572 )
581 )
573
582
574 # Maps topics with sub-topics to a list of their sub-topics.
583 # Maps topics with sub-topics to a list of their sub-topics.
575 subtopics = {
584 subtopics = {
576 b'internals': internalstable,
585 b'internals': internalstable,
577 }
586 }
578
587
579 # Map topics to lists of callable taking the current topic help and
588 # Map topics to lists of callable taking the current topic help and
580 # returning the updated version
589 # returning the updated version
581 helphooks = {}
590 helphooks = {}
582
591
583
592
584 def addtopichook(topic, rewriter):
593 def addtopichook(topic, rewriter):
585 helphooks.setdefault(topic, []).append(rewriter)
594 helphooks.setdefault(topic, []).append(rewriter)
586
595
587
596
588 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
597 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
589 """Extract docstring from the items key to function mapping, build a
598 """Extract docstring from the items key to function mapping, build a
590 single documentation block and use it to overwrite the marker in doc.
599 single documentation block and use it to overwrite the marker in doc.
591 """
600 """
592 entries = []
601 entries = []
593 for name in sorted(items):
602 for name in sorted(items):
594 text = (pycompat.getdoc(items[name]) or b'').rstrip()
603 text = (pycompat.getdoc(items[name]) or b'').rstrip()
595 if not text or not ui.verbose and any(w in text for w in _exclkeywords):
604 if not text or not ui.verbose and any(w in text for w in _exclkeywords):
596 continue
605 continue
597 text = gettext(text)
606 text = gettext(text)
598 if dedent:
607 if dedent:
599 # Abuse latin1 to use textwrap.dedent() on bytes.
608 # Abuse latin1 to use textwrap.dedent() on bytes.
600 text = textwrap.dedent(text.decode('latin1')).encode('latin1')
609 text = textwrap.dedent(text.decode('latin1')).encode('latin1')
601 lines = text.splitlines()
610 lines = text.splitlines()
602 doclines = [(lines[0])]
611 doclines = [(lines[0])]
603 for l in lines[1:]:
612 for l in lines[1:]:
604 # Stop once we find some Python doctest
613 # Stop once we find some Python doctest
605 if l.strip().startswith(b'>>>'):
614 if l.strip().startswith(b'>>>'):
606 break
615 break
607 if dedent:
616 if dedent:
608 doclines.append(l.rstrip())
617 doclines.append(l.rstrip())
609 else:
618 else:
610 doclines.append(b' ' + l.strip())
619 doclines.append(b' ' + l.strip())
611 entries.append(b'\n'.join(doclines))
620 entries.append(b'\n'.join(doclines))
612 entries = b'\n\n'.join(entries)
621 entries = b'\n\n'.join(entries)
613 return doc.replace(marker, entries)
622 return doc.replace(marker, entries)
614
623
615
624
616 def addtopicsymbols(topic, marker, symbols, dedent=False):
625 def addtopicsymbols(topic, marker, symbols, dedent=False):
617 def add(ui, topic, doc):
626 def add(ui, topic, doc):
618 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
627 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
619
628
620 addtopichook(topic, add)
629 addtopichook(topic, add)
621
630
622
631
623 addtopicsymbols(
632 addtopicsymbols(
624 b'bundlespec',
633 b'bundlespec',
625 b'.. bundlecompressionmarker',
634 b'.. bundlecompressionmarker',
626 compression.bundlecompressiontopics(),
635 compression.bundlecompressiontopics(),
627 )
636 )
628 addtopicsymbols(b'filesets', b'.. predicatesmarker', fileset.symbols)
637 addtopicsymbols(b'filesets', b'.. predicatesmarker', fileset.symbols)
629 addtopicsymbols(
638 addtopicsymbols(
630 b'merge-tools', b'.. internaltoolsmarker', filemerge.internalsdoc
639 b'merge-tools', b'.. internaltoolsmarker', filemerge.internalsdoc
631 )
640 )
632 addtopicsymbols(b'revisions', b'.. predicatesmarker', revset.symbols)
641 addtopicsymbols(b'revisions', b'.. predicatesmarker', revset.symbols)
633 addtopicsymbols(b'templates', b'.. keywordsmarker', templatekw.keywords)
642 addtopicsymbols(b'templates', b'.. keywordsmarker', templatekw.keywords)
634 addtopicsymbols(b'templates', b'.. filtersmarker', templatefilters.filters)
643 addtopicsymbols(b'templates', b'.. filtersmarker', templatefilters.filters)
635 addtopicsymbols(b'templates', b'.. functionsmarker', templatefuncs.funcs)
644 addtopicsymbols(b'templates', b'.. functionsmarker', templatefuncs.funcs)
636 addtopicsymbols(
645 addtopicsymbols(
637 b'hgweb', b'.. webcommandsmarker', webcommands.commands, dedent=True
646 b'hgweb', b'.. webcommandsmarker', webcommands.commands, dedent=True
638 )
647 )
639
648
640
649
641 def inserttweakrc(ui, topic, doc):
650 def inserttweakrc(ui, topic, doc):
642 marker = b'.. tweakdefaultsmarker'
651 marker = b'.. tweakdefaultsmarker'
643 repl = uimod.tweakrc
652 repl = uimod.tweakrc
644
653
645 def sub(m):
654 def sub(m):
646 lines = [m.group(1) + s for s in repl.splitlines()]
655 lines = [m.group(1) + s for s in repl.splitlines()]
647 return b'\n'.join(lines)
656 return b'\n'.join(lines)
648
657
649 return re.sub(br'( *)%s' % re.escape(marker), sub, doc)
658 return re.sub(br'( *)%s' % re.escape(marker), sub, doc)
650
659
651
660
652 def _getcategorizedhelpcmds(ui, cmdtable, name, select=None):
661 def _getcategorizedhelpcmds(ui, cmdtable, name, select=None):
653 # Category -> list of commands
662 # Category -> list of commands
654 cats = {}
663 cats = {}
655 # Command -> short description
664 # Command -> short description
656 h = {}
665 h = {}
657 # Command -> string showing synonyms
666 # Command -> string showing synonyms
658 syns = {}
667 syns = {}
659 for c, e in pycompat.iteritems(cmdtable):
668 for c, e in pycompat.iteritems(cmdtable):
660 fs = cmdutil.parsealiases(c)
669 fs = cmdutil.parsealiases(c)
661 f = fs[0]
670 f = fs[0]
662 syns[f] = fs
671 syns[f] = fs
663 func = e[0]
672 func = e[0]
664 if select and not select(f):
673 if select and not select(f):
665 continue
674 continue
666 doc = pycompat.getdoc(func)
675 doc = pycompat.getdoc(func)
667 if filtercmd(ui, f, func, name, doc):
676 if filtercmd(ui, f, func, name, doc):
668 continue
677 continue
669 doc = gettext(doc)
678 doc = gettext(doc)
670 if not doc:
679 if not doc:
671 doc = _(b"(no help text available)")
680 doc = _(b"(no help text available)")
672 h[f] = doc.splitlines()[0].rstrip()
681 h[f] = doc.splitlines()[0].rstrip()
673
682
674 cat = getattr(func, 'helpcategory', None) or (
683 cat = getattr(func, 'helpcategory', None) or (
675 registrar.command.CATEGORY_NONE
684 registrar.command.CATEGORY_NONE
676 )
685 )
677 cats.setdefault(cat, []).append(f)
686 cats.setdefault(cat, []).append(f)
678 return cats, h, syns
687 return cats, h, syns
679
688
680
689
681 def _getcategorizedhelptopics(ui, topictable):
690 def _getcategorizedhelptopics(ui, topictable):
682 # Group commands by category.
691 # Group commands by category.
683 topiccats = {}
692 topiccats = {}
684 syns = {}
693 syns = {}
685 for topic in topictable:
694 for topic in topictable:
686 names, header, doc = topic[0:3]
695 names, header, doc = topic[0:3]
687 if len(topic) > 3 and topic[3]:
696 if len(topic) > 3 and topic[3]:
688 category = topic[3]
697 category = topic[3]
689 else:
698 else:
690 category = TOPIC_CATEGORY_NONE
699 category = TOPIC_CATEGORY_NONE
691
700
692 topicname = names[0]
701 topicname = names[0]
693 syns[topicname] = list(names)
702 syns[topicname] = list(names)
694 if not filtertopic(ui, topicname):
703 if not filtertopic(ui, topicname):
695 topiccats.setdefault(category, []).append((topicname, header))
704 topiccats.setdefault(category, []).append((topicname, header))
696 return topiccats, syns
705 return topiccats, syns
697
706
698
707
699 addtopichook(b'config', inserttweakrc)
708 addtopichook(b'config', inserttweakrc)
700
709
701
710
702 def help_(
711 def help_(
703 ui,
712 ui,
704 commands,
713 commands,
705 name,
714 name,
706 unknowncmd=False,
715 unknowncmd=False,
707 full=True,
716 full=True,
708 subtopic=None,
717 subtopic=None,
709 fullname=None,
718 fullname=None,
710 **opts
719 **opts
711 ):
720 ):
712 """
721 """
713 Generate the help for 'name' as unformatted restructured text. If
722 Generate the help for 'name' as unformatted restructured text. If
714 'name' is None, describe the commands available.
723 'name' is None, describe the commands available.
715 """
724 """
716
725
717 opts = pycompat.byteskwargs(opts)
726 opts = pycompat.byteskwargs(opts)
718
727
719 def helpcmd(name, subtopic=None):
728 def helpcmd(name, subtopic=None):
720 try:
729 try:
721 aliases, entry = cmdutil.findcmd(
730 aliases, entry = cmdutil.findcmd(
722 name, commands.table, strict=unknowncmd
731 name, commands.table, strict=unknowncmd
723 )
732 )
724 except error.AmbiguousCommand as inst:
733 except error.AmbiguousCommand as inst:
725 # py3 fix: except vars can't be used outside the scope of the
734 # py3 fix: except vars can't be used outside the scope of the
726 # except block, nor can be used inside a lambda. python issue4617
735 # except block, nor can be used inside a lambda. python issue4617
727 prefix = inst.prefix
736 prefix = inst.prefix
728 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix)
737 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix)
729 rst = helplist(select)
738 rst = helplist(select)
730 return rst
739 return rst
731
740
732 rst = []
741 rst = []
733
742
734 # check if it's an invalid alias and display its error if it is
743 # check if it's an invalid alias and display its error if it is
735 if getattr(entry[0], 'badalias', None):
744 if getattr(entry[0], 'badalias', None):
736 rst.append(entry[0].badalias + b'\n')
745 rst.append(entry[0].badalias + b'\n')
737 if entry[0].unknowncmd:
746 if entry[0].unknowncmd:
738 try:
747 try:
739 rst.extend(helpextcmd(entry[0].cmdname))
748 rst.extend(helpextcmd(entry[0].cmdname))
740 except error.UnknownCommand:
749 except error.UnknownCommand:
741 pass
750 pass
742 return rst
751 return rst
743
752
744 # synopsis
753 # synopsis
745 if len(entry) > 2:
754 if len(entry) > 2:
746 if entry[2].startswith(b'hg'):
755 if entry[2].startswith(b'hg'):
747 rst.append(b"%s\n" % entry[2])
756 rst.append(b"%s\n" % entry[2])
748 else:
757 else:
749 rst.append(b'hg %s %s\n' % (aliases[0], entry[2]))
758 rst.append(b'hg %s %s\n' % (aliases[0], entry[2]))
750 else:
759 else:
751 rst.append(b'hg %s\n' % aliases[0])
760 rst.append(b'hg %s\n' % aliases[0])
752 # aliases
761 # aliases
753 if full and not ui.quiet and len(aliases) > 1:
762 if full and not ui.quiet and len(aliases) > 1:
754 rst.append(_(b"\naliases: %s\n") % b', '.join(aliases[1:]))
763 rst.append(_(b"\naliases: %s\n") % b', '.join(aliases[1:]))
755 rst.append(b'\n')
764 rst.append(b'\n')
756
765
757 # description
766 # description
758 doc = gettext(pycompat.getdoc(entry[0]))
767 doc = gettext(pycompat.getdoc(entry[0]))
759 if not doc:
768 if not doc:
760 doc = _(b"(no help text available)")
769 doc = _(b"(no help text available)")
761 if util.safehasattr(entry[0], b'definition'): # aliased command
770 if util.safehasattr(entry[0], b'definition'): # aliased command
762 source = entry[0].source
771 source = entry[0].source
763 if entry[0].definition.startswith(b'!'): # shell alias
772 if entry[0].definition.startswith(b'!'): # shell alias
764 doc = _(b'shell alias for: %s\n\n%s\n\ndefined by: %s\n') % (
773 doc = _(b'shell alias for: %s\n\n%s\n\ndefined by: %s\n') % (
765 entry[0].definition[1:],
774 entry[0].definition[1:],
766 doc,
775 doc,
767 source,
776 source,
768 )
777 )
769 else:
778 else:
770 doc = _(b'alias for: hg %s\n\n%s\n\ndefined by: %s\n') % (
779 doc = _(b'alias for: hg %s\n\n%s\n\ndefined by: %s\n') % (
771 entry[0].definition,
780 entry[0].definition,
772 doc,
781 doc,
773 source,
782 source,
774 )
783 )
775 doc = doc.splitlines(True)
784 doc = doc.splitlines(True)
776 if ui.quiet or not full:
785 if ui.quiet or not full:
777 rst.append(doc[0])
786 rst.append(doc[0])
778 else:
787 else:
779 rst.extend(doc)
788 rst.extend(doc)
780 rst.append(b'\n')
789 rst.append(b'\n')
781
790
782 # check if this command shadows a non-trivial (multi-line)
791 # check if this command shadows a non-trivial (multi-line)
783 # extension help text
792 # extension help text
784 try:
793 try:
785 mod = extensions.find(name)
794 mod = extensions.find(name)
786 doc = gettext(pycompat.getdoc(mod)) or b''
795 doc = gettext(pycompat.getdoc(mod)) or b''
787 if b'\n' in doc.strip():
796 if b'\n' in doc.strip():
788 msg = _(
797 msg = _(
789 b"(use 'hg help -e %s' to show help for "
798 b"(use 'hg help -e %s' to show help for "
790 b"the %s extension)"
799 b"the %s extension)"
791 ) % (name, name)
800 ) % (name, name)
792 rst.append(b'\n%s\n' % msg)
801 rst.append(b'\n%s\n' % msg)
793 except KeyError:
802 except KeyError:
794 pass
803 pass
795
804
796 # options
805 # options
797 if not ui.quiet and entry[1]:
806 if not ui.quiet and entry[1]:
798 rst.append(optrst(_(b"options"), entry[1], ui.verbose, ui))
807 rst.append(optrst(_(b"options"), entry[1], ui.verbose, ui))
799
808
800 if ui.verbose:
809 if ui.verbose:
801 rst.append(
810 rst.append(
802 optrst(
811 optrst(
803 _(b"global options"), commands.globalopts, ui.verbose, ui
812 _(b"global options"), commands.globalopts, ui.verbose, ui
804 )
813 )
805 )
814 )
806
815
807 if not ui.verbose:
816 if not ui.verbose:
808 if not full:
817 if not full:
809 rst.append(_(b"\n(use 'hg %s -h' to show more help)\n") % name)
818 rst.append(_(b"\n(use 'hg %s -h' to show more help)\n") % name)
810 elif not ui.quiet:
819 elif not ui.quiet:
811 rst.append(
820 rst.append(
812 _(
821 _(
813 b'\n(some details hidden, use --verbose '
822 b'\n(some details hidden, use --verbose '
814 b'to show complete help)'
823 b'to show complete help)'
815 )
824 )
816 )
825 )
817
826
818 return rst
827 return rst
819
828
820 def helplist(select=None, **opts):
829 def helplist(select=None, **opts):
821 cats, h, syns = _getcategorizedhelpcmds(
830 cats, h, syns = _getcategorizedhelpcmds(
822 ui, commands.table, name, select
831 ui, commands.table, name, select
823 )
832 )
824
833
825 rst = []
834 rst = []
826 if not h:
835 if not h:
827 if not ui.quiet:
836 if not ui.quiet:
828 rst.append(_(b'no commands defined\n'))
837 rst.append(_(b'no commands defined\n'))
829 return rst
838 return rst
830
839
831 # Output top header.
840 # Output top header.
832 if not ui.quiet:
841 if not ui.quiet:
833 if name == b"shortlist":
842 if name == b"shortlist":
834 rst.append(_(b'basic commands:\n\n'))
843 rst.append(_(b'basic commands:\n\n'))
835 elif name == b"debug":
844 elif name == b"debug":
836 rst.append(_(b'debug commands (internal and unsupported):\n\n'))
845 rst.append(_(b'debug commands (internal and unsupported):\n\n'))
837 else:
846 else:
838 rst.append(_(b'list of commands:\n'))
847 rst.append(_(b'list of commands:\n'))
839
848
840 def appendcmds(cmds):
849 def appendcmds(cmds):
841 cmds = sorted(cmds)
850 cmds = sorted(cmds)
842 for c in cmds:
851 for c in cmds:
843 display_cmd = c
852 display_cmd = c
844 if ui.verbose:
853 if ui.verbose:
845 display_cmd = b', '.join(syns[c])
854 display_cmd = b', '.join(syns[c])
846 display_cmd = display_cmd.replace(b':', br'\:')
855 display_cmd = display_cmd.replace(b':', br'\:')
847 rst.append(b' :%s: %s\n' % (display_cmd, h[c]))
856 rst.append(b' :%s: %s\n' % (display_cmd, h[c]))
848
857
849 if name in (b'shortlist', b'debug'):
858 if name in (b'shortlist', b'debug'):
850 # List without categories.
859 # List without categories.
851 appendcmds(h)
860 appendcmds(h)
852 else:
861 else:
853 # Check that all categories have an order.
862 # Check that all categories have an order.
854 missing_order = set(cats.keys()) - set(CATEGORY_ORDER)
863 missing_order = set(cats.keys()) - set(CATEGORY_ORDER)
855 if missing_order:
864 if missing_order:
856 ui.develwarn(
865 ui.develwarn(
857 b'help categories missing from CATEGORY_ORDER: %s'
866 b'help categories missing from CATEGORY_ORDER: %s'
858 % missing_order
867 % missing_order
859 )
868 )
860
869
861 # List per category.
870 # List per category.
862 for cat in CATEGORY_ORDER:
871 for cat in CATEGORY_ORDER:
863 catfns = cats.get(cat, [])
872 catfns = cats.get(cat, [])
864 if catfns:
873 if catfns:
865 if len(cats) > 1:
874 if len(cats) > 1:
866 catname = gettext(CATEGORY_NAMES[cat])
875 catname = gettext(CATEGORY_NAMES[cat])
867 rst.append(b"\n%s:\n" % catname)
876 rst.append(b"\n%s:\n" % catname)
868 rst.append(b"\n")
877 rst.append(b"\n")
869 appendcmds(catfns)
878 appendcmds(catfns)
870
879
871 ex = opts.get
880 ex = opts.get
872 anyopts = ex('keyword') or not (ex('command') or ex('extension'))
881 anyopts = ex('keyword') or not (ex('command') or ex('extension'))
873 if not name and anyopts:
882 if not name and anyopts:
874 exts = listexts(
883 exts = listexts(
875 _(b'enabled extensions:'),
884 _(b'enabled extensions:'),
876 extensions.enabled(),
885 extensions.enabled(),
877 showdeprecated=ui.verbose,
886 showdeprecated=ui.verbose,
878 )
887 )
879 if exts:
888 if exts:
880 rst.append(b'\n')
889 rst.append(b'\n')
881 rst.extend(exts)
890 rst.extend(exts)
882
891
883 rst.append(_(b"\nadditional help topics:\n"))
892 rst.append(_(b"\nadditional help topics:\n"))
884 topiccats, topicsyns = _getcategorizedhelptopics(ui, helptable)
893 topiccats, topicsyns = _getcategorizedhelptopics(ui, helptable)
885
894
886 # Check that all categories have an order.
895 # Check that all categories have an order.
887 missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER)
896 missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER)
888 if missing_order:
897 if missing_order:
889 ui.develwarn(
898 ui.develwarn(
890 b'help categories missing from TOPIC_CATEGORY_ORDER: %s'
899 b'help categories missing from TOPIC_CATEGORY_ORDER: %s'
891 % missing_order
900 % missing_order
892 )
901 )
893
902
894 # Output topics per category.
903 # Output topics per category.
895 for cat in TOPIC_CATEGORY_ORDER:
904 for cat in TOPIC_CATEGORY_ORDER:
896 topics = topiccats.get(cat, [])
905 topics = topiccats.get(cat, [])
897 if topics:
906 if topics:
898 if len(topiccats) > 1:
907 if len(topiccats) > 1:
899 catname = gettext(TOPIC_CATEGORY_NAMES[cat])
908 catname = gettext(TOPIC_CATEGORY_NAMES[cat])
900 rst.append(b"\n%s:\n" % catname)
909 rst.append(b"\n%s:\n" % catname)
901 rst.append(b"\n")
910 rst.append(b"\n")
902 for t, desc in topics:
911 for t, desc in topics:
903 rst.append(b" :%s: %s\n" % (t, desc))
912 rst.append(b" :%s: %s\n" % (t, desc))
904
913
905 if ui.quiet:
914 if ui.quiet:
906 pass
915 pass
907 elif ui.verbose:
916 elif ui.verbose:
908 rst.append(
917 rst.append(
909 b'\n%s\n'
918 b'\n%s\n'
910 % optrst(
919 % optrst(
911 _(b"global options"), commands.globalopts, ui.verbose, ui
920 _(b"global options"), commands.globalopts, ui.verbose, ui
912 )
921 )
913 )
922 )
914 if name == b'shortlist':
923 if name == b'shortlist':
915 rst.append(
924 rst.append(
916 _(b"\n(use 'hg help' for the full list of commands)\n")
925 _(b"\n(use 'hg help' for the full list of commands)\n")
917 )
926 )
918 else:
927 else:
919 if name == b'shortlist':
928 if name == b'shortlist':
920 rst.append(
929 rst.append(
921 _(
930 _(
922 b"\n(use 'hg help' for the full list of commands "
931 b"\n(use 'hg help' for the full list of commands "
923 b"or 'hg -v' for details)\n"
932 b"or 'hg -v' for details)\n"
924 )
933 )
925 )
934 )
926 elif name and not full:
935 elif name and not full:
927 rst.append(
936 rst.append(
928 _(b"\n(use 'hg help %s' to show the full help text)\n")
937 _(b"\n(use 'hg help %s' to show the full help text)\n")
929 % name
938 % name
930 )
939 )
931 elif name and syns and name in syns.keys():
940 elif name and syns and name in syns.keys():
932 rst.append(
941 rst.append(
933 _(
942 _(
934 b"\n(use 'hg help -v -e %s' to show built-in "
943 b"\n(use 'hg help -v -e %s' to show built-in "
935 b"aliases and global options)\n"
944 b"aliases and global options)\n"
936 )
945 )
937 % name
946 % name
938 )
947 )
939 else:
948 else:
940 rst.append(
949 rst.append(
941 _(
950 _(
942 b"\n(use 'hg help -v%s' to show built-in aliases "
951 b"\n(use 'hg help -v%s' to show built-in aliases "
943 b"and global options)\n"
952 b"and global options)\n"
944 )
953 )
945 % (name and b" " + name or b"")
954 % (name and b" " + name or b"")
946 )
955 )
947 return rst
956 return rst
948
957
949 def helptopic(name, subtopic=None):
958 def helptopic(name, subtopic=None):
950 # Look for sub-topic entry first.
959 # Look for sub-topic entry first.
951 header, doc = None, None
960 header, doc = None, None
952 if subtopic and name in subtopics:
961 if subtopic and name in subtopics:
953 for names, header, doc in subtopics[name]:
962 for names, header, doc in subtopics[name]:
954 if subtopic in names:
963 if subtopic in names:
955 break
964 break
956 if not any(subtopic in s[0] for s in subtopics[name]):
965 if not any(subtopic in s[0] for s in subtopics[name]):
957 raise error.UnknownCommand(name)
966 raise error.UnknownCommand(name)
958
967
959 if not header:
968 if not header:
960 for topic in helptable:
969 for topic in helptable:
961 names, header, doc = topic[0:3]
970 names, header, doc = topic[0:3]
962 if name in names:
971 if name in names:
963 break
972 break
964 else:
973 else:
965 raise error.UnknownCommand(name)
974 raise error.UnknownCommand(name)
966
975
967 rst = [minirst.section(header)]
976 rst = [minirst.section(header)]
968
977
969 # description
978 # description
970 if not doc:
979 if not doc:
971 rst.append(b" %s\n" % _(b"(no help text available)"))
980 rst.append(b" %s\n" % _(b"(no help text available)"))
972 if callable(doc):
981 if callable(doc):
973 rst += [b" %s\n" % l for l in doc(ui).splitlines()]
982 rst += [b" %s\n" % l for l in doc(ui).splitlines()]
974
983
975 if not ui.verbose:
984 if not ui.verbose:
976 omitted = _(
985 omitted = _(
977 b'(some details hidden, use --verbose'
986 b'(some details hidden, use --verbose'
978 b' to show complete help)'
987 b' to show complete help)'
979 )
988 )
980 indicateomitted(rst, omitted)
989 indicateomitted(rst, omitted)
981
990
982 try:
991 try:
983 cmdutil.findcmd(name, commands.table)
992 cmdutil.findcmd(name, commands.table)
984 rst.append(
993 rst.append(
985 _(b"\nuse 'hg help -c %s' to see help for the %s command\n")
994 _(b"\nuse 'hg help -c %s' to see help for the %s command\n")
986 % (name, name)
995 % (name, name)
987 )
996 )
988 except error.UnknownCommand:
997 except error.UnknownCommand:
989 pass
998 pass
990 return rst
999 return rst
991
1000
992 def helpext(name, subtopic=None):
1001 def helpext(name, subtopic=None):
993 try:
1002 try:
994 mod = extensions.find(name)
1003 mod = extensions.find(name)
995 doc = gettext(pycompat.getdoc(mod)) or _(b'no help text available')
1004 doc = gettext(pycompat.getdoc(mod)) or _(b'no help text available')
996 except KeyError:
1005 except KeyError:
997 mod = None
1006 mod = None
998 doc = extensions.disabled_help(name)
1007 doc = extensions.disabled_help(name)
999 if not doc:
1008 if not doc:
1000 raise error.UnknownCommand(name)
1009 raise error.UnknownCommand(name)
1001
1010
1002 if b'\n' not in doc:
1011 if b'\n' not in doc:
1003 head, tail = doc, b""
1012 head, tail = doc, b""
1004 else:
1013 else:
1005 head, tail = doc.split(b'\n', 1)
1014 head, tail = doc.split(b'\n', 1)
1006 rst = [_(b'%s extension - %s\n\n') % (name.rpartition(b'.')[-1], head)]
1015 rst = [_(b'%s extension - %s\n\n') % (name.rpartition(b'.')[-1], head)]
1007 if tail:
1016 if tail:
1008 rst.extend(tail.splitlines(True))
1017 rst.extend(tail.splitlines(True))
1009 rst.append(b'\n')
1018 rst.append(b'\n')
1010
1019
1011 if not ui.verbose:
1020 if not ui.verbose:
1012 omitted = _(
1021 omitted = _(
1013 b'(some details hidden, use --verbose'
1022 b'(some details hidden, use --verbose'
1014 b' to show complete help)'
1023 b' to show complete help)'
1015 )
1024 )
1016 indicateomitted(rst, omitted)
1025 indicateomitted(rst, omitted)
1017
1026
1018 if mod:
1027 if mod:
1019 try:
1028 try:
1020 ct = mod.cmdtable
1029 ct = mod.cmdtable
1021 except AttributeError:
1030 except AttributeError:
1022 ct = {}
1031 ct = {}
1023 modcmds = {c.partition(b'|')[0] for c in ct}
1032 modcmds = {c.partition(b'|')[0] for c in ct}
1024 rst.extend(helplist(modcmds.__contains__))
1033 rst.extend(helplist(modcmds.__contains__))
1025 else:
1034 else:
1026 rst.append(
1035 rst.append(
1027 _(
1036 _(
1028 b"(use 'hg help extensions' for information on enabling"
1037 b"(use 'hg help extensions' for information on enabling"
1029 b" extensions)\n"
1038 b" extensions)\n"
1030 )
1039 )
1031 )
1040 )
1032 return rst
1041 return rst
1033
1042
1034 def helpextcmd(name, subtopic=None):
1043 def helpextcmd(name, subtopic=None):
1035 cmd, ext, doc = extensions.disabledcmd(
1044 cmd, ext, doc = extensions.disabledcmd(
1036 ui, name, ui.configbool(b'ui', b'strict')
1045 ui, name, ui.configbool(b'ui', b'strict')
1037 )
1046 )
1038 doc = doc.splitlines()[0]
1047 doc = doc.splitlines()[0]
1039
1048
1040 rst = listexts(
1049 rst = listexts(
1041 _(b"'%s' is provided by the following extension:") % cmd,
1050 _(b"'%s' is provided by the following extension:") % cmd,
1042 {ext: doc},
1051 {ext: doc},
1043 indent=4,
1052 indent=4,
1044 showdeprecated=True,
1053 showdeprecated=True,
1045 )
1054 )
1046 rst.append(b'\n')
1055 rst.append(b'\n')
1047 rst.append(
1056 rst.append(
1048 _(
1057 _(
1049 b"(use 'hg help extensions' for information on enabling "
1058 b"(use 'hg help extensions' for information on enabling "
1050 b"extensions)\n"
1059 b"extensions)\n"
1051 )
1060 )
1052 )
1061 )
1053 return rst
1062 return rst
1054
1063
1055 rst = []
1064 rst = []
1056 kw = opts.get(b'keyword')
1065 kw = opts.get(b'keyword')
1057 if kw or name is None and any(opts[o] for o in opts):
1066 if kw or name is None and any(opts[o] for o in opts):
1058 matches = topicmatch(ui, commands, name or b'')
1067 matches = topicmatch(ui, commands, name or b'')
1059 helpareas = []
1068 helpareas = []
1060 if opts.get(b'extension'):
1069 if opts.get(b'extension'):
1061 helpareas += [(b'extensions', _(b'Extensions'))]
1070 helpareas += [(b'extensions', _(b'Extensions'))]
1062 if opts.get(b'command'):
1071 if opts.get(b'command'):
1063 helpareas += [(b'commands', _(b'Commands'))]
1072 helpareas += [(b'commands', _(b'Commands'))]
1064 if not helpareas:
1073 if not helpareas:
1065 helpareas = [
1074 helpareas = [
1066 (b'topics', _(b'Topics')),
1075 (b'topics', _(b'Topics')),
1067 (b'commands', _(b'Commands')),
1076 (b'commands', _(b'Commands')),
1068 (b'extensions', _(b'Extensions')),
1077 (b'extensions', _(b'Extensions')),
1069 (b'extensioncommands', _(b'Extension Commands')),
1078 (b'extensioncommands', _(b'Extension Commands')),
1070 ]
1079 ]
1071 for t, title in helpareas:
1080 for t, title in helpareas:
1072 if matches[t]:
1081 if matches[t]:
1073 rst.append(b'%s:\n\n' % title)
1082 rst.append(b'%s:\n\n' % title)
1074 rst.extend(minirst.maketable(sorted(matches[t]), 1))
1083 rst.extend(minirst.maketable(sorted(matches[t]), 1))
1075 rst.append(b'\n')
1084 rst.append(b'\n')
1076 if not rst:
1085 if not rst:
1077 msg = _(b'no matches')
1086 msg = _(b'no matches')
1078 hint = _(b"try 'hg help' for a list of topics")
1087 hint = _(b"try 'hg help' for a list of topics")
1079 raise error.InputError(msg, hint=hint)
1088 raise error.InputError(msg, hint=hint)
1080 elif name and name != b'shortlist':
1089 elif name and name != b'shortlist':
1081 queries = []
1090 queries = []
1082 if unknowncmd:
1091 if unknowncmd:
1083 queries += [helpextcmd]
1092 queries += [helpextcmd]
1084 if opts.get(b'extension'):
1093 if opts.get(b'extension'):
1085 queries += [helpext]
1094 queries += [helpext]
1086 if opts.get(b'command'):
1095 if opts.get(b'command'):
1087 queries += [helpcmd]
1096 queries += [helpcmd]
1088 if not queries:
1097 if not queries:
1089 queries = (helptopic, helpcmd, helpext, helpextcmd)
1098 queries = (helptopic, helpcmd, helpext, helpextcmd)
1090 for f in queries:
1099 for f in queries:
1091 try:
1100 try:
1092 rst = f(name, subtopic)
1101 rst = f(name, subtopic)
1093 break
1102 break
1094 except error.UnknownCommand:
1103 except error.UnknownCommand:
1095 pass
1104 pass
1096 else:
1105 else:
1097 if unknowncmd:
1106 if unknowncmd:
1098 raise error.UnknownCommand(name)
1107 raise error.UnknownCommand(name)
1099 else:
1108 else:
1100 if fullname:
1109 if fullname:
1101 formatname = fullname
1110 formatname = fullname
1102 else:
1111 else:
1103 formatname = name
1112 formatname = name
1104 if subtopic:
1113 if subtopic:
1105 hintname = subtopic
1114 hintname = subtopic
1106 else:
1115 else:
1107 hintname = name
1116 hintname = name
1108 msg = _(b'no such help topic: %s') % formatname
1117 msg = _(b'no such help topic: %s') % formatname
1109 hint = _(b"try 'hg help --keyword %s'") % hintname
1118 hint = _(b"try 'hg help --keyword %s'") % hintname
1110 raise error.InputError(msg, hint=hint)
1119 raise error.InputError(msg, hint=hint)
1111 else:
1120 else:
1112 # program name
1121 # program name
1113 if not ui.quiet:
1122 if not ui.quiet:
1114 rst = [_(b"Mercurial Distributed SCM\n"), b'\n']
1123 rst = [_(b"Mercurial Distributed SCM\n"), b'\n']
1115 rst.extend(helplist(None, **pycompat.strkwargs(opts)))
1124 rst.extend(helplist(None, **pycompat.strkwargs(opts)))
1116
1125
1117 return b''.join(rst)
1126 return b''.join(rst)
1118
1127
1119
1128
1120 def formattedhelp(
1129 def formattedhelp(
1121 ui, commands, fullname, keep=None, unknowncmd=False, full=True, **opts
1130 ui, commands, fullname, keep=None, unknowncmd=False, full=True, **opts
1122 ):
1131 ):
1123 """get help for a given topic (as a dotted name) as rendered rst
1132 """get help for a given topic (as a dotted name) as rendered rst
1124
1133
1125 Either returns the rendered help text or raises an exception.
1134 Either returns the rendered help text or raises an exception.
1126 """
1135 """
1127 if keep is None:
1136 if keep is None:
1128 keep = []
1137 keep = []
1129 else:
1138 else:
1130 keep = list(keep) # make a copy so we can mutate this later
1139 keep = list(keep) # make a copy so we can mutate this later
1131
1140
1132 # <fullname> := <name>[.<subtopic][.<section>]
1141 # <fullname> := <name>[.<subtopic][.<section>]
1133 name = subtopic = section = None
1142 name = subtopic = section = None
1134 if fullname is not None:
1143 if fullname is not None:
1135 nameparts = fullname.split(b'.')
1144 nameparts = fullname.split(b'.')
1136 name = nameparts.pop(0)
1145 name = nameparts.pop(0)
1137 if nameparts and name in subtopics:
1146 if nameparts and name in subtopics:
1138 subtopic = nameparts.pop(0)
1147 subtopic = nameparts.pop(0)
1139 if nameparts:
1148 if nameparts:
1140 section = encoding.lower(b'.'.join(nameparts))
1149 section = encoding.lower(b'.'.join(nameparts))
1141
1150
1142 textwidth = ui.configint(b'ui', b'textwidth')
1151 textwidth = ui.configint(b'ui', b'textwidth')
1143 termwidth = ui.termwidth() - 2
1152 termwidth = ui.termwidth() - 2
1144 if textwidth <= 0 or termwidth < textwidth:
1153 if textwidth <= 0 or termwidth < textwidth:
1145 textwidth = termwidth
1154 textwidth = termwidth
1146 text = help_(
1155 text = help_(
1147 ui,
1156 ui,
1148 commands,
1157 commands,
1149 name,
1158 name,
1150 fullname=fullname,
1159 fullname=fullname,
1151 subtopic=subtopic,
1160 subtopic=subtopic,
1152 unknowncmd=unknowncmd,
1161 unknowncmd=unknowncmd,
1153 full=full,
1162 full=full,
1154 **opts
1163 **opts
1155 )
1164 )
1156
1165
1157 blocks, pruned = minirst.parse(text, keep=keep)
1166 blocks, pruned = minirst.parse(text, keep=keep)
1158 if b'verbose' in pruned:
1167 if b'verbose' in pruned:
1159 keep.append(b'omitted')
1168 keep.append(b'omitted')
1160 else:
1169 else:
1161 keep.append(b'notomitted')
1170 keep.append(b'notomitted')
1162 blocks, pruned = minirst.parse(text, keep=keep)
1171 blocks, pruned = minirst.parse(text, keep=keep)
1163 if section:
1172 if section:
1164 blocks = minirst.filtersections(blocks, section)
1173 blocks = minirst.filtersections(blocks, section)
1165
1174
1166 # We could have been given a weird ".foo" section without a name
1175 # We could have been given a weird ".foo" section without a name
1167 # to look for, or we could have simply failed to found "foo.bar"
1176 # to look for, or we could have simply failed to found "foo.bar"
1168 # because bar isn't a section of foo
1177 # because bar isn't a section of foo
1169 if section and not (blocks and name):
1178 if section and not (blocks and name):
1170 raise error.InputError(_(b"help section not found: %s") % fullname)
1179 raise error.InputError(_(b"help section not found: %s") % fullname)
1171
1180
1172 return minirst.formatplain(blocks, textwidth)
1181 return minirst.formatplain(blocks, textwidth)
@@ -1,571 +1,573 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3 $ echo a > a
3 $ echo a > a
4 $ hg ci -A -d'1 0' -m a
4 $ hg ci -A -d'1 0' -m a
5 adding a
5 adding a
6
6
7 $ cd ..
7 $ cd ..
8
8
9 $ hg init b
9 $ hg init b
10 $ cd b
10 $ cd b
11 $ echo b > b
11 $ echo b > b
12 $ hg ci -A -d'1 0' -m b
12 $ hg ci -A -d'1 0' -m b
13 adding b
13 adding b
14
14
15 $ cd ..
15 $ cd ..
16
16
17 $ hg clone a c
17 $ hg clone a c
18 updating to branch default
18 updating to branch default
19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 $ cd c
20 $ cd c
21 $ cat >> .hg/hgrc <<EOF
21 $ cat >> .hg/hgrc <<EOF
22 > [paths]
22 > [paths]
23 > relative = ../a
23 > relative = ../a
24 > EOF
24 > EOF
25 $ hg pull -f ../b
25 $ hg pull -f ../b
26 pulling from ../b
26 pulling from ../b
27 searching for changes
27 searching for changes
28 warning: repository is unrelated
28 warning: repository is unrelated
29 requesting all changes
29 requesting all changes
30 adding changesets
30 adding changesets
31 adding manifests
31 adding manifests
32 adding file changes
32 adding file changes
33 added 1 changesets with 1 changes to 1 files (+1 heads)
33 added 1 changesets with 1 changes to 1 files (+1 heads)
34 new changesets b6c483daf290
34 new changesets b6c483daf290
35 (run 'hg heads' to see heads, 'hg merge' to merge)
35 (run 'hg heads' to see heads, 'hg merge' to merge)
36 $ hg merge
36 $ hg merge
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 (branch merge, don't forget to commit)
38 (branch merge, don't forget to commit)
39
39
40 $ cd ..
40 $ cd ..
41
41
42 Testing -R/--repository:
42 Testing -R/--repository:
43
43
44 $ hg -R a tip
44 $ hg -R a tip
45 changeset: 0:8580ff50825a
45 changeset: 0:8580ff50825a
46 tag: tip
46 tag: tip
47 user: test
47 user: test
48 date: Thu Jan 01 00:00:01 1970 +0000
48 date: Thu Jan 01 00:00:01 1970 +0000
49 summary: a
49 summary: a
50
50
51 $ hg --repository b tip
51 $ hg --repository b tip
52 changeset: 0:b6c483daf290
52 changeset: 0:b6c483daf290
53 tag: tip
53 tag: tip
54 user: test
54 user: test
55 date: Thu Jan 01 00:00:01 1970 +0000
55 date: Thu Jan 01 00:00:01 1970 +0000
56 summary: b
56 summary: b
57
57
58
58
59 -R with a URL:
59 -R with a URL:
60
60
61 $ hg -R file:a identify
61 $ hg -R file:a identify
62 8580ff50825a tip
62 8580ff50825a tip
63 $ hg -R file://localhost/`pwd`/a/ identify
63 $ hg -R file://localhost/`pwd`/a/ identify
64 8580ff50825a tip
64 8580ff50825a tip
65
65
66 -R with path aliases:
66 -R with path aliases:
67
67
68 $ cd c
68 $ cd c
69 $ hg -R default identify
69 $ hg -R default identify
70 8580ff50825a tip
70 8580ff50825a tip
71 $ hg -R relative identify
71 $ hg -R relative identify
72 8580ff50825a tip
72 8580ff50825a tip
73 $ echo '[paths]' >> $HGRCPATH
73 $ echo '[paths]' >> $HGRCPATH
74 $ echo 'relativetohome = a' >> $HGRCPATH
74 $ echo 'relativetohome = a' >> $HGRCPATH
75 $ hg path | grep relativetohome
75 $ hg path | grep relativetohome
76 relativetohome = $TESTTMP/a
76 relativetohome = $TESTTMP/a
77 $ HOME=`pwd`/../ hg path | grep relativetohome
77 $ HOME=`pwd`/../ hg path | grep relativetohome
78 relativetohome = $TESTTMP/a
78 relativetohome = $TESTTMP/a
79 $ HOME=`pwd`/../ hg -R relativetohome identify
79 $ HOME=`pwd`/../ hg -R relativetohome identify
80 8580ff50825a tip
80 8580ff50825a tip
81 $ cd ..
81 $ cd ..
82
82
83 #if no-outer-repo
83 #if no-outer-repo
84
84
85 Implicit -R:
85 Implicit -R:
86
86
87 $ hg ann a/a
87 $ hg ann a/a
88 0: a
88 0: a
89 $ hg ann a/a a/a
89 $ hg ann a/a a/a
90 0: a
90 0: a
91 $ hg ann a/a b/b
91 $ hg ann a/a b/b
92 abort: no repository found in '$TESTTMP' (.hg not found)
92 abort: no repository found in '$TESTTMP' (.hg not found)
93 [10]
93 [10]
94 $ hg -R b ann a/a
94 $ hg -R b ann a/a
95 abort: a/a not under root '$TESTTMP/b'
95 abort: a/a not under root '$TESTTMP/b'
96 (consider using '--cwd b')
96 (consider using '--cwd b')
97 [255]
97 [255]
98 $ hg log
98 $ hg log
99 abort: no repository found in '$TESTTMP' (.hg not found)
99 abort: no repository found in '$TESTTMP' (.hg not found)
100 [10]
100 [10]
101
101
102 #endif
102 #endif
103
103
104 Abbreviation of long option:
104 Abbreviation of long option:
105
105
106 $ hg --repo c tip
106 $ hg --repo c tip
107 changeset: 1:b6c483daf290
107 changeset: 1:b6c483daf290
108 tag: tip
108 tag: tip
109 parent: -1:000000000000
109 parent: -1:000000000000
110 user: test
110 user: test
111 date: Thu Jan 01 00:00:01 1970 +0000
111 date: Thu Jan 01 00:00:01 1970 +0000
112 summary: b
112 summary: b
113
113
114
114
115 earlygetopt with duplicate options (36d23de02da1):
115 earlygetopt with duplicate options (36d23de02da1):
116
116
117 $ hg --cwd a --cwd b --cwd c tip
117 $ hg --cwd a --cwd b --cwd c tip
118 changeset: 1:b6c483daf290
118 changeset: 1:b6c483daf290
119 tag: tip
119 tag: tip
120 parent: -1:000000000000
120 parent: -1:000000000000
121 user: test
121 user: test
122 date: Thu Jan 01 00:00:01 1970 +0000
122 date: Thu Jan 01 00:00:01 1970 +0000
123 summary: b
123 summary: b
124
124
125 $ hg --repo c --repository b -R a tip
125 $ hg --repo c --repository b -R a tip
126 changeset: 0:8580ff50825a
126 changeset: 0:8580ff50825a
127 tag: tip
127 tag: tip
128 user: test
128 user: test
129 date: Thu Jan 01 00:00:01 1970 +0000
129 date: Thu Jan 01 00:00:01 1970 +0000
130 summary: a
130 summary: a
131
131
132
132
133 earlygetopt short option without following space:
133 earlygetopt short option without following space:
134
134
135 $ hg -q -Rb tip
135 $ hg -q -Rb tip
136 0:b6c483daf290
136 0:b6c483daf290
137
137
138 earlygetopt with illegal abbreviations:
138 earlygetopt with illegal abbreviations:
139
139
140 $ hg --confi "foo.bar=baz"
140 $ hg --confi "foo.bar=baz"
141 abort: option --config may not be abbreviated
141 abort: option --config may not be abbreviated
142 [10]
142 [10]
143 $ hg --cw a tip
143 $ hg --cw a tip
144 abort: option --cwd may not be abbreviated
144 abort: option --cwd may not be abbreviated
145 [10]
145 [10]
146 $ hg --rep a tip
146 $ hg --rep a tip
147 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
147 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
148 [10]
148 [10]
149 $ hg --repositor a tip
149 $ hg --repositor a tip
150 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
150 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
151 [10]
151 [10]
152 $ hg -qR a tip
152 $ hg -qR a tip
153 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
153 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
154 [10]
154 [10]
155 $ hg -qRa tip
155 $ hg -qRa tip
156 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
156 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
157 [10]
157 [10]
158
158
159 Testing --cwd:
159 Testing --cwd:
160
160
161 $ hg --cwd a parents
161 $ hg --cwd a parents
162 changeset: 0:8580ff50825a
162 changeset: 0:8580ff50825a
163 tag: tip
163 tag: tip
164 user: test
164 user: test
165 date: Thu Jan 01 00:00:01 1970 +0000
165 date: Thu Jan 01 00:00:01 1970 +0000
166 summary: a
166 summary: a
167
167
168
168
169 Testing -y/--noninteractive - just be sure it is parsed:
169 Testing -y/--noninteractive - just be sure it is parsed:
170
170
171 $ hg --cwd a tip -q --noninteractive
171 $ hg --cwd a tip -q --noninteractive
172 0:8580ff50825a
172 0:8580ff50825a
173 $ hg --cwd a tip -q -y
173 $ hg --cwd a tip -q -y
174 0:8580ff50825a
174 0:8580ff50825a
175
175
176 Testing -q/--quiet:
176 Testing -q/--quiet:
177
177
178 $ hg -R a -q tip
178 $ hg -R a -q tip
179 0:8580ff50825a
179 0:8580ff50825a
180 $ hg -R b -q tip
180 $ hg -R b -q tip
181 0:b6c483daf290
181 0:b6c483daf290
182 $ hg -R c --quiet parents
182 $ hg -R c --quiet parents
183 0:8580ff50825a
183 0:8580ff50825a
184 1:b6c483daf290
184 1:b6c483daf290
185
185
186 Testing -v/--verbose:
186 Testing -v/--verbose:
187
187
188 $ hg --cwd c head -v
188 $ hg --cwd c head -v
189 changeset: 1:b6c483daf290
189 changeset: 1:b6c483daf290
190 tag: tip
190 tag: tip
191 parent: -1:000000000000
191 parent: -1:000000000000
192 user: test
192 user: test
193 date: Thu Jan 01 00:00:01 1970 +0000
193 date: Thu Jan 01 00:00:01 1970 +0000
194 files: b
194 files: b
195 description:
195 description:
196 b
196 b
197
197
198
198
199 changeset: 0:8580ff50825a
199 changeset: 0:8580ff50825a
200 user: test
200 user: test
201 date: Thu Jan 01 00:00:01 1970 +0000
201 date: Thu Jan 01 00:00:01 1970 +0000
202 files: a
202 files: a
203 description:
203 description:
204 a
204 a
205
205
206
206
207 $ hg --cwd b tip --verbose
207 $ hg --cwd b tip --verbose
208 changeset: 0:b6c483daf290
208 changeset: 0:b6c483daf290
209 tag: tip
209 tag: tip
210 user: test
210 user: test
211 date: Thu Jan 01 00:00:01 1970 +0000
211 date: Thu Jan 01 00:00:01 1970 +0000
212 files: b
212 files: b
213 description:
213 description:
214 b
214 b
215
215
216
216
217
217
218 Testing --config:
218 Testing --config:
219
219
220 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
220 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
221 quuxfoo
221 quuxfoo
222 TODO: add rhg support for detailed exit codes
222 TODO: add rhg support for detailed exit codes
223 $ hg --cwd c --config '' tip -q
223 $ hg --cwd c --config '' tip -q
224 abort: malformed --config option: '' (use --config section.name=value)
224 abort: malformed --config option: '' (use --config section.name=value)
225 [10]
225 [10]
226 $ hg --cwd c --config a.b tip -q
226 $ hg --cwd c --config a.b tip -q
227 abort: malformed --config option: 'a.b' (use --config section.name=value)
227 abort: malformed --config option: 'a.b' (use --config section.name=value)
228 [10]
228 [10]
229 $ hg --cwd c --config a tip -q
229 $ hg --cwd c --config a tip -q
230 abort: malformed --config option: 'a' (use --config section.name=value)
230 abort: malformed --config option: 'a' (use --config section.name=value)
231 [10]
231 [10]
232 $ hg --cwd c --config a.= tip -q
232 $ hg --cwd c --config a.= tip -q
233 abort: malformed --config option: 'a.=' (use --config section.name=value)
233 abort: malformed --config option: 'a.=' (use --config section.name=value)
234 [10]
234 [10]
235 $ hg --cwd c --config .b= tip -q
235 $ hg --cwd c --config .b= tip -q
236 abort: malformed --config option: '.b=' (use --config section.name=value)
236 abort: malformed --config option: '.b=' (use --config section.name=value)
237 [10]
237 [10]
238
238
239 Testing --debug:
239 Testing --debug:
240
240
241 $ hg --cwd c log --debug
241 $ hg --cwd c log --debug
242 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
242 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
243 tag: tip
243 tag: tip
244 phase: public
244 phase: public
245 parent: -1:0000000000000000000000000000000000000000
245 parent: -1:0000000000000000000000000000000000000000
246 parent: -1:0000000000000000000000000000000000000000
246 parent: -1:0000000000000000000000000000000000000000
247 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
247 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
248 user: test
248 user: test
249 date: Thu Jan 01 00:00:01 1970 +0000
249 date: Thu Jan 01 00:00:01 1970 +0000
250 files+: b
250 files+: b
251 extra: branch=default
251 extra: branch=default
252 description:
252 description:
253 b
253 b
254
254
255
255
256 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
256 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
257 phase: public
257 phase: public
258 parent: -1:0000000000000000000000000000000000000000
258 parent: -1:0000000000000000000000000000000000000000
259 parent: -1:0000000000000000000000000000000000000000
259 parent: -1:0000000000000000000000000000000000000000
260 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
260 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
261 user: test
261 user: test
262 date: Thu Jan 01 00:00:01 1970 +0000
262 date: Thu Jan 01 00:00:01 1970 +0000
263 files+: a
263 files+: a
264 extra: branch=default
264 extra: branch=default
265 description:
265 description:
266 a
266 a
267
267
268
268
269
269
270 Testing --traceback:
270 Testing --traceback:
271
271
272 #if no-chg no-rhg
272 #if no-chg no-rhg
273 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
273 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
274 Traceback (most recent call last):
274 Traceback (most recent call last):
275 Traceback (most recent call last): (py3 !)
275 Traceback (most recent call last): (py3 !)
276 #else
276 #else
277 Traceback for '--config' errors not supported with chg.
277 Traceback for '--config' errors not supported with chg.
278 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
278 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
279 [1]
279 [1]
280 #endif
280 #endif
281
281
282 Testing --time:
282 Testing --time:
283
283
284 $ hg --cwd a --time id
284 $ hg --cwd a --time id
285 8580ff50825a tip
285 8580ff50825a tip
286 time: real * (glob)
286 time: real * (glob)
287
287
288 Testing --version:
288 Testing --version:
289
289
290 $ hg --version -q
290 $ hg --version -q
291 Mercurial Distributed SCM * (glob)
291 Mercurial Distributed SCM * (glob)
292
292
293 hide outer repo
293 hide outer repo
294 $ hg init
294 $ hg init
295
295
296 Testing -h/--help:
296 Testing -h/--help:
297
297
298 #if no-extraextensions
298 #if no-extraextensions
299
299
300 $ hg -h
300 $ hg -h
301 Mercurial Distributed SCM
301 Mercurial Distributed SCM
302
302
303 list of commands:
303 list of commands:
304
304
305 Repository creation:
305 Repository creation:
306
306
307 clone make a copy of an existing repository
307 clone make a copy of an existing repository
308 init create a new repository in the given directory
308 init create a new repository in the given directory
309
309
310 Remote repository management:
310 Remote repository management:
311
311
312 incoming show new changesets found in source
312 incoming show new changesets found in source
313 outgoing show changesets not found in the destination
313 outgoing show changesets not found in the destination
314 paths show aliases for remote repositories
314 paths show aliases for remote repositories
315 pull pull changes from the specified source
315 pull pull changes from the specified source
316 push push changes to the specified destination
316 push push changes to the specified destination
317 serve start stand-alone webserver
317 serve start stand-alone webserver
318
318
319 Change creation:
319 Change creation:
320
320
321 commit commit the specified files or all outstanding changes
321 commit commit the specified files or all outstanding changes
322
322
323 Change manipulation:
323 Change manipulation:
324
324
325 backout reverse effect of earlier changeset
325 backout reverse effect of earlier changeset
326 graft copy changes from other branches onto the current branch
326 graft copy changes from other branches onto the current branch
327 merge merge another revision into working directory
327 merge merge another revision into working directory
328
328
329 Change organization:
329 Change organization:
330
330
331 bookmarks create a new bookmark or list existing bookmarks
331 bookmarks create a new bookmark or list existing bookmarks
332 branch set or show the current branch name
332 branch set or show the current branch name
333 branches list repository named branches
333 branches list repository named branches
334 phase set or show the current phase name
334 phase set or show the current phase name
335 tag add one or more tags for the current or given revision
335 tag add one or more tags for the current or given revision
336 tags list repository tags
336 tags list repository tags
337
337
338 File content management:
338 File content management:
339
339
340 annotate show changeset information by line for each file
340 annotate show changeset information by line for each file
341 cat output the current or given revision of files
341 cat output the current or given revision of files
342 copy mark files as copied for the next commit
342 copy mark files as copied for the next commit
343 diff diff repository (or selected files)
343 diff diff repository (or selected files)
344 grep search for a pattern in specified files
344 grep search for a pattern in specified files
345
345
346 Change navigation:
346 Change navigation:
347
347
348 bisect subdivision search of changesets
348 bisect subdivision search of changesets
349 heads show branch heads
349 heads show branch heads
350 identify identify the working directory or specified revision
350 identify identify the working directory or specified revision
351 log show revision history of entire repository or files
351 log show revision history of entire repository or files
352
352
353 Working directory management:
353 Working directory management:
354
354
355 add add the specified files on the next commit
355 add add the specified files on the next commit
356 addremove add all new files, delete all missing files
356 addremove add all new files, delete all missing files
357 files list tracked files
357 files list tracked files
358 forget forget the specified files on the next commit
358 forget forget the specified files on the next commit
359 purge removes files not tracked by Mercurial
359 purge removes files not tracked by Mercurial
360 remove remove the specified files on the next commit
360 remove remove the specified files on the next commit
361 rename rename files; equivalent of copy + remove
361 rename rename files; equivalent of copy + remove
362 resolve redo merges or set/view the merge status of files
362 resolve redo merges or set/view the merge status of files
363 revert restore files to their checkout state
363 revert restore files to their checkout state
364 root print the root (top) of the current working directory
364 root print the root (top) of the current working directory
365 shelve save and set aside changes from the working directory
365 shelve save and set aside changes from the working directory
366 status show changed files in the working directory
366 status show changed files in the working directory
367 summary summarize working directory state
367 summary summarize working directory state
368 unshelve restore a shelved change to the working directory
368 unshelve restore a shelved change to the working directory
369 update update working directory (or switch revisions)
369 update update working directory (or switch revisions)
370
370
371 Change import/export:
371 Change import/export:
372
372
373 archive create an unversioned archive of a repository revision
373 archive create an unversioned archive of a repository revision
374 bundle create a bundle file
374 bundle create a bundle file
375 export dump the header and diffs for one or more changesets
375 export dump the header and diffs for one or more changesets
376 import import an ordered set of patches
376 import import an ordered set of patches
377 unbundle apply one or more bundle files
377 unbundle apply one or more bundle files
378
378
379 Repository maintenance:
379 Repository maintenance:
380
380
381 manifest output the current or given revision of the project manifest
381 manifest output the current or given revision of the project manifest
382 recover roll back an interrupted transaction
382 recover roll back an interrupted transaction
383 verify verify the integrity of the repository
383 verify verify the integrity of the repository
384
384
385 Help:
385 Help:
386
386
387 config show combined config settings from all hgrc files
387 config show combined config settings from all hgrc files
388 help show help for a given topic or a help overview
388 help show help for a given topic or a help overview
389 version output version and copyright information
389 version output version and copyright information
390
390
391 additional help topics:
391 additional help topics:
392
392
393 Mercurial identifiers:
393 Mercurial identifiers:
394
394
395 filesets Specifying File Sets
395 filesets Specifying File Sets
396 hgignore Syntax for Mercurial Ignore Files
396 hgignore Syntax for Mercurial Ignore Files
397 patterns File Name Patterns
397 patterns File Name Patterns
398 revisions Specifying Revisions
398 revisions Specifying Revisions
399 urls URL Paths
399 urls URL Paths
400
400
401 Mercurial output:
401 Mercurial output:
402
402
403 color Colorizing Outputs
403 color Colorizing Outputs
404 dates Date Formats
404 dates Date Formats
405 diffs Diff Formats
405 diffs Diff Formats
406 templating Template Usage
406 templating Template Usage
407
407
408 Mercurial configuration:
408 Mercurial configuration:
409
409
410 config Configuration Files
410 config Configuration Files
411 environment Environment Variables
411 environment Environment Variables
412 extensions Using Additional Features
412 extensions Using Additional Features
413 flags Command-line flags
413 flags Command-line flags
414 hgweb Configuring hgweb
414 hgweb Configuring hgweb
415 merge-tools Merge Tools
415 merge-tools Merge Tools
416 pager Pager Support
416 pager Pager Support
417 rust Rust in Mercurial
417
418
418 Concepts:
419 Concepts:
419
420
420 bundlespec Bundle File Formats
421 bundlespec Bundle File Formats
421 evolution Safely rewriting history (EXPERIMENTAL)
422 evolution Safely rewriting history (EXPERIMENTAL)
422 glossary Glossary
423 glossary Glossary
423 phases Working with Phases
424 phases Working with Phases
424 subrepos Subrepositories
425 subrepos Subrepositories
425
426
426 Miscellaneous:
427 Miscellaneous:
427
428
428 deprecated Deprecated Features
429 deprecated Deprecated Features
429 internals Technical implementation topics
430 internals Technical implementation topics
430 scripting Using Mercurial from scripts and automation
431 scripting Using Mercurial from scripts and automation
431
432
432 (use 'hg help -v' to show built-in aliases and global options)
433 (use 'hg help -v' to show built-in aliases and global options)
433
434
434 $ hg --help
435 $ hg --help
435 Mercurial Distributed SCM
436 Mercurial Distributed SCM
436
437
437 list of commands:
438 list of commands:
438
439
439 Repository creation:
440 Repository creation:
440
441
441 clone make a copy of an existing repository
442 clone make a copy of an existing repository
442 init create a new repository in the given directory
443 init create a new repository in the given directory
443
444
444 Remote repository management:
445 Remote repository management:
445
446
446 incoming show new changesets found in source
447 incoming show new changesets found in source
447 outgoing show changesets not found in the destination
448 outgoing show changesets not found in the destination
448 paths show aliases for remote repositories
449 paths show aliases for remote repositories
449 pull pull changes from the specified source
450 pull pull changes from the specified source
450 push push changes to the specified destination
451 push push changes to the specified destination
451 serve start stand-alone webserver
452 serve start stand-alone webserver
452
453
453 Change creation:
454 Change creation:
454
455
455 commit commit the specified files or all outstanding changes
456 commit commit the specified files or all outstanding changes
456
457
457 Change manipulation:
458 Change manipulation:
458
459
459 backout reverse effect of earlier changeset
460 backout reverse effect of earlier changeset
460 graft copy changes from other branches onto the current branch
461 graft copy changes from other branches onto the current branch
461 merge merge another revision into working directory
462 merge merge another revision into working directory
462
463
463 Change organization:
464 Change organization:
464
465
465 bookmarks create a new bookmark or list existing bookmarks
466 bookmarks create a new bookmark or list existing bookmarks
466 branch set or show the current branch name
467 branch set or show the current branch name
467 branches list repository named branches
468 branches list repository named branches
468 phase set or show the current phase name
469 phase set or show the current phase name
469 tag add one or more tags for the current or given revision
470 tag add one or more tags for the current or given revision
470 tags list repository tags
471 tags list repository tags
471
472
472 File content management:
473 File content management:
473
474
474 annotate show changeset information by line for each file
475 annotate show changeset information by line for each file
475 cat output the current or given revision of files
476 cat output the current or given revision of files
476 copy mark files as copied for the next commit
477 copy mark files as copied for the next commit
477 diff diff repository (or selected files)
478 diff diff repository (or selected files)
478 grep search for a pattern in specified files
479 grep search for a pattern in specified files
479
480
480 Change navigation:
481 Change navigation:
481
482
482 bisect subdivision search of changesets
483 bisect subdivision search of changesets
483 heads show branch heads
484 heads show branch heads
484 identify identify the working directory or specified revision
485 identify identify the working directory or specified revision
485 log show revision history of entire repository or files
486 log show revision history of entire repository or files
486
487
487 Working directory management:
488 Working directory management:
488
489
489 add add the specified files on the next commit
490 add add the specified files on the next commit
490 addremove add all new files, delete all missing files
491 addremove add all new files, delete all missing files
491 files list tracked files
492 files list tracked files
492 forget forget the specified files on the next commit
493 forget forget the specified files on the next commit
493 purge removes files not tracked by Mercurial
494 purge removes files not tracked by Mercurial
494 remove remove the specified files on the next commit
495 remove remove the specified files on the next commit
495 rename rename files; equivalent of copy + remove
496 rename rename files; equivalent of copy + remove
496 resolve redo merges or set/view the merge status of files
497 resolve redo merges or set/view the merge status of files
497 revert restore files to their checkout state
498 revert restore files to their checkout state
498 root print the root (top) of the current working directory
499 root print the root (top) of the current working directory
499 shelve save and set aside changes from the working directory
500 shelve save and set aside changes from the working directory
500 status show changed files in the working directory
501 status show changed files in the working directory
501 summary summarize working directory state
502 summary summarize working directory state
502 unshelve restore a shelved change to the working directory
503 unshelve restore a shelved change to the working directory
503 update update working directory (or switch revisions)
504 update update working directory (or switch revisions)
504
505
505 Change import/export:
506 Change import/export:
506
507
507 archive create an unversioned archive of a repository revision
508 archive create an unversioned archive of a repository revision
508 bundle create a bundle file
509 bundle create a bundle file
509 export dump the header and diffs for one or more changesets
510 export dump the header and diffs for one or more changesets
510 import import an ordered set of patches
511 import import an ordered set of patches
511 unbundle apply one or more bundle files
512 unbundle apply one or more bundle files
512
513
513 Repository maintenance:
514 Repository maintenance:
514
515
515 manifest output the current or given revision of the project manifest
516 manifest output the current or given revision of the project manifest
516 recover roll back an interrupted transaction
517 recover roll back an interrupted transaction
517 verify verify the integrity of the repository
518 verify verify the integrity of the repository
518
519
519 Help:
520 Help:
520
521
521 config show combined config settings from all hgrc files
522 config show combined config settings from all hgrc files
522 help show help for a given topic or a help overview
523 help show help for a given topic or a help overview
523 version output version and copyright information
524 version output version and copyright information
524
525
525 additional help topics:
526 additional help topics:
526
527
527 Mercurial identifiers:
528 Mercurial identifiers:
528
529
529 filesets Specifying File Sets
530 filesets Specifying File Sets
530 hgignore Syntax for Mercurial Ignore Files
531 hgignore Syntax for Mercurial Ignore Files
531 patterns File Name Patterns
532 patterns File Name Patterns
532 revisions Specifying Revisions
533 revisions Specifying Revisions
533 urls URL Paths
534 urls URL Paths
534
535
535 Mercurial output:
536 Mercurial output:
536
537
537 color Colorizing Outputs
538 color Colorizing Outputs
538 dates Date Formats
539 dates Date Formats
539 diffs Diff Formats
540 diffs Diff Formats
540 templating Template Usage
541 templating Template Usage
541
542
542 Mercurial configuration:
543 Mercurial configuration:
543
544
544 config Configuration Files
545 config Configuration Files
545 environment Environment Variables
546 environment Environment Variables
546 extensions Using Additional Features
547 extensions Using Additional Features
547 flags Command-line flags
548 flags Command-line flags
548 hgweb Configuring hgweb
549 hgweb Configuring hgweb
549 merge-tools Merge Tools
550 merge-tools Merge Tools
550 pager Pager Support
551 pager Pager Support
552 rust Rust in Mercurial
551
553
552 Concepts:
554 Concepts:
553
555
554 bundlespec Bundle File Formats
556 bundlespec Bundle File Formats
555 evolution Safely rewriting history (EXPERIMENTAL)
557 evolution Safely rewriting history (EXPERIMENTAL)
556 glossary Glossary
558 glossary Glossary
557 phases Working with Phases
559 phases Working with Phases
558 subrepos Subrepositories
560 subrepos Subrepositories
559
561
560 Miscellaneous:
562 Miscellaneous:
561
563
562 deprecated Deprecated Features
564 deprecated Deprecated Features
563 internals Technical implementation topics
565 internals Technical implementation topics
564 scripting Using Mercurial from scripts and automation
566 scripting Using Mercurial from scripts and automation
565
567
566 (use 'hg help -v' to show built-in aliases and global options)
568 (use 'hg help -v' to show built-in aliases and global options)
567
569
568 #endif
570 #endif
569
571
570 Not tested: --debugger
572 Not tested: --debugger
571
573
@@ -1,263 +1,265 b''
1 Test hiding some commands (which also happens to hide an entire category).
1 Test hiding some commands (which also happens to hide an entire category).
2
2
3 $ hg --config help.hidden-command.clone=true \
3 $ hg --config help.hidden-command.clone=true \
4 > --config help.hidden-command.init=true help
4 > --config help.hidden-command.init=true help
5 Mercurial Distributed SCM
5 Mercurial Distributed SCM
6
6
7 list of commands:
7 list of commands:
8
8
9 Remote repository management:
9 Remote repository management:
10
10
11 incoming show new changesets found in source
11 incoming show new changesets found in source
12 outgoing show changesets not found in the destination
12 outgoing show changesets not found in the destination
13 paths show aliases for remote repositories
13 paths show aliases for remote repositories
14 pull pull changes from the specified source
14 pull pull changes from the specified source
15 push push changes to the specified destination
15 push push changes to the specified destination
16 serve start stand-alone webserver
16 serve start stand-alone webserver
17
17
18 Change creation:
18 Change creation:
19
19
20 commit commit the specified files or all outstanding changes
20 commit commit the specified files or all outstanding changes
21
21
22 Change manipulation:
22 Change manipulation:
23
23
24 backout reverse effect of earlier changeset
24 backout reverse effect of earlier changeset
25 graft copy changes from other branches onto the current branch
25 graft copy changes from other branches onto the current branch
26 merge merge another revision into working directory
26 merge merge another revision into working directory
27
27
28 Change organization:
28 Change organization:
29
29
30 bookmarks create a new bookmark or list existing bookmarks
30 bookmarks create a new bookmark or list existing bookmarks
31 branch set or show the current branch name
31 branch set or show the current branch name
32 branches list repository named branches
32 branches list repository named branches
33 phase set or show the current phase name
33 phase set or show the current phase name
34 tag add one or more tags for the current or given revision
34 tag add one or more tags for the current or given revision
35 tags list repository tags
35 tags list repository tags
36
36
37 File content management:
37 File content management:
38
38
39 annotate show changeset information by line for each file
39 annotate show changeset information by line for each file
40 cat output the current or given revision of files
40 cat output the current or given revision of files
41 copy mark files as copied for the next commit
41 copy mark files as copied for the next commit
42 diff diff repository (or selected files)
42 diff diff repository (or selected files)
43 grep search for a pattern in specified files
43 grep search for a pattern in specified files
44
44
45 Change navigation:
45 Change navigation:
46
46
47 bisect subdivision search of changesets
47 bisect subdivision search of changesets
48 heads show branch heads
48 heads show branch heads
49 identify identify the working directory or specified revision
49 identify identify the working directory or specified revision
50 log show revision history of entire repository or files
50 log show revision history of entire repository or files
51
51
52 Working directory management:
52 Working directory management:
53
53
54 add add the specified files on the next commit
54 add add the specified files on the next commit
55 addremove add all new files, delete all missing files
55 addremove add all new files, delete all missing files
56 files list tracked files
56 files list tracked files
57 forget forget the specified files on the next commit
57 forget forget the specified files on the next commit
58 purge removes files not tracked by Mercurial
58 purge removes files not tracked by Mercurial
59 remove remove the specified files on the next commit
59 remove remove the specified files on the next commit
60 rename rename files; equivalent of copy + remove
60 rename rename files; equivalent of copy + remove
61 resolve redo merges or set/view the merge status of files
61 resolve redo merges or set/view the merge status of files
62 revert restore files to their checkout state
62 revert restore files to their checkout state
63 root print the root (top) of the current working directory
63 root print the root (top) of the current working directory
64 shelve save and set aside changes from the working directory
64 shelve save and set aside changes from the working directory
65 status show changed files in the working directory
65 status show changed files in the working directory
66 summary summarize working directory state
66 summary summarize working directory state
67 unshelve restore a shelved change to the working directory
67 unshelve restore a shelved change to the working directory
68 update update working directory (or switch revisions)
68 update update working directory (or switch revisions)
69
69
70 Change import/export:
70 Change import/export:
71
71
72 archive create an unversioned archive of a repository revision
72 archive create an unversioned archive of a repository revision
73 bundle create a bundle file
73 bundle create a bundle file
74 export dump the header and diffs for one or more changesets
74 export dump the header and diffs for one or more changesets
75 import import an ordered set of patches
75 import import an ordered set of patches
76 unbundle apply one or more bundle files
76 unbundle apply one or more bundle files
77
77
78 Repository maintenance:
78 Repository maintenance:
79
79
80 manifest output the current or given revision of the project manifest
80 manifest output the current or given revision of the project manifest
81 recover roll back an interrupted transaction
81 recover roll back an interrupted transaction
82 verify verify the integrity of the repository
82 verify verify the integrity of the repository
83
83
84 Help:
84 Help:
85
85
86 config show combined config settings from all hgrc files
86 config show combined config settings from all hgrc files
87 help show help for a given topic or a help overview
87 help show help for a given topic or a help overview
88 version output version and copyright information
88 version output version and copyright information
89
89
90 additional help topics:
90 additional help topics:
91
91
92 Mercurial identifiers:
92 Mercurial identifiers:
93
93
94 filesets Specifying File Sets
94 filesets Specifying File Sets
95 hgignore Syntax for Mercurial Ignore Files
95 hgignore Syntax for Mercurial Ignore Files
96 patterns File Name Patterns
96 patterns File Name Patterns
97 revisions Specifying Revisions
97 revisions Specifying Revisions
98 urls URL Paths
98 urls URL Paths
99
99
100 Mercurial output:
100 Mercurial output:
101
101
102 color Colorizing Outputs
102 color Colorizing Outputs
103 dates Date Formats
103 dates Date Formats
104 diffs Diff Formats
104 diffs Diff Formats
105 templating Template Usage
105 templating Template Usage
106
106
107 Mercurial configuration:
107 Mercurial configuration:
108
108
109 config Configuration Files
109 config Configuration Files
110 environment Environment Variables
110 environment Environment Variables
111 extensions Using Additional Features
111 extensions Using Additional Features
112 flags Command-line flags
112 flags Command-line flags
113 hgweb Configuring hgweb
113 hgweb Configuring hgweb
114 merge-tools Merge Tools
114 merge-tools Merge Tools
115 pager Pager Support
115 pager Pager Support
116 rust Rust in Mercurial
116
117
117 Concepts:
118 Concepts:
118
119
119 bundlespec Bundle File Formats
120 bundlespec Bundle File Formats
120 evolution Safely rewriting history (EXPERIMENTAL)
121 evolution Safely rewriting history (EXPERIMENTAL)
121 glossary Glossary
122 glossary Glossary
122 phases Working with Phases
123 phases Working with Phases
123 subrepos Subrepositories
124 subrepos Subrepositories
124
125
125 Miscellaneous:
126 Miscellaneous:
126
127
127 deprecated Deprecated Features
128 deprecated Deprecated Features
128 internals Technical implementation topics
129 internals Technical implementation topics
129 scripting Using Mercurial from scripts and automation
130 scripting Using Mercurial from scripts and automation
130
131
131 (use 'hg help -v' to show built-in aliases and global options)
132 (use 'hg help -v' to show built-in aliases and global options)
132
133
133 Test hiding some topics.
134 Test hiding some topics.
134
135
135 $ hg --config help.hidden-topic.deprecated=true \
136 $ hg --config help.hidden-topic.deprecated=true \
136 > --config help.hidden-topic.internals=true \
137 > --config help.hidden-topic.internals=true \
137 > --config help.hidden-topic.scripting=true help
138 > --config help.hidden-topic.scripting=true help
138 Mercurial Distributed SCM
139 Mercurial Distributed SCM
139
140
140 list of commands:
141 list of commands:
141
142
142 Repository creation:
143 Repository creation:
143
144
144 clone make a copy of an existing repository
145 clone make a copy of an existing repository
145 init create a new repository in the given directory
146 init create a new repository in the given directory
146
147
147 Remote repository management:
148 Remote repository management:
148
149
149 incoming show new changesets found in source
150 incoming show new changesets found in source
150 outgoing show changesets not found in the destination
151 outgoing show changesets not found in the destination
151 paths show aliases for remote repositories
152 paths show aliases for remote repositories
152 pull pull changes from the specified source
153 pull pull changes from the specified source
153 push push changes to the specified destination
154 push push changes to the specified destination
154 serve start stand-alone webserver
155 serve start stand-alone webserver
155
156
156 Change creation:
157 Change creation:
157
158
158 commit commit the specified files or all outstanding changes
159 commit commit the specified files or all outstanding changes
159
160
160 Change manipulation:
161 Change manipulation:
161
162
162 backout reverse effect of earlier changeset
163 backout reverse effect of earlier changeset
163 graft copy changes from other branches onto the current branch
164 graft copy changes from other branches onto the current branch
164 merge merge another revision into working directory
165 merge merge another revision into working directory
165
166
166 Change organization:
167 Change organization:
167
168
168 bookmarks create a new bookmark or list existing bookmarks
169 bookmarks create a new bookmark or list existing bookmarks
169 branch set or show the current branch name
170 branch set or show the current branch name
170 branches list repository named branches
171 branches list repository named branches
171 phase set or show the current phase name
172 phase set or show the current phase name
172 tag add one or more tags for the current or given revision
173 tag add one or more tags for the current or given revision
173 tags list repository tags
174 tags list repository tags
174
175
175 File content management:
176 File content management:
176
177
177 annotate show changeset information by line for each file
178 annotate show changeset information by line for each file
178 cat output the current or given revision of files
179 cat output the current or given revision of files
179 copy mark files as copied for the next commit
180 copy mark files as copied for the next commit
180 diff diff repository (or selected files)
181 diff diff repository (or selected files)
181 grep search for a pattern in specified files
182 grep search for a pattern in specified files
182
183
183 Change navigation:
184 Change navigation:
184
185
185 bisect subdivision search of changesets
186 bisect subdivision search of changesets
186 heads show branch heads
187 heads show branch heads
187 identify identify the working directory or specified revision
188 identify identify the working directory or specified revision
188 log show revision history of entire repository or files
189 log show revision history of entire repository or files
189
190
190 Working directory management:
191 Working directory management:
191
192
192 add add the specified files on the next commit
193 add add the specified files on the next commit
193 addremove add all new files, delete all missing files
194 addremove add all new files, delete all missing files
194 files list tracked files
195 files list tracked files
195 forget forget the specified files on the next commit
196 forget forget the specified files on the next commit
196 purge removes files not tracked by Mercurial
197 purge removes files not tracked by Mercurial
197 remove remove the specified files on the next commit
198 remove remove the specified files on the next commit
198 rename rename files; equivalent of copy + remove
199 rename rename files; equivalent of copy + remove
199 resolve redo merges or set/view the merge status of files
200 resolve redo merges or set/view the merge status of files
200 revert restore files to their checkout state
201 revert restore files to their checkout state
201 root print the root (top) of the current working directory
202 root print the root (top) of the current working directory
202 shelve save and set aside changes from the working directory
203 shelve save and set aside changes from the working directory
203 status show changed files in the working directory
204 status show changed files in the working directory
204 summary summarize working directory state
205 summary summarize working directory state
205 unshelve restore a shelved change to the working directory
206 unshelve restore a shelved change to the working directory
206 update update working directory (or switch revisions)
207 update update working directory (or switch revisions)
207
208
208 Change import/export:
209 Change import/export:
209
210
210 archive create an unversioned archive of a repository revision
211 archive create an unversioned archive of a repository revision
211 bundle create a bundle file
212 bundle create a bundle file
212 export dump the header and diffs for one or more changesets
213 export dump the header and diffs for one or more changesets
213 import import an ordered set of patches
214 import import an ordered set of patches
214 unbundle apply one or more bundle files
215 unbundle apply one or more bundle files
215
216
216 Repository maintenance:
217 Repository maintenance:
217
218
218 manifest output the current or given revision of the project manifest
219 manifest output the current or given revision of the project manifest
219 recover roll back an interrupted transaction
220 recover roll back an interrupted transaction
220 verify verify the integrity of the repository
221 verify verify the integrity of the repository
221
222
222 Help:
223 Help:
223
224
224 config show combined config settings from all hgrc files
225 config show combined config settings from all hgrc files
225 help show help for a given topic or a help overview
226 help show help for a given topic or a help overview
226 version output version and copyright information
227 version output version and copyright information
227
228
228 additional help topics:
229 additional help topics:
229
230
230 Mercurial identifiers:
231 Mercurial identifiers:
231
232
232 filesets Specifying File Sets
233 filesets Specifying File Sets
233 hgignore Syntax for Mercurial Ignore Files
234 hgignore Syntax for Mercurial Ignore Files
234 patterns File Name Patterns
235 patterns File Name Patterns
235 revisions Specifying Revisions
236 revisions Specifying Revisions
236 urls URL Paths
237 urls URL Paths
237
238
238 Mercurial output:
239 Mercurial output:
239
240
240 color Colorizing Outputs
241 color Colorizing Outputs
241 dates Date Formats
242 dates Date Formats
242 diffs Diff Formats
243 diffs Diff Formats
243 templating Template Usage
244 templating Template Usage
244
245
245 Mercurial configuration:
246 Mercurial configuration:
246
247
247 config Configuration Files
248 config Configuration Files
248 environment Environment Variables
249 environment Environment Variables
249 extensions Using Additional Features
250 extensions Using Additional Features
250 flags Command-line flags
251 flags Command-line flags
251 hgweb Configuring hgweb
252 hgweb Configuring hgweb
252 merge-tools Merge Tools
253 merge-tools Merge Tools
253 pager Pager Support
254 pager Pager Support
255 rust Rust in Mercurial
254
256
255 Concepts:
257 Concepts:
256
258
257 bundlespec Bundle File Formats
259 bundlespec Bundle File Formats
258 evolution Safely rewriting history (EXPERIMENTAL)
260 evolution Safely rewriting history (EXPERIMENTAL)
259 glossary Glossary
261 glossary Glossary
260 phases Working with Phases
262 phases Working with Phases
261 subrepos Subrepositories
263 subrepos Subrepositories
262
264
263 (use 'hg help -v' to show built-in aliases and global options)
265 (use 'hg help -v' to show built-in aliases and global options)
@@ -1,4032 +1,4043 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 Repository creation:
56 Repository creation:
57
57
58 clone make a copy of an existing repository
58 clone make a copy of an existing repository
59 init create a new repository in the given directory
59 init create a new repository in the given directory
60
60
61 Remote repository management:
61 Remote repository management:
62
62
63 incoming show new changesets found in source
63 incoming show new changesets found in source
64 outgoing show changesets not found in the destination
64 outgoing show changesets not found in the destination
65 paths show aliases for remote repositories
65 paths show aliases for remote repositories
66 pull pull changes from the specified source
66 pull pull changes from the specified source
67 push push changes to the specified destination
67 push push changes to the specified destination
68 serve start stand-alone webserver
68 serve start stand-alone webserver
69
69
70 Change creation:
70 Change creation:
71
71
72 commit commit the specified files or all outstanding changes
72 commit commit the specified files or all outstanding changes
73
73
74 Change manipulation:
74 Change manipulation:
75
75
76 backout reverse effect of earlier changeset
76 backout reverse effect of earlier changeset
77 graft copy changes from other branches onto the current branch
77 graft copy changes from other branches onto the current branch
78 merge merge another revision into working directory
78 merge merge another revision into working directory
79
79
80 Change organization:
80 Change organization:
81
81
82 bookmarks create a new bookmark or list existing bookmarks
82 bookmarks create a new bookmark or list existing bookmarks
83 branch set or show the current branch name
83 branch set or show the current branch name
84 branches list repository named branches
84 branches list repository named branches
85 phase set or show the current phase name
85 phase set or show the current phase name
86 tag add one or more tags for the current or given revision
86 tag add one or more tags for the current or given revision
87 tags list repository tags
87 tags list repository tags
88
88
89 File content management:
89 File content management:
90
90
91 annotate show changeset information by line for each file
91 annotate show changeset information by line for each file
92 cat output the current or given revision of files
92 cat output the current or given revision of files
93 copy mark files as copied for the next commit
93 copy mark files as copied for the next commit
94 diff diff repository (or selected files)
94 diff diff repository (or selected files)
95 grep search for a pattern in specified files
95 grep search for a pattern in specified files
96
96
97 Change navigation:
97 Change navigation:
98
98
99 bisect subdivision search of changesets
99 bisect subdivision search of changesets
100 heads show branch heads
100 heads show branch heads
101 identify identify the working directory or specified revision
101 identify identify the working directory or specified revision
102 log show revision history of entire repository or files
102 log show revision history of entire repository or files
103
103
104 Working directory management:
104 Working directory management:
105
105
106 add add the specified files on the next commit
106 add add the specified files on the next commit
107 addremove add all new files, delete all missing files
107 addremove add all new files, delete all missing files
108 files list tracked files
108 files list tracked files
109 forget forget the specified files on the next commit
109 forget forget the specified files on the next commit
110 purge removes files not tracked by Mercurial
110 purge removes files not tracked by Mercurial
111 remove remove the specified files on the next commit
111 remove remove the specified files on the next commit
112 rename rename files; equivalent of copy + remove
112 rename rename files; equivalent of copy + remove
113 resolve redo merges or set/view the merge status of files
113 resolve redo merges or set/view the merge status of files
114 revert restore files to their checkout state
114 revert restore files to their checkout state
115 root print the root (top) of the current working directory
115 root print the root (top) of the current working directory
116 shelve save and set aside changes from the working directory
116 shelve save and set aside changes from the working directory
117 status show changed files in the working directory
117 status show changed files in the working directory
118 summary summarize working directory state
118 summary summarize working directory state
119 unshelve restore a shelved change to the working directory
119 unshelve restore a shelved change to the working directory
120 update update working directory (or switch revisions)
120 update update working directory (or switch revisions)
121
121
122 Change import/export:
122 Change import/export:
123
123
124 archive create an unversioned archive of a repository revision
124 archive create an unversioned archive of a repository revision
125 bundle create a bundle file
125 bundle create a bundle file
126 export dump the header and diffs for one or more changesets
126 export dump the header and diffs for one or more changesets
127 import import an ordered set of patches
127 import import an ordered set of patches
128 unbundle apply one or more bundle files
128 unbundle apply one or more bundle files
129
129
130 Repository maintenance:
130 Repository maintenance:
131
131
132 manifest output the current or given revision of the project manifest
132 manifest output the current or given revision of the project manifest
133 recover roll back an interrupted transaction
133 recover roll back an interrupted transaction
134 verify verify the integrity of the repository
134 verify verify the integrity of the repository
135
135
136 Help:
136 Help:
137
137
138 config show combined config settings from all hgrc files
138 config show combined config settings from all hgrc files
139 help show help for a given topic or a help overview
139 help show help for a given topic or a help overview
140 version output version and copyright information
140 version output version and copyright information
141
141
142 additional help topics:
142 additional help topics:
143
143
144 Mercurial identifiers:
144 Mercurial identifiers:
145
145
146 filesets Specifying File Sets
146 filesets Specifying File Sets
147 hgignore Syntax for Mercurial Ignore Files
147 hgignore Syntax for Mercurial Ignore Files
148 patterns File Name Patterns
148 patterns File Name Patterns
149 revisions Specifying Revisions
149 revisions Specifying Revisions
150 urls URL Paths
150 urls URL Paths
151
151
152 Mercurial output:
152 Mercurial output:
153
153
154 color Colorizing Outputs
154 color Colorizing Outputs
155 dates Date Formats
155 dates Date Formats
156 diffs Diff Formats
156 diffs Diff Formats
157 templating Template Usage
157 templating Template Usage
158
158
159 Mercurial configuration:
159 Mercurial configuration:
160
160
161 config Configuration Files
161 config Configuration Files
162 environment Environment Variables
162 environment Environment Variables
163 extensions Using Additional Features
163 extensions Using Additional Features
164 flags Command-line flags
164 flags Command-line flags
165 hgweb Configuring hgweb
165 hgweb Configuring hgweb
166 merge-tools Merge Tools
166 merge-tools Merge Tools
167 pager Pager Support
167 pager Pager Support
168 rust Rust in Mercurial
168
169
169 Concepts:
170 Concepts:
170
171
171 bundlespec Bundle File Formats
172 bundlespec Bundle File Formats
172 evolution Safely rewriting history (EXPERIMENTAL)
173 evolution Safely rewriting history (EXPERIMENTAL)
173 glossary Glossary
174 glossary Glossary
174 phases Working with Phases
175 phases Working with Phases
175 subrepos Subrepositories
176 subrepos Subrepositories
176
177
177 Miscellaneous:
178 Miscellaneous:
178
179
179 deprecated Deprecated Features
180 deprecated Deprecated Features
180 internals Technical implementation topics
181 internals Technical implementation topics
181 scripting Using Mercurial from scripts and automation
182 scripting Using Mercurial from scripts and automation
182
183
183 (use 'hg help -v' to show built-in aliases and global options)
184 (use 'hg help -v' to show built-in aliases and global options)
184
185
185 $ hg -q help
186 $ hg -q help
186 Repository creation:
187 Repository creation:
187
188
188 clone make a copy of an existing repository
189 clone make a copy of an existing repository
189 init create a new repository in the given directory
190 init create a new repository in the given directory
190
191
191 Remote repository management:
192 Remote repository management:
192
193
193 incoming show new changesets found in source
194 incoming show new changesets found in source
194 outgoing show changesets not found in the destination
195 outgoing show changesets not found in the destination
195 paths show aliases for remote repositories
196 paths show aliases for remote repositories
196 pull pull changes from the specified source
197 pull pull changes from the specified source
197 push push changes to the specified destination
198 push push changes to the specified destination
198 serve start stand-alone webserver
199 serve start stand-alone webserver
199
200
200 Change creation:
201 Change creation:
201
202
202 commit commit the specified files or all outstanding changes
203 commit commit the specified files or all outstanding changes
203
204
204 Change manipulation:
205 Change manipulation:
205
206
206 backout reverse effect of earlier changeset
207 backout reverse effect of earlier changeset
207 graft copy changes from other branches onto the current branch
208 graft copy changes from other branches onto the current branch
208 merge merge another revision into working directory
209 merge merge another revision into working directory
209
210
210 Change organization:
211 Change organization:
211
212
212 bookmarks create a new bookmark or list existing bookmarks
213 bookmarks create a new bookmark or list existing bookmarks
213 branch set or show the current branch name
214 branch set or show the current branch name
214 branches list repository named branches
215 branches list repository named branches
215 phase set or show the current phase name
216 phase set or show the current phase name
216 tag add one or more tags for the current or given revision
217 tag add one or more tags for the current or given revision
217 tags list repository tags
218 tags list repository tags
218
219
219 File content management:
220 File content management:
220
221
221 annotate show changeset information by line for each file
222 annotate show changeset information by line for each file
222 cat output the current or given revision of files
223 cat output the current or given revision of files
223 copy mark files as copied for the next commit
224 copy mark files as copied for the next commit
224 diff diff repository (or selected files)
225 diff diff repository (or selected files)
225 grep search for a pattern in specified files
226 grep search for a pattern in specified files
226
227
227 Change navigation:
228 Change navigation:
228
229
229 bisect subdivision search of changesets
230 bisect subdivision search of changesets
230 heads show branch heads
231 heads show branch heads
231 identify identify the working directory or specified revision
232 identify identify the working directory or specified revision
232 log show revision history of entire repository or files
233 log show revision history of entire repository or files
233
234
234 Working directory management:
235 Working directory management:
235
236
236 add add the specified files on the next commit
237 add add the specified files on the next commit
237 addremove add all new files, delete all missing files
238 addremove add all new files, delete all missing files
238 files list tracked files
239 files list tracked files
239 forget forget the specified files on the next commit
240 forget forget the specified files on the next commit
240 purge removes files not tracked by Mercurial
241 purge removes files not tracked by Mercurial
241 remove remove the specified files on the next commit
242 remove remove the specified files on the next commit
242 rename rename files; equivalent of copy + remove
243 rename rename files; equivalent of copy + remove
243 resolve redo merges or set/view the merge status of files
244 resolve redo merges or set/view the merge status of files
244 revert restore files to their checkout state
245 revert restore files to their checkout state
245 root print the root (top) of the current working directory
246 root print the root (top) of the current working directory
246 shelve save and set aside changes from the working directory
247 shelve save and set aside changes from the working directory
247 status show changed files in the working directory
248 status show changed files in the working directory
248 summary summarize working directory state
249 summary summarize working directory state
249 unshelve restore a shelved change to the working directory
250 unshelve restore a shelved change to the working directory
250 update update working directory (or switch revisions)
251 update update working directory (or switch revisions)
251
252
252 Change import/export:
253 Change import/export:
253
254
254 archive create an unversioned archive of a repository revision
255 archive create an unversioned archive of a repository revision
255 bundle create a bundle file
256 bundle create a bundle file
256 export dump the header and diffs for one or more changesets
257 export dump the header and diffs for one or more changesets
257 import import an ordered set of patches
258 import import an ordered set of patches
258 unbundle apply one or more bundle files
259 unbundle apply one or more bundle files
259
260
260 Repository maintenance:
261 Repository maintenance:
261
262
262 manifest output the current or given revision of the project manifest
263 manifest output the current or given revision of the project manifest
263 recover roll back an interrupted transaction
264 recover roll back an interrupted transaction
264 verify verify the integrity of the repository
265 verify verify the integrity of the repository
265
266
266 Help:
267 Help:
267
268
268 config show combined config settings from all hgrc files
269 config show combined config settings from all hgrc files
269 help show help for a given topic or a help overview
270 help show help for a given topic or a help overview
270 version output version and copyright information
271 version output version and copyright information
271
272
272 additional help topics:
273 additional help topics:
273
274
274 Mercurial identifiers:
275 Mercurial identifiers:
275
276
276 filesets Specifying File Sets
277 filesets Specifying File Sets
277 hgignore Syntax for Mercurial Ignore Files
278 hgignore Syntax for Mercurial Ignore Files
278 patterns File Name Patterns
279 patterns File Name Patterns
279 revisions Specifying Revisions
280 revisions Specifying Revisions
280 urls URL Paths
281 urls URL Paths
281
282
282 Mercurial output:
283 Mercurial output:
283
284
284 color Colorizing Outputs
285 color Colorizing Outputs
285 dates Date Formats
286 dates Date Formats
286 diffs Diff Formats
287 diffs Diff Formats
287 templating Template Usage
288 templating Template Usage
288
289
289 Mercurial configuration:
290 Mercurial configuration:
290
291
291 config Configuration Files
292 config Configuration Files
292 environment Environment Variables
293 environment Environment Variables
293 extensions Using Additional Features
294 extensions Using Additional Features
294 flags Command-line flags
295 flags Command-line flags
295 hgweb Configuring hgweb
296 hgweb Configuring hgweb
296 merge-tools Merge Tools
297 merge-tools Merge Tools
297 pager Pager Support
298 pager Pager Support
299 rust Rust in Mercurial
298
300
299 Concepts:
301 Concepts:
300
302
301 bundlespec Bundle File Formats
303 bundlespec Bundle File Formats
302 evolution Safely rewriting history (EXPERIMENTAL)
304 evolution Safely rewriting history (EXPERIMENTAL)
303 glossary Glossary
305 glossary Glossary
304 phases Working with Phases
306 phases Working with Phases
305 subrepos Subrepositories
307 subrepos Subrepositories
306
308
307 Miscellaneous:
309 Miscellaneous:
308
310
309 deprecated Deprecated Features
311 deprecated Deprecated Features
310 internals Technical implementation topics
312 internals Technical implementation topics
311 scripting Using Mercurial from scripts and automation
313 scripting Using Mercurial from scripts and automation
312
314
313 Test extension help:
315 Test extension help:
314 $ hg help extensions --config extensions.rebase= --config extensions.children=
316 $ hg help extensions --config extensions.rebase= --config extensions.children=
315 Using Additional Features
317 Using Additional Features
316 """""""""""""""""""""""""
318 """""""""""""""""""""""""
317
319
318 Mercurial has the ability to add new features through the use of
320 Mercurial has the ability to add new features through the use of
319 extensions. Extensions may add new commands, add options to existing
321 extensions. Extensions may add new commands, add options to existing
320 commands, change the default behavior of commands, or implement hooks.
322 commands, change the default behavior of commands, or implement hooks.
321
323
322 To enable the "foo" extension, either shipped with Mercurial or in the
324 To enable the "foo" extension, either shipped with Mercurial or in the
323 Python search path, create an entry for it in your configuration file,
325 Python search path, create an entry for it in your configuration file,
324 like this:
326 like this:
325
327
326 [extensions]
328 [extensions]
327 foo =
329 foo =
328
330
329 You may also specify the full path to an extension:
331 You may also specify the full path to an extension:
330
332
331 [extensions]
333 [extensions]
332 myfeature = ~/.hgext/myfeature.py
334 myfeature = ~/.hgext/myfeature.py
333
335
334 See 'hg help config' for more information on configuration files.
336 See 'hg help config' for more information on configuration files.
335
337
336 Extensions are not loaded by default for a variety of reasons: they can
338 Extensions are not loaded by default for a variety of reasons: they can
337 increase startup overhead; they may be meant for advanced usage only; they
339 increase startup overhead; they may be meant for advanced usage only; they
338 may provide potentially dangerous abilities (such as letting you destroy
340 may provide potentially dangerous abilities (such as letting you destroy
339 or modify history); they might not be ready for prime time; or they may
341 or modify history); they might not be ready for prime time; or they may
340 alter some usual behaviors of stock Mercurial. It is thus up to the user
342 alter some usual behaviors of stock Mercurial. It is thus up to the user
341 to activate extensions as needed.
343 to activate extensions as needed.
342
344
343 To explicitly disable an extension enabled in a configuration file of
345 To explicitly disable an extension enabled in a configuration file of
344 broader scope, prepend its path with !:
346 broader scope, prepend its path with !:
345
347
346 [extensions]
348 [extensions]
347 # disabling extension bar residing in /path/to/extension/bar.py
349 # disabling extension bar residing in /path/to/extension/bar.py
348 bar = !/path/to/extension/bar.py
350 bar = !/path/to/extension/bar.py
349 # ditto, but no path was supplied for extension baz
351 # ditto, but no path was supplied for extension baz
350 baz = !
352 baz = !
351
353
352 enabled extensions:
354 enabled extensions:
353
355
354 children command to display child changesets (DEPRECATED)
356 children command to display child changesets (DEPRECATED)
355 rebase command to move sets of revisions to a different ancestor
357 rebase command to move sets of revisions to a different ancestor
356
358
357 disabled extensions:
359 disabled extensions:
358
360
359 acl hooks for controlling repository access
361 acl hooks for controlling repository access
360 blackbox log repository events to a blackbox for debugging
362 blackbox log repository events to a blackbox for debugging
361 bugzilla hooks for integrating with the Bugzilla bug tracker
363 bugzilla hooks for integrating with the Bugzilla bug tracker
362 censor erase file content at a given revision
364 censor erase file content at a given revision
363 churn command to display statistics about repository history
365 churn command to display statistics about repository history
364 clonebundles advertise pre-generated bundles to seed clones
366 clonebundles advertise pre-generated bundles to seed clones
365 closehead close arbitrary heads without checking them out first
367 closehead close arbitrary heads without checking them out first
366 convert import revisions from foreign VCS repositories into
368 convert import revisions from foreign VCS repositories into
367 Mercurial
369 Mercurial
368 eol automatically manage newlines in repository files
370 eol automatically manage newlines in repository files
369 extdiff command to allow external programs to compare revisions
371 extdiff command to allow external programs to compare revisions
370 factotum http authentication with factotum
372 factotum http authentication with factotum
371 fastexport export repositories as git fast-import stream
373 fastexport export repositories as git fast-import stream
372 githelp try mapping git commands to Mercurial commands
374 githelp try mapping git commands to Mercurial commands
373 gpg commands to sign and verify changesets
375 gpg commands to sign and verify changesets
374 hgk browse the repository in a graphical way
376 hgk browse the repository in a graphical way
375 highlight syntax highlighting for hgweb (requires Pygments)
377 highlight syntax highlighting for hgweb (requires Pygments)
376 histedit interactive history editing
378 histedit interactive history editing
377 keyword expand keywords in tracked files
379 keyword expand keywords in tracked files
378 largefiles track large binary files
380 largefiles track large binary files
379 mq manage a stack of patches
381 mq manage a stack of patches
380 notify hooks for sending email push notifications
382 notify hooks for sending email push notifications
381 patchbomb command to send changesets as (a series of) patch emails
383 patchbomb command to send changesets as (a series of) patch emails
382 relink recreates hardlinks between repository clones
384 relink recreates hardlinks between repository clones
383 schemes extend schemes with shortcuts to repository swarms
385 schemes extend schemes with shortcuts to repository swarms
384 share share a common history between several working directories
386 share share a common history between several working directories
385 transplant command to transplant changesets from another branch
387 transplant command to transplant changesets from another branch
386 win32mbcs allow the use of MBCS paths with problematic encodings
388 win32mbcs allow the use of MBCS paths with problematic encodings
387 zeroconf discover and advertise repositories on the local network
389 zeroconf discover and advertise repositories on the local network
388
390
389 #endif
391 #endif
390
392
391 Verify that deprecated extensions are included if --verbose:
393 Verify that deprecated extensions are included if --verbose:
392
394
393 $ hg -v help extensions | grep children
395 $ hg -v help extensions | grep children
394 children command to display child changesets (DEPRECATED)
396 children command to display child changesets (DEPRECATED)
395
397
396 Verify that extension keywords appear in help templates
398 Verify that extension keywords appear in help templates
397
399
398 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
400 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
399
401
400 Test short command list with verbose option
402 Test short command list with verbose option
401
403
402 $ hg -v help shortlist
404 $ hg -v help shortlist
403 Mercurial Distributed SCM
405 Mercurial Distributed SCM
404
406
405 basic commands:
407 basic commands:
406
408
407 abort abort an unfinished operation (EXPERIMENTAL)
409 abort abort an unfinished operation (EXPERIMENTAL)
408 add add the specified files on the next commit
410 add add the specified files on the next commit
409 annotate, blame
411 annotate, blame
410 show changeset information by line for each file
412 show changeset information by line for each file
411 clone make a copy of an existing repository
413 clone make a copy of an existing repository
412 commit, ci commit the specified files or all outstanding changes
414 commit, ci commit the specified files or all outstanding changes
413 continue resumes an interrupted operation (EXPERIMENTAL)
415 continue resumes an interrupted operation (EXPERIMENTAL)
414 diff diff repository (or selected files)
416 diff diff repository (or selected files)
415 export dump the header and diffs for one or more changesets
417 export dump the header and diffs for one or more changesets
416 forget forget the specified files on the next commit
418 forget forget the specified files on the next commit
417 init create a new repository in the given directory
419 init create a new repository in the given directory
418 log, history show revision history of entire repository or files
420 log, history show revision history of entire repository or files
419 merge merge another revision into working directory
421 merge merge another revision into working directory
420 pull pull changes from the specified source
422 pull pull changes from the specified source
421 push push changes to the specified destination
423 push push changes to the specified destination
422 remove, rm remove the specified files on the next commit
424 remove, rm remove the specified files on the next commit
423 serve start stand-alone webserver
425 serve start stand-alone webserver
424 status, st show changed files in the working directory
426 status, st show changed files in the working directory
425 summary, sum summarize working directory state
427 summary, sum summarize working directory state
426 update, up, checkout, co
428 update, up, checkout, co
427 update working directory (or switch revisions)
429 update working directory (or switch revisions)
428
430
429 global options ([+] can be repeated):
431 global options ([+] can be repeated):
430
432
431 -R --repository REPO repository root directory or name of overlay bundle
433 -R --repository REPO repository root directory or name of overlay bundle
432 file
434 file
433 --cwd DIR change working directory
435 --cwd DIR change working directory
434 -y --noninteractive do not prompt, automatically pick the first choice for
436 -y --noninteractive do not prompt, automatically pick the first choice for
435 all prompts
437 all prompts
436 -q --quiet suppress output
438 -q --quiet suppress output
437 -v --verbose enable additional output
439 -v --verbose enable additional output
438 --color TYPE when to colorize (boolean, always, auto, never, or
440 --color TYPE when to colorize (boolean, always, auto, never, or
439 debug)
441 debug)
440 --config CONFIG [+] set/override config option (use 'section.name=value')
442 --config CONFIG [+] set/override config option (use 'section.name=value')
441 --debug enable debugging output
443 --debug enable debugging output
442 --debugger start debugger
444 --debugger start debugger
443 --encoding ENCODE set the charset encoding (default: ascii)
445 --encoding ENCODE set the charset encoding (default: ascii)
444 --encodingmode MODE set the charset encoding mode (default: strict)
446 --encodingmode MODE set the charset encoding mode (default: strict)
445 --traceback always print a traceback on exception
447 --traceback always print a traceback on exception
446 --time time how long the command takes
448 --time time how long the command takes
447 --profile print command execution profile
449 --profile print command execution profile
448 --version output version information and exit
450 --version output version information and exit
449 -h --help display help and exit
451 -h --help display help and exit
450 --hidden consider hidden changesets
452 --hidden consider hidden changesets
451 --pager TYPE when to paginate (boolean, always, auto, or never)
453 --pager TYPE when to paginate (boolean, always, auto, or never)
452 (default: auto)
454 (default: auto)
453
455
454 (use 'hg help' for the full list of commands)
456 (use 'hg help' for the full list of commands)
455
457
456 $ hg add -h
458 $ hg add -h
457 hg add [OPTION]... [FILE]...
459 hg add [OPTION]... [FILE]...
458
460
459 add the specified files on the next commit
461 add the specified files on the next commit
460
462
461 Schedule files to be version controlled and added to the repository.
463 Schedule files to be version controlled and added to the repository.
462
464
463 The files will be added to the repository at the next commit. To undo an
465 The files will be added to the repository at the next commit. To undo an
464 add before that, see 'hg forget'.
466 add before that, see 'hg forget'.
465
467
466 If no names are given, add all files to the repository (except files
468 If no names are given, add all files to the repository (except files
467 matching ".hgignore").
469 matching ".hgignore").
468
470
469 Returns 0 if all files are successfully added.
471 Returns 0 if all files are successfully added.
470
472
471 options ([+] can be repeated):
473 options ([+] can be repeated):
472
474
473 -I --include PATTERN [+] include names matching the given patterns
475 -I --include PATTERN [+] include names matching the given patterns
474 -X --exclude PATTERN [+] exclude names matching the given patterns
476 -X --exclude PATTERN [+] exclude names matching the given patterns
475 -S --subrepos recurse into subrepositories
477 -S --subrepos recurse into subrepositories
476 -n --dry-run do not perform actions, just print output
478 -n --dry-run do not perform actions, just print output
477
479
478 (some details hidden, use --verbose to show complete help)
480 (some details hidden, use --verbose to show complete help)
479
481
480 Verbose help for add
482 Verbose help for add
481
483
482 $ hg add -hv
484 $ hg add -hv
483 hg add [OPTION]... [FILE]...
485 hg add [OPTION]... [FILE]...
484
486
485 add the specified files on the next commit
487 add the specified files on the next commit
486
488
487 Schedule files to be version controlled and added to the repository.
489 Schedule files to be version controlled and added to the repository.
488
490
489 The files will be added to the repository at the next commit. To undo an
491 The files will be added to the repository at the next commit. To undo an
490 add before that, see 'hg forget'.
492 add before that, see 'hg forget'.
491
493
492 If no names are given, add all files to the repository (except files
494 If no names are given, add all files to the repository (except files
493 matching ".hgignore").
495 matching ".hgignore").
494
496
495 Examples:
497 Examples:
496
498
497 - New (unknown) files are added automatically by 'hg add':
499 - New (unknown) files are added automatically by 'hg add':
498
500
499 $ ls
501 $ ls
500 foo.c
502 foo.c
501 $ hg status
503 $ hg status
502 ? foo.c
504 ? foo.c
503 $ hg add
505 $ hg add
504 adding foo.c
506 adding foo.c
505 $ hg status
507 $ hg status
506 A foo.c
508 A foo.c
507
509
508 - Specific files to be added can be specified:
510 - Specific files to be added can be specified:
509
511
510 $ ls
512 $ ls
511 bar.c foo.c
513 bar.c foo.c
512 $ hg status
514 $ hg status
513 ? bar.c
515 ? bar.c
514 ? foo.c
516 ? foo.c
515 $ hg add bar.c
517 $ hg add bar.c
516 $ hg status
518 $ hg status
517 A bar.c
519 A bar.c
518 ? foo.c
520 ? foo.c
519
521
520 Returns 0 if all files are successfully added.
522 Returns 0 if all files are successfully added.
521
523
522 options ([+] can be repeated):
524 options ([+] can be repeated):
523
525
524 -I --include PATTERN [+] include names matching the given patterns
526 -I --include PATTERN [+] include names matching the given patterns
525 -X --exclude PATTERN [+] exclude names matching the given patterns
527 -X --exclude PATTERN [+] exclude names matching the given patterns
526 -S --subrepos recurse into subrepositories
528 -S --subrepos recurse into subrepositories
527 -n --dry-run do not perform actions, just print output
529 -n --dry-run do not perform actions, just print output
528
530
529 global options ([+] can be repeated):
531 global options ([+] can be repeated):
530
532
531 -R --repository REPO repository root directory or name of overlay bundle
533 -R --repository REPO repository root directory or name of overlay bundle
532 file
534 file
533 --cwd DIR change working directory
535 --cwd DIR change working directory
534 -y --noninteractive do not prompt, automatically pick the first choice for
536 -y --noninteractive do not prompt, automatically pick the first choice for
535 all prompts
537 all prompts
536 -q --quiet suppress output
538 -q --quiet suppress output
537 -v --verbose enable additional output
539 -v --verbose enable additional output
538 --color TYPE when to colorize (boolean, always, auto, never, or
540 --color TYPE when to colorize (boolean, always, auto, never, or
539 debug)
541 debug)
540 --config CONFIG [+] set/override config option (use 'section.name=value')
542 --config CONFIG [+] set/override config option (use 'section.name=value')
541 --debug enable debugging output
543 --debug enable debugging output
542 --debugger start debugger
544 --debugger start debugger
543 --encoding ENCODE set the charset encoding (default: ascii)
545 --encoding ENCODE set the charset encoding (default: ascii)
544 --encodingmode MODE set the charset encoding mode (default: strict)
546 --encodingmode MODE set the charset encoding mode (default: strict)
545 --traceback always print a traceback on exception
547 --traceback always print a traceback on exception
546 --time time how long the command takes
548 --time time how long the command takes
547 --profile print command execution profile
549 --profile print command execution profile
548 --version output version information and exit
550 --version output version information and exit
549 -h --help display help and exit
551 -h --help display help and exit
550 --hidden consider hidden changesets
552 --hidden consider hidden changesets
551 --pager TYPE when to paginate (boolean, always, auto, or never)
553 --pager TYPE when to paginate (boolean, always, auto, or never)
552 (default: auto)
554 (default: auto)
553
555
554 Test the textwidth config option
556 Test the textwidth config option
555
557
556 $ hg root -h --config ui.textwidth=50
558 $ hg root -h --config ui.textwidth=50
557 hg root
559 hg root
558
560
559 print the root (top) of the current working
561 print the root (top) of the current working
560 directory
562 directory
561
563
562 Print the root directory of the current
564 Print the root directory of the current
563 repository.
565 repository.
564
566
565 Returns 0 on success.
567 Returns 0 on success.
566
568
567 options:
569 options:
568
570
569 -T --template TEMPLATE display with template
571 -T --template TEMPLATE display with template
570
572
571 (some details hidden, use --verbose to show
573 (some details hidden, use --verbose to show
572 complete help)
574 complete help)
573
575
574 Test help option with version option
576 Test help option with version option
575
577
576 $ hg add -h --version
578 $ hg add -h --version
577 Mercurial Distributed SCM (version *) (glob)
579 Mercurial Distributed SCM (version *) (glob)
578 (see https://mercurial-scm.org for more information)
580 (see https://mercurial-scm.org for more information)
579
581
580 Copyright (C) 2005-* Olivia Mackall and others (glob)
582 Copyright (C) 2005-* Olivia Mackall and others (glob)
581 This is free software; see the source for copying conditions. There is NO
583 This is free software; see the source for copying conditions. There is NO
582 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
584 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
583
585
584 $ hg add --skjdfks
586 $ hg add --skjdfks
585 hg add: option --skjdfks not recognized
587 hg add: option --skjdfks not recognized
586 hg add [OPTION]... [FILE]...
588 hg add [OPTION]... [FILE]...
587
589
588 add the specified files on the next commit
590 add the specified files on the next commit
589
591
590 options ([+] can be repeated):
592 options ([+] can be repeated):
591
593
592 -I --include PATTERN [+] include names matching the given patterns
594 -I --include PATTERN [+] include names matching the given patterns
593 -X --exclude PATTERN [+] exclude names matching the given patterns
595 -X --exclude PATTERN [+] exclude names matching the given patterns
594 -S --subrepos recurse into subrepositories
596 -S --subrepos recurse into subrepositories
595 -n --dry-run do not perform actions, just print output
597 -n --dry-run do not perform actions, just print output
596
598
597 (use 'hg add -h' to show more help)
599 (use 'hg add -h' to show more help)
598 [10]
600 [10]
599
601
600 Test ambiguous command help
602 Test ambiguous command help
601
603
602 $ hg help ad
604 $ hg help ad
603 list of commands:
605 list of commands:
604
606
605 add add the specified files on the next commit
607 add add the specified files on the next commit
606 addremove add all new files, delete all missing files
608 addremove add all new files, delete all missing files
607
609
608 (use 'hg help -v ad' to show built-in aliases and global options)
610 (use 'hg help -v ad' to show built-in aliases and global options)
609
611
610 Test command without options
612 Test command without options
611
613
612 $ hg help verify
614 $ hg help verify
613 hg verify
615 hg verify
614
616
615 verify the integrity of the repository
617 verify the integrity of the repository
616
618
617 Verify the integrity of the current repository.
619 Verify the integrity of the current repository.
618
620
619 This will perform an extensive check of the repository's integrity,
621 This will perform an extensive check of the repository's integrity,
620 validating the hashes and checksums of each entry in the changelog,
622 validating the hashes and checksums of each entry in the changelog,
621 manifest, and tracked files, as well as the integrity of their crosslinks
623 manifest, and tracked files, as well as the integrity of their crosslinks
622 and indices.
624 and indices.
623
625
624 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
626 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
625 information about recovery from corruption of the repository.
627 information about recovery from corruption of the repository.
626
628
627 Returns 0 on success, 1 if errors are encountered.
629 Returns 0 on success, 1 if errors are encountered.
628
630
629 options:
631 options:
630
632
631 (some details hidden, use --verbose to show complete help)
633 (some details hidden, use --verbose to show complete help)
632
634
633 $ hg help diff
635 $ hg help diff
634 hg diff [OPTION]... ([-c REV] | [--from REV1] [--to REV2]) [FILE]...
636 hg diff [OPTION]... ([-c REV] | [--from REV1] [--to REV2]) [FILE]...
635
637
636 diff repository (or selected files)
638 diff repository (or selected files)
637
639
638 Show differences between revisions for the specified files.
640 Show differences between revisions for the specified files.
639
641
640 Differences between files are shown using the unified diff format.
642 Differences between files are shown using the unified diff format.
641
643
642 Note:
644 Note:
643 'hg diff' may generate unexpected results for merges, as it will
645 'hg diff' may generate unexpected results for merges, as it will
644 default to comparing against the working directory's first parent
646 default to comparing against the working directory's first parent
645 changeset if no revisions are specified.
647 changeset if no revisions are specified.
646
648
647 By default, the working directory files are compared to its first parent.
649 By default, the working directory files are compared to its first parent.
648 To see the differences from another revision, use --from. To see the
650 To see the differences from another revision, use --from. To see the
649 difference to another revision, use --to. For example, 'hg diff --from .^'
651 difference to another revision, use --to. For example, 'hg diff --from .^'
650 will show the differences from the working copy's grandparent to the
652 will show the differences from the working copy's grandparent to the
651 working copy, 'hg diff --to .' will show the diff from the working copy to
653 working copy, 'hg diff --to .' will show the diff from the working copy to
652 its parent (i.e. the reverse of the default), and 'hg diff --from 1.0 --to
654 its parent (i.e. the reverse of the default), and 'hg diff --from 1.0 --to
653 1.2' will show the diff between those two revisions.
655 1.2' will show the diff between those two revisions.
654
656
655 Alternatively you can specify -c/--change with a revision to see the
657 Alternatively you can specify -c/--change with a revision to see the
656 changes in that changeset relative to its first parent (i.e. 'hg diff -c
658 changes in that changeset relative to its first parent (i.e. 'hg diff -c
657 42' is equivalent to 'hg diff --from 42^ --to 42')
659 42' is equivalent to 'hg diff --from 42^ --to 42')
658
660
659 Without the -a/--text option, diff will avoid generating diffs of files it
661 Without the -a/--text option, diff will avoid generating diffs of files it
660 detects as binary. With -a, diff will generate a diff anyway, probably
662 detects as binary. With -a, diff will generate a diff anyway, probably
661 with undesirable results.
663 with undesirable results.
662
664
663 Use the -g/--git option to generate diffs in the git extended diff format.
665 Use the -g/--git option to generate diffs in the git extended diff format.
664 For more information, read 'hg help diffs'.
666 For more information, read 'hg help diffs'.
665
667
666 Returns 0 on success.
668 Returns 0 on success.
667
669
668 options ([+] can be repeated):
670 options ([+] can be repeated):
669
671
670 --from REV1 revision to diff from
672 --from REV1 revision to diff from
671 --to REV2 revision to diff to
673 --to REV2 revision to diff to
672 -c --change REV change made by revision
674 -c --change REV change made by revision
673 -a --text treat all files as text
675 -a --text treat all files as text
674 -g --git use git extended diff format
676 -g --git use git extended diff format
675 --binary generate binary diffs in git mode (default)
677 --binary generate binary diffs in git mode (default)
676 --nodates omit dates from diff headers
678 --nodates omit dates from diff headers
677 --noprefix omit a/ and b/ prefixes from filenames
679 --noprefix omit a/ and b/ prefixes from filenames
678 -p --show-function show which function each change is in
680 -p --show-function show which function each change is in
679 --reverse produce a diff that undoes the changes
681 --reverse produce a diff that undoes the changes
680 -w --ignore-all-space ignore white space when comparing lines
682 -w --ignore-all-space ignore white space when comparing lines
681 -b --ignore-space-change ignore changes in the amount of white space
683 -b --ignore-space-change ignore changes in the amount of white space
682 -B --ignore-blank-lines ignore changes whose lines are all blank
684 -B --ignore-blank-lines ignore changes whose lines are all blank
683 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
685 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
684 -U --unified NUM number of lines of context to show
686 -U --unified NUM number of lines of context to show
685 --stat output diffstat-style summary of changes
687 --stat output diffstat-style summary of changes
686 --root DIR produce diffs relative to subdirectory
688 --root DIR produce diffs relative to subdirectory
687 -I --include PATTERN [+] include names matching the given patterns
689 -I --include PATTERN [+] include names matching the given patterns
688 -X --exclude PATTERN [+] exclude names matching the given patterns
690 -X --exclude PATTERN [+] exclude names matching the given patterns
689 -S --subrepos recurse into subrepositories
691 -S --subrepos recurse into subrepositories
690
692
691 (some details hidden, use --verbose to show complete help)
693 (some details hidden, use --verbose to show complete help)
692
694
693 $ hg help status
695 $ hg help status
694 hg status [OPTION]... [FILE]...
696 hg status [OPTION]... [FILE]...
695
697
696 aliases: st
698 aliases: st
697
699
698 show changed files in the working directory
700 show changed files in the working directory
699
701
700 Show status of files in the repository. If names are given, only files
702 Show status of files in the repository. If names are given, only files
701 that match are shown. Files that are clean or ignored or the source of a
703 that match are shown. Files that are clean or ignored or the source of a
702 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
704 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
703 -C/--copies or -A/--all are given. Unless options described with "show
705 -C/--copies or -A/--all are given. Unless options described with "show
704 only ..." are given, the options -mardu are used.
706 only ..." are given, the options -mardu are used.
705
707
706 Option -q/--quiet hides untracked (unknown and ignored) files unless
708 Option -q/--quiet hides untracked (unknown and ignored) files unless
707 explicitly requested with -u/--unknown or -i/--ignored.
709 explicitly requested with -u/--unknown or -i/--ignored.
708
710
709 Note:
711 Note:
710 'hg status' may appear to disagree with diff if permissions have
712 'hg status' may appear to disagree with diff if permissions have
711 changed or a merge has occurred. The standard diff format does not
713 changed or a merge has occurred. The standard diff format does not
712 report permission changes and diff only reports changes relative to one
714 report permission changes and diff only reports changes relative to one
713 merge parent.
715 merge parent.
714
716
715 If one revision is given, it is used as the base revision. If two
717 If one revision is given, it is used as the base revision. If two
716 revisions are given, the differences between them are shown. The --change
718 revisions are given, the differences between them are shown. The --change
717 option can also be used as a shortcut to list the changed files of a
719 option can also be used as a shortcut to list the changed files of a
718 revision from its first parent.
720 revision from its first parent.
719
721
720 The codes used to show the status of files are:
722 The codes used to show the status of files are:
721
723
722 M = modified
724 M = modified
723 A = added
725 A = added
724 R = removed
726 R = removed
725 C = clean
727 C = clean
726 ! = missing (deleted by non-hg command, but still tracked)
728 ! = missing (deleted by non-hg command, but still tracked)
727 ? = not tracked
729 ? = not tracked
728 I = ignored
730 I = ignored
729 = origin of the previous file (with --copies)
731 = origin of the previous file (with --copies)
730
732
731 Returns 0 on success.
733 Returns 0 on success.
732
734
733 options ([+] can be repeated):
735 options ([+] can be repeated):
734
736
735 -A --all show status of all files
737 -A --all show status of all files
736 -m --modified show only modified files
738 -m --modified show only modified files
737 -a --added show only added files
739 -a --added show only added files
738 -r --removed show only removed files
740 -r --removed show only removed files
739 -d --deleted show only missing files
741 -d --deleted show only missing files
740 -c --clean show only files without changes
742 -c --clean show only files without changes
741 -u --unknown show only unknown (not tracked) files
743 -u --unknown show only unknown (not tracked) files
742 -i --ignored show only ignored files
744 -i --ignored show only ignored files
743 -n --no-status hide status prefix
745 -n --no-status hide status prefix
744 -C --copies show source of copied files
746 -C --copies show source of copied files
745 -0 --print0 end filenames with NUL, for use with xargs
747 -0 --print0 end filenames with NUL, for use with xargs
746 --rev REV [+] show difference from revision
748 --rev REV [+] show difference from revision
747 --change REV list the changed files of a revision
749 --change REV list the changed files of a revision
748 -I --include PATTERN [+] include names matching the given patterns
750 -I --include PATTERN [+] include names matching the given patterns
749 -X --exclude PATTERN [+] exclude names matching the given patterns
751 -X --exclude PATTERN [+] exclude names matching the given patterns
750 -S --subrepos recurse into subrepositories
752 -S --subrepos recurse into subrepositories
751 -T --template TEMPLATE display with template
753 -T --template TEMPLATE display with template
752
754
753 (some details hidden, use --verbose to show complete help)
755 (some details hidden, use --verbose to show complete help)
754
756
755 $ hg -q help status
757 $ hg -q help status
756 hg status [OPTION]... [FILE]...
758 hg status [OPTION]... [FILE]...
757
759
758 show changed files in the working directory
760 show changed files in the working directory
759
761
760 $ hg help foo
762 $ hg help foo
761 abort: no such help topic: foo
763 abort: no such help topic: foo
762 (try 'hg help --keyword foo')
764 (try 'hg help --keyword foo')
763 [10]
765 [10]
764
766
765 $ hg skjdfks
767 $ hg skjdfks
766 hg: unknown command 'skjdfks'
768 hg: unknown command 'skjdfks'
767 (use 'hg help' for a list of commands)
769 (use 'hg help' for a list of commands)
768 [10]
770 [10]
769
771
770 Typoed command gives suggestion
772 Typoed command gives suggestion
771 $ hg puls
773 $ hg puls
772 hg: unknown command 'puls'
774 hg: unknown command 'puls'
773 (did you mean one of pull, push?)
775 (did you mean one of pull, push?)
774 [10]
776 [10]
775
777
776 Not enabled extension gets suggested
778 Not enabled extension gets suggested
777
779
778 $ hg rebase
780 $ hg rebase
779 hg: unknown command 'rebase'
781 hg: unknown command 'rebase'
780 'rebase' is provided by the following extension:
782 'rebase' is provided by the following extension:
781
783
782 rebase command to move sets of revisions to a different ancestor
784 rebase command to move sets of revisions to a different ancestor
783
785
784 (use 'hg help extensions' for information on enabling extensions)
786 (use 'hg help extensions' for information on enabling extensions)
785 [10]
787 [10]
786
788
787 Disabled extension gets suggested
789 Disabled extension gets suggested
788 $ hg --config extensions.rebase=! rebase
790 $ hg --config extensions.rebase=! rebase
789 hg: unknown command 'rebase'
791 hg: unknown command 'rebase'
790 'rebase' is provided by the following extension:
792 'rebase' is provided by the following extension:
791
793
792 rebase command to move sets of revisions to a different ancestor
794 rebase command to move sets of revisions to a different ancestor
793
795
794 (use 'hg help extensions' for information on enabling extensions)
796 (use 'hg help extensions' for information on enabling extensions)
795 [10]
797 [10]
796
798
797 Checking that help adapts based on the config:
799 Checking that help adapts based on the config:
798
800
799 $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)'
801 $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)'
800 -g --[no-]git use git extended diff format (default: on from
802 -g --[no-]git use git extended diff format (default: on from
801 config)
803 config)
802
804
803 Make sure that we don't run afoul of the help system thinking that
805 Make sure that we don't run afoul of the help system thinking that
804 this is a section and erroring out weirdly.
806 this is a section and erroring out weirdly.
805
807
806 $ hg .log
808 $ hg .log
807 hg: unknown command '.log'
809 hg: unknown command '.log'
808 (did you mean log?)
810 (did you mean log?)
809 [10]
811 [10]
810
812
811 $ hg log.
813 $ hg log.
812 hg: unknown command 'log.'
814 hg: unknown command 'log.'
813 (did you mean log?)
815 (did you mean log?)
814 [10]
816 [10]
815 $ hg pu.lh
817 $ hg pu.lh
816 hg: unknown command 'pu.lh'
818 hg: unknown command 'pu.lh'
817 (did you mean one of pull, push?)
819 (did you mean one of pull, push?)
818 [10]
820 [10]
819
821
820 $ cat > helpext.py <<EOF
822 $ cat > helpext.py <<EOF
821 > import os
823 > import os
822 > from mercurial import commands, fancyopts, registrar
824 > from mercurial import commands, fancyopts, registrar
823 >
825 >
824 > def func(arg):
826 > def func(arg):
825 > return '%sfoo' % arg
827 > return '%sfoo' % arg
826 > class customopt(fancyopts.customopt):
828 > class customopt(fancyopts.customopt):
827 > def newstate(self, oldstate, newparam, abort):
829 > def newstate(self, oldstate, newparam, abort):
828 > return '%sbar' % oldstate
830 > return '%sbar' % oldstate
829 > cmdtable = {}
831 > cmdtable = {}
830 > command = registrar.command(cmdtable)
832 > command = registrar.command(cmdtable)
831 >
833 >
832 > @command(b'nohelp',
834 > @command(b'nohelp',
833 > [(b'', b'longdesc', 3, b'x'*67),
835 > [(b'', b'longdesc', 3, b'x'*67),
834 > (b'n', b'', None, b'normal desc'),
836 > (b'n', b'', None, b'normal desc'),
835 > (b'', b'newline', b'', b'line1\nline2'),
837 > (b'', b'newline', b'', b'line1\nline2'),
836 > (b'', b'default-off', False, b'enable X'),
838 > (b'', b'default-off', False, b'enable X'),
837 > (b'', b'default-on', True, b'enable Y'),
839 > (b'', b'default-on', True, b'enable Y'),
838 > (b'', b'callableopt', func, b'adds foo'),
840 > (b'', b'callableopt', func, b'adds foo'),
839 > (b'', b'customopt', customopt(''), b'adds bar'),
841 > (b'', b'customopt', customopt(''), b'adds bar'),
840 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
842 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
841 > b'hg nohelp',
843 > b'hg nohelp',
842 > norepo=True)
844 > norepo=True)
843 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
845 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
844 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
846 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
845 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
847 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
846 > def nohelp(ui, *args, **kwargs):
848 > def nohelp(ui, *args, **kwargs):
847 > pass
849 > pass
848 >
850 >
849 > @command(b'hashelp', [], b'hg hashelp', norepo=True)
851 > @command(b'hashelp', [], b'hg hashelp', norepo=True)
850 > def hashelp(ui, *args, **kwargs):
852 > def hashelp(ui, *args, **kwargs):
851 > """Extension command's help"""
853 > """Extension command's help"""
852 >
854 >
853 > def uisetup(ui):
855 > def uisetup(ui):
854 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
856 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
855 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
857 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
856 > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext')
858 > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext')
857 > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext')
859 > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext')
858 > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext')
860 > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext')
859 >
861 >
860 > EOF
862 > EOF
861 $ echo '[extensions]' >> $HGRCPATH
863 $ echo '[extensions]' >> $HGRCPATH
862 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
864 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
863
865
864 Test for aliases
866 Test for aliases
865
867
866 $ hg help | grep hgalias
868 $ hg help | grep hgalias
867 hgalias My doc
869 hgalias My doc
868
870
869 $ hg help hgalias
871 $ hg help hgalias
870 hg hgalias [--remote]
872 hg hgalias [--remote]
871
873
872 alias for: hg summary
874 alias for: hg summary
873
875
874 My doc
876 My doc
875
877
876 defined by: helpext
878 defined by: helpext
877
879
878 options:
880 options:
879
881
880 --remote check for push and pull
882 --remote check for push and pull
881
883
882 (some details hidden, use --verbose to show complete help)
884 (some details hidden, use --verbose to show complete help)
883 $ hg help hgaliasnodoc
885 $ hg help hgaliasnodoc
884 hg hgaliasnodoc [--remote]
886 hg hgaliasnodoc [--remote]
885
887
886 alias for: hg summary
888 alias for: hg summary
887
889
888 summarize working directory state
890 summarize working directory state
889
891
890 This generates a brief summary of the working directory state, including
892 This generates a brief summary of the working directory state, including
891 parents, branch, commit status, phase and available updates.
893 parents, branch, commit status, phase and available updates.
892
894
893 With the --remote option, this will check the default paths for incoming
895 With the --remote option, this will check the default paths for incoming
894 and outgoing changes. This can be time-consuming.
896 and outgoing changes. This can be time-consuming.
895
897
896 Returns 0 on success.
898 Returns 0 on success.
897
899
898 defined by: helpext
900 defined by: helpext
899
901
900 options:
902 options:
901
903
902 --remote check for push and pull
904 --remote check for push and pull
903
905
904 (some details hidden, use --verbose to show complete help)
906 (some details hidden, use --verbose to show complete help)
905
907
906 $ hg help shellalias
908 $ hg help shellalias
907 hg shellalias
909 hg shellalias
908
910
909 shell alias for: echo hi
911 shell alias for: echo hi
910
912
911 (no help text available)
913 (no help text available)
912
914
913 defined by: helpext
915 defined by: helpext
914
916
915 (some details hidden, use --verbose to show complete help)
917 (some details hidden, use --verbose to show complete help)
916
918
917 Test command with no help text
919 Test command with no help text
918
920
919 $ hg help nohelp
921 $ hg help nohelp
920 hg nohelp
922 hg nohelp
921
923
922 (no help text available)
924 (no help text available)
923
925
924 options:
926 options:
925
927
926 --longdesc VALUE
928 --longdesc VALUE
927 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
929 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
928 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
930 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
929 -n -- normal desc
931 -n -- normal desc
930 --newline VALUE line1 line2
932 --newline VALUE line1 line2
931 --default-off enable X
933 --default-off enable X
932 --[no-]default-on enable Y (default: on)
934 --[no-]default-on enable Y (default: on)
933 --callableopt VALUE adds foo
935 --callableopt VALUE adds foo
934 --customopt VALUE adds bar
936 --customopt VALUE adds bar
935 --customopt-withdefault VALUE adds bar (default: foo)
937 --customopt-withdefault VALUE adds bar (default: foo)
936
938
937 (some details hidden, use --verbose to show complete help)
939 (some details hidden, use --verbose to show complete help)
938
940
939 Test that default list of commands includes extension commands that have help,
941 Test that default list of commands includes extension commands that have help,
940 but not those that don't, except in verbose mode, when a keyword is passed, or
942 but not those that don't, except in verbose mode, when a keyword is passed, or
941 when help about the extension is requested.
943 when help about the extension is requested.
942
944
943 #if no-extraextensions
945 #if no-extraextensions
944
946
945 $ hg help | grep hashelp
947 $ hg help | grep hashelp
946 hashelp Extension command's help
948 hashelp Extension command's help
947 $ hg help | grep nohelp
949 $ hg help | grep nohelp
948 [1]
950 [1]
949 $ hg help -v | grep nohelp
951 $ hg help -v | grep nohelp
950 nohelp (no help text available)
952 nohelp (no help text available)
951
953
952 $ hg help -k nohelp
954 $ hg help -k nohelp
953 Commands:
955 Commands:
954
956
955 nohelp hg nohelp
957 nohelp hg nohelp
956
958
957 Extension Commands:
959 Extension Commands:
958
960
959 nohelp (no help text available)
961 nohelp (no help text available)
960
962
961 $ hg help helpext
963 $ hg help helpext
962 helpext extension - no help text available
964 helpext extension - no help text available
963
965
964 list of commands:
966 list of commands:
965
967
966 hashelp Extension command's help
968 hashelp Extension command's help
967 nohelp (no help text available)
969 nohelp (no help text available)
968
970
969 (use 'hg help -v helpext' to show built-in aliases and global options)
971 (use 'hg help -v helpext' to show built-in aliases and global options)
970
972
971 #endif
973 #endif
972
974
973 Test list of internal help commands
975 Test list of internal help commands
974
976
975 $ hg help debug
977 $ hg help debug
976 debug commands (internal and unsupported):
978 debug commands (internal and unsupported):
977
979
978 debug-repair-issue6528
980 debug-repair-issue6528
979 find affected revisions and repair them. See issue6528 for more
981 find affected revisions and repair them. See issue6528 for more
980 details.
982 details.
981 debugancestor
983 debugancestor
982 find the ancestor revision of two revisions in a given index
984 find the ancestor revision of two revisions in a given index
983 debugantivirusrunning
985 debugantivirusrunning
984 attempt to trigger an antivirus scanner to see if one is active
986 attempt to trigger an antivirus scanner to see if one is active
985 debugapplystreamclonebundle
987 debugapplystreamclonebundle
986 apply a stream clone bundle file
988 apply a stream clone bundle file
987 debugbackupbundle
989 debugbackupbundle
988 lists the changesets available in backup bundles
990 lists the changesets available in backup bundles
989 debugbuilddag
991 debugbuilddag
990 builds a repo with a given DAG from scratch in the current
992 builds a repo with a given DAG from scratch in the current
991 empty repo
993 empty repo
992 debugbundle lists the contents of a bundle
994 debugbundle lists the contents of a bundle
993 debugcapabilities
995 debugcapabilities
994 lists the capabilities of a remote peer
996 lists the capabilities of a remote peer
995 debugchangedfiles
997 debugchangedfiles
996 list the stored files changes for a revision
998 list the stored files changes for a revision
997 debugcheckstate
999 debugcheckstate
998 validate the correctness of the current dirstate
1000 validate the correctness of the current dirstate
999 debugcolor show available color, effects or style
1001 debugcolor show available color, effects or style
1000 debugcommands
1002 debugcommands
1001 list all available commands and options
1003 list all available commands and options
1002 debugcomplete
1004 debugcomplete
1003 returns the completion list associated with the given command
1005 returns the completion list associated with the given command
1004 debugcreatestreamclonebundle
1006 debugcreatestreamclonebundle
1005 create a stream clone bundle file
1007 create a stream clone bundle file
1006 debugdag format the changelog or an index DAG as a concise textual
1008 debugdag format the changelog or an index DAG as a concise textual
1007 description
1009 description
1008 debugdata dump the contents of a data file revision
1010 debugdata dump the contents of a data file revision
1009 debugdate parse and display a date
1011 debugdate parse and display a date
1010 debugdeltachain
1012 debugdeltachain
1011 dump information about delta chains in a revlog
1013 dump information about delta chains in a revlog
1012 debugdirstate
1014 debugdirstate
1013 show the contents of the current dirstate
1015 show the contents of the current dirstate
1014 debugdirstateignorepatternshash
1016 debugdirstateignorepatternshash
1015 show the hash of ignore patterns stored in dirstate if v2,
1017 show the hash of ignore patterns stored in dirstate if v2,
1016 debugdiscovery
1018 debugdiscovery
1017 runs the changeset discovery protocol in isolation
1019 runs the changeset discovery protocol in isolation
1018 debugdownload
1020 debugdownload
1019 download a resource using Mercurial logic and config
1021 download a resource using Mercurial logic and config
1020 debugextensions
1022 debugextensions
1021 show information about active extensions
1023 show information about active extensions
1022 debugfileset parse and apply a fileset specification
1024 debugfileset parse and apply a fileset specification
1023 debugformat display format information about the current repository
1025 debugformat display format information about the current repository
1024 debugfsinfo show information detected about current filesystem
1026 debugfsinfo show information detected about current filesystem
1025 debuggetbundle
1027 debuggetbundle
1026 retrieves a bundle from a repo
1028 retrieves a bundle from a repo
1027 debugignore display the combined ignore pattern and information about
1029 debugignore display the combined ignore pattern and information about
1028 ignored files
1030 ignored files
1029 debugindex dump index data for a storage primitive
1031 debugindex dump index data for a storage primitive
1030 debugindexdot
1032 debugindexdot
1031 dump an index DAG as a graphviz dot file
1033 dump an index DAG as a graphviz dot file
1032 debugindexstats
1034 debugindexstats
1033 show stats related to the changelog index
1035 show stats related to the changelog index
1034 debuginstall test Mercurial installation
1036 debuginstall test Mercurial installation
1035 debugknown test whether node ids are known to a repo
1037 debugknown test whether node ids are known to a repo
1036 debuglocks show or modify state of locks
1038 debuglocks show or modify state of locks
1037 debugmanifestfulltextcache
1039 debugmanifestfulltextcache
1038 show, clear or amend the contents of the manifest fulltext
1040 show, clear or amend the contents of the manifest fulltext
1039 cache
1041 cache
1040 debugmergestate
1042 debugmergestate
1041 print merge state
1043 print merge state
1042 debugnamecomplete
1044 debugnamecomplete
1043 complete "names" - tags, open branch names, bookmark names
1045 complete "names" - tags, open branch names, bookmark names
1044 debugnodemap write and inspect on disk nodemap
1046 debugnodemap write and inspect on disk nodemap
1045 debugobsolete
1047 debugobsolete
1046 create arbitrary obsolete marker
1048 create arbitrary obsolete marker
1047 debugoptADV (no help text available)
1049 debugoptADV (no help text available)
1048 debugoptDEP (no help text available)
1050 debugoptDEP (no help text available)
1049 debugoptEXP (no help text available)
1051 debugoptEXP (no help text available)
1050 debugp1copies
1052 debugp1copies
1051 dump copy information compared to p1
1053 dump copy information compared to p1
1052 debugp2copies
1054 debugp2copies
1053 dump copy information compared to p2
1055 dump copy information compared to p2
1054 debugpathcomplete
1056 debugpathcomplete
1055 complete part or all of a tracked path
1057 complete part or all of a tracked path
1056 debugpathcopies
1058 debugpathcopies
1057 show copies between two revisions
1059 show copies between two revisions
1058 debugpeer establish a connection to a peer repository
1060 debugpeer establish a connection to a peer repository
1059 debugpickmergetool
1061 debugpickmergetool
1060 examine which merge tool is chosen for specified file
1062 examine which merge tool is chosen for specified file
1061 debugpushkey access the pushkey key/value protocol
1063 debugpushkey access the pushkey key/value protocol
1062 debugpvec (no help text available)
1064 debugpvec (no help text available)
1063 debugrebuilddirstate
1065 debugrebuilddirstate
1064 rebuild the dirstate as it would look like for the given
1066 rebuild the dirstate as it would look like for the given
1065 revision
1067 revision
1066 debugrebuildfncache
1068 debugrebuildfncache
1067 rebuild the fncache file
1069 rebuild the fncache file
1068 debugrename dump rename information
1070 debugrename dump rename information
1069 debugrequires
1071 debugrequires
1070 print the current repo requirements
1072 print the current repo requirements
1071 debugrevlog show data and statistics about a revlog
1073 debugrevlog show data and statistics about a revlog
1072 debugrevlogindex
1074 debugrevlogindex
1073 dump the contents of a revlog index
1075 dump the contents of a revlog index
1074 debugrevspec parse and apply a revision specification
1076 debugrevspec parse and apply a revision specification
1075 debugserve run a server with advanced settings
1077 debugserve run a server with advanced settings
1076 debugsetparents
1078 debugsetparents
1077 manually set the parents of the current working directory
1079 manually set the parents of the current working directory
1078 (DANGEROUS)
1080 (DANGEROUS)
1079 debugshell run an interactive Python interpreter
1081 debugshell run an interactive Python interpreter
1080 debugsidedata
1082 debugsidedata
1081 dump the side data for a cl/manifest/file revision
1083 dump the side data for a cl/manifest/file revision
1082 debugssl test a secure connection to a server
1084 debugssl test a secure connection to a server
1083 debugstrip strip changesets and all their descendants from the repository
1085 debugstrip strip changesets and all their descendants from the repository
1084 debugsub (no help text available)
1086 debugsub (no help text available)
1085 debugsuccessorssets
1087 debugsuccessorssets
1086 show set of successors for revision
1088 show set of successors for revision
1087 debugtagscache
1089 debugtagscache
1088 display the contents of .hg/cache/hgtagsfnodes1
1090 display the contents of .hg/cache/hgtagsfnodes1
1089 debugtemplate
1091 debugtemplate
1090 parse and apply a template
1092 parse and apply a template
1091 debuguigetpass
1093 debuguigetpass
1092 show prompt to type password
1094 show prompt to type password
1093 debuguiprompt
1095 debuguiprompt
1094 show plain prompt
1096 show plain prompt
1095 debugupdatecaches
1097 debugupdatecaches
1096 warm all known caches in the repository
1098 warm all known caches in the repository
1097 debugupgraderepo
1099 debugupgraderepo
1098 upgrade a repository to use different features
1100 upgrade a repository to use different features
1099 debugwalk show how files match on given patterns
1101 debugwalk show how files match on given patterns
1100 debugwhyunstable
1102 debugwhyunstable
1101 explain instabilities of a changeset
1103 explain instabilities of a changeset
1102 debugwireargs
1104 debugwireargs
1103 (no help text available)
1105 (no help text available)
1104 debugwireproto
1106 debugwireproto
1105 send wire protocol commands to a server
1107 send wire protocol commands to a server
1106
1108
1107 (use 'hg help -v debug' to show built-in aliases and global options)
1109 (use 'hg help -v debug' to show built-in aliases and global options)
1108
1110
1109 internals topic renders index of available sub-topics
1111 internals topic renders index of available sub-topics
1110
1112
1111 $ hg help internals
1113 $ hg help internals
1112 Technical implementation topics
1114 Technical implementation topics
1113 """""""""""""""""""""""""""""""
1115 """""""""""""""""""""""""""""""
1114
1116
1115 To access a subtopic, use "hg help internals.{subtopic-name}"
1117 To access a subtopic, use "hg help internals.{subtopic-name}"
1116
1118
1117 bid-merge Bid Merge Algorithm
1119 bid-merge Bid Merge Algorithm
1118 bundle2 Bundle2
1120 bundle2 Bundle2
1119 bundles Bundles
1121 bundles Bundles
1120 cbor CBOR
1122 cbor CBOR
1121 censor Censor
1123 censor Censor
1122 changegroups Changegroups
1124 changegroups Changegroups
1123 config Config Registrar
1125 config Config Registrar
1124 dirstate-v2 dirstate-v2 file format
1126 dirstate-v2 dirstate-v2 file format
1125 extensions Extension API
1127 extensions Extension API
1126 mergestate Mergestate
1128 mergestate Mergestate
1127 requirements Repository Requirements
1129 requirements Repository Requirements
1128 revlogs Revision Logs
1130 revlogs Revision Logs
1129 wireprotocol Wire Protocol
1131 wireprotocol Wire Protocol
1130 wireprotocolrpc
1132 wireprotocolrpc
1131 Wire Protocol RPC
1133 Wire Protocol RPC
1132 wireprotocolv2
1134 wireprotocolv2
1133 Wire Protocol Version 2
1135 Wire Protocol Version 2
1134
1136
1135 sub-topics can be accessed
1137 sub-topics can be accessed
1136
1138
1137 $ hg help internals.changegroups
1139 $ hg help internals.changegroups
1138 Changegroups
1140 Changegroups
1139 """"""""""""
1141 """"""""""""
1140
1142
1141 Changegroups are representations of repository revlog data, specifically
1143 Changegroups are representations of repository revlog data, specifically
1142 the changelog data, root/flat manifest data, treemanifest data, and
1144 the changelog data, root/flat manifest data, treemanifest data, and
1143 filelogs.
1145 filelogs.
1144
1146
1145 There are 4 versions of changegroups: "1", "2", "3" and "4". From a high-
1147 There are 4 versions of changegroups: "1", "2", "3" and "4". From a high-
1146 level, versions "1" and "2" are almost exactly the same, with the only
1148 level, versions "1" and "2" are almost exactly the same, with the only
1147 difference being an additional item in the *delta header*. Version "3"
1149 difference being an additional item in the *delta header*. Version "3"
1148 adds support for storage flags in the *delta header* and optionally
1150 adds support for storage flags in the *delta header* and optionally
1149 exchanging treemanifests (enabled by setting an option on the
1151 exchanging treemanifests (enabled by setting an option on the
1150 "changegroup" part in the bundle2). Version "4" adds support for
1152 "changegroup" part in the bundle2). Version "4" adds support for
1151 exchanging sidedata (additional revision metadata not part of the digest).
1153 exchanging sidedata (additional revision metadata not part of the digest).
1152
1154
1153 Changegroups when not exchanging treemanifests consist of 3 logical
1155 Changegroups when not exchanging treemanifests consist of 3 logical
1154 segments:
1156 segments:
1155
1157
1156 +---------------------------------+
1158 +---------------------------------+
1157 | | | |
1159 | | | |
1158 | changeset | manifest | filelogs |
1160 | changeset | manifest | filelogs |
1159 | | | |
1161 | | | |
1160 | | | |
1162 | | | |
1161 +---------------------------------+
1163 +---------------------------------+
1162
1164
1163 When exchanging treemanifests, there are 4 logical segments:
1165 When exchanging treemanifests, there are 4 logical segments:
1164
1166
1165 +-------------------------------------------------+
1167 +-------------------------------------------------+
1166 | | | | |
1168 | | | | |
1167 | changeset | root | treemanifests | filelogs |
1169 | changeset | root | treemanifests | filelogs |
1168 | | manifest | | |
1170 | | manifest | | |
1169 | | | | |
1171 | | | | |
1170 +-------------------------------------------------+
1172 +-------------------------------------------------+
1171
1173
1172 The principle building block of each segment is a *chunk*. A *chunk* is a
1174 The principle building block of each segment is a *chunk*. A *chunk* is a
1173 framed piece of data:
1175 framed piece of data:
1174
1176
1175 +---------------------------------------+
1177 +---------------------------------------+
1176 | | |
1178 | | |
1177 | length | data |
1179 | length | data |
1178 | (4 bytes) | (<length - 4> bytes) |
1180 | (4 bytes) | (<length - 4> bytes) |
1179 | | |
1181 | | |
1180 +---------------------------------------+
1182 +---------------------------------------+
1181
1183
1182 All integers are big-endian signed integers. Each chunk starts with a
1184 All integers are big-endian signed integers. Each chunk starts with a
1183 32-bit integer indicating the length of the entire chunk (including the
1185 32-bit integer indicating the length of the entire chunk (including the
1184 length field itself).
1186 length field itself).
1185
1187
1186 There is a special case chunk that has a value of 0 for the length
1188 There is a special case chunk that has a value of 0 for the length
1187 ("0x00000000"). We call this an *empty chunk*.
1189 ("0x00000000"). We call this an *empty chunk*.
1188
1190
1189 Delta Groups
1191 Delta Groups
1190 ============
1192 ============
1191
1193
1192 A *delta group* expresses the content of a revlog as a series of deltas,
1194 A *delta group* expresses the content of a revlog as a series of deltas,
1193 or patches against previous revisions.
1195 or patches against previous revisions.
1194
1196
1195 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1197 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1196 to signal the end of the delta group:
1198 to signal the end of the delta group:
1197
1199
1198 +------------------------------------------------------------------------+
1200 +------------------------------------------------------------------------+
1199 | | | | | |
1201 | | | | | |
1200 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1202 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1201 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1203 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1202 | | | | | |
1204 | | | | | |
1203 +------------------------------------------------------------------------+
1205 +------------------------------------------------------------------------+
1204
1206
1205 Each *chunk*'s data consists of the following:
1207 Each *chunk*'s data consists of the following:
1206
1208
1207 +---------------------------------------+
1209 +---------------------------------------+
1208 | | |
1210 | | |
1209 | delta header | delta data |
1211 | delta header | delta data |
1210 | (various by version) | (various) |
1212 | (various by version) | (various) |
1211 | | |
1213 | | |
1212 +---------------------------------------+
1214 +---------------------------------------+
1213
1215
1214 The *delta data* is a series of *delta*s that describe a diff from an
1216 The *delta data* is a series of *delta*s that describe a diff from an
1215 existing entry (either that the recipient already has, or previously
1217 existing entry (either that the recipient already has, or previously
1216 specified in the bundle/changegroup).
1218 specified in the bundle/changegroup).
1217
1219
1218 The *delta header* is different between versions "1", "2", "3" and "4" of
1220 The *delta header* is different between versions "1", "2", "3" and "4" of
1219 the changegroup format.
1221 the changegroup format.
1220
1222
1221 Version 1 (headerlen=80):
1223 Version 1 (headerlen=80):
1222
1224
1223 +------------------------------------------------------+
1225 +------------------------------------------------------+
1224 | | | | |
1226 | | | | |
1225 | node | p1 node | p2 node | link node |
1227 | node | p1 node | p2 node | link node |
1226 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1228 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1227 | | | | |
1229 | | | | |
1228 +------------------------------------------------------+
1230 +------------------------------------------------------+
1229
1231
1230 Version 2 (headerlen=100):
1232 Version 2 (headerlen=100):
1231
1233
1232 +------------------------------------------------------------------+
1234 +------------------------------------------------------------------+
1233 | | | | | |
1235 | | | | | |
1234 | node | p1 node | p2 node | base node | link node |
1236 | node | p1 node | p2 node | base node | link node |
1235 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1237 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1236 | | | | | |
1238 | | | | | |
1237 +------------------------------------------------------------------+
1239 +------------------------------------------------------------------+
1238
1240
1239 Version 3 (headerlen=102):
1241 Version 3 (headerlen=102):
1240
1242
1241 +------------------------------------------------------------------------------+
1243 +------------------------------------------------------------------------------+
1242 | | | | | | |
1244 | | | | | | |
1243 | node | p1 node | p2 node | base node | link node | flags |
1245 | node | p1 node | p2 node | base node | link node | flags |
1244 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1246 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1245 | | | | | | |
1247 | | | | | | |
1246 +------------------------------------------------------------------------------+
1248 +------------------------------------------------------------------------------+
1247
1249
1248 Version 4 (headerlen=103):
1250 Version 4 (headerlen=103):
1249
1251
1250 +------------------------------------------------------------------------------+----------+
1252 +------------------------------------------------------------------------------+----------+
1251 | | | | | | | |
1253 | | | | | | | |
1252 | node | p1 node | p2 node | base node | link node | flags | pflags |
1254 | node | p1 node | p2 node | base node | link node | flags | pflags |
1253 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | (1 byte) |
1255 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | (1 byte) |
1254 | | | | | | | |
1256 | | | | | | | |
1255 +------------------------------------------------------------------------------+----------+
1257 +------------------------------------------------------------------------------+----------+
1256
1258
1257 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1259 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1258 contain a series of *delta*s, densely packed (no separators). These deltas
1260 contain a series of *delta*s, densely packed (no separators). These deltas
1259 describe a diff from an existing entry (either that the recipient already
1261 describe a diff from an existing entry (either that the recipient already
1260 has, or previously specified in the bundle/changegroup). The format is
1262 has, or previously specified in the bundle/changegroup). The format is
1261 described more fully in "hg help internals.bdiff", but briefly:
1263 described more fully in "hg help internals.bdiff", but briefly:
1262
1264
1263 +---------------------------------------------------------------+
1265 +---------------------------------------------------------------+
1264 | | | | |
1266 | | | | |
1265 | start offset | end offset | new length | content |
1267 | start offset | end offset | new length | content |
1266 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1268 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1267 | | | | |
1269 | | | | |
1268 +---------------------------------------------------------------+
1270 +---------------------------------------------------------------+
1269
1271
1270 Please note that the length field in the delta data does *not* include
1272 Please note that the length field in the delta data does *not* include
1271 itself.
1273 itself.
1272
1274
1273 In version 1, the delta is always applied against the previous node from
1275 In version 1, the delta is always applied against the previous node from
1274 the changegroup or the first parent if this is the first entry in the
1276 the changegroup or the first parent if this is the first entry in the
1275 changegroup.
1277 changegroup.
1276
1278
1277 In version 2 and up, the delta base node is encoded in the entry in the
1279 In version 2 and up, the delta base node is encoded in the entry in the
1278 changegroup. This allows the delta to be expressed against any parent,
1280 changegroup. This allows the delta to be expressed against any parent,
1279 which can result in smaller deltas and more efficient encoding of data.
1281 which can result in smaller deltas and more efficient encoding of data.
1280
1282
1281 The *flags* field holds bitwise flags affecting the processing of revision
1283 The *flags* field holds bitwise flags affecting the processing of revision
1282 data. The following flags are defined:
1284 data. The following flags are defined:
1283
1285
1284 32768
1286 32768
1285 Censored revision. The revision's fulltext has been replaced by censor
1287 Censored revision. The revision's fulltext has been replaced by censor
1286 metadata. May only occur on file revisions.
1288 metadata. May only occur on file revisions.
1287
1289
1288 16384
1290 16384
1289 Ellipsis revision. Revision hash does not match data (likely due to
1291 Ellipsis revision. Revision hash does not match data (likely due to
1290 rewritten parents).
1292 rewritten parents).
1291
1293
1292 8192
1294 8192
1293 Externally stored. The revision fulltext contains "key:value" "\n"
1295 Externally stored. The revision fulltext contains "key:value" "\n"
1294 delimited metadata defining an object stored elsewhere. Used by the LFS
1296 delimited metadata defining an object stored elsewhere. Used by the LFS
1295 extension.
1297 extension.
1296
1298
1297 4096
1299 4096
1298 Contains copy information. This revision changes files in a way that
1300 Contains copy information. This revision changes files in a way that
1299 could affect copy tracing. This does *not* affect changegroup handling,
1301 could affect copy tracing. This does *not* affect changegroup handling,
1300 but is relevant for other parts of Mercurial.
1302 but is relevant for other parts of Mercurial.
1301
1303
1302 For historical reasons, the integer values are identical to revlog version
1304 For historical reasons, the integer values are identical to revlog version
1303 1 per-revision storage flags and correspond to bits being set in this
1305 1 per-revision storage flags and correspond to bits being set in this
1304 2-byte field. Bits were allocated starting from the most-significant bit,
1306 2-byte field. Bits were allocated starting from the most-significant bit,
1305 hence the reverse ordering and allocation of these flags.
1307 hence the reverse ordering and allocation of these flags.
1306
1308
1307 The *pflags* (protocol flags) field holds bitwise flags affecting the
1309 The *pflags* (protocol flags) field holds bitwise flags affecting the
1308 protocol itself. They are first in the header since they may affect the
1310 protocol itself. They are first in the header since they may affect the
1309 handling of the rest of the fields in a future version. They are defined
1311 handling of the rest of the fields in a future version. They are defined
1310 as such:
1312 as such:
1311
1313
1312 1 indicates whether to read a chunk of sidedata (of variable length) right
1314 1 indicates whether to read a chunk of sidedata (of variable length) right
1313 after the revision flags.
1315 after the revision flags.
1314
1316
1315 Changeset Segment
1317 Changeset Segment
1316 =================
1318 =================
1317
1319
1318 The *changeset segment* consists of a single *delta group* holding
1320 The *changeset segment* consists of a single *delta group* holding
1319 changelog data. The *empty chunk* at the end of the *delta group* denotes
1321 changelog data. The *empty chunk* at the end of the *delta group* denotes
1320 the boundary to the *manifest segment*.
1322 the boundary to the *manifest segment*.
1321
1323
1322 Manifest Segment
1324 Manifest Segment
1323 ================
1325 ================
1324
1326
1325 The *manifest segment* consists of a single *delta group* holding manifest
1327 The *manifest segment* consists of a single *delta group* holding manifest
1326 data. If treemanifests are in use, it contains only the manifest for the
1328 data. If treemanifests are in use, it contains only the manifest for the
1327 root directory of the repository. Otherwise, it contains the entire
1329 root directory of the repository. Otherwise, it contains the entire
1328 manifest data. The *empty chunk* at the end of the *delta group* denotes
1330 manifest data. The *empty chunk* at the end of the *delta group* denotes
1329 the boundary to the next segment (either the *treemanifests segment* or
1331 the boundary to the next segment (either the *treemanifests segment* or
1330 the *filelogs segment*, depending on version and the request options).
1332 the *filelogs segment*, depending on version and the request options).
1331
1333
1332 Treemanifests Segment
1334 Treemanifests Segment
1333 ---------------------
1335 ---------------------
1334
1336
1335 The *treemanifests segment* only exists in changegroup version "3" and
1337 The *treemanifests segment* only exists in changegroup version "3" and
1336 "4", and only if the 'treemanifest' param is part of the bundle2
1338 "4", and only if the 'treemanifest' param is part of the bundle2
1337 changegroup part (it is not possible to use changegroup version 3 or 4
1339 changegroup part (it is not possible to use changegroup version 3 or 4
1338 outside of bundle2). Aside from the filenames in the *treemanifests
1340 outside of bundle2). Aside from the filenames in the *treemanifests
1339 segment* containing a trailing "/" character, it behaves identically to
1341 segment* containing a trailing "/" character, it behaves identically to
1340 the *filelogs segment* (see below). The final sub-segment is followed by
1342 the *filelogs segment* (see below). The final sub-segment is followed by
1341 an *empty chunk* (logically, a sub-segment with filename size 0). This
1343 an *empty chunk* (logically, a sub-segment with filename size 0). This
1342 denotes the boundary to the *filelogs segment*.
1344 denotes the boundary to the *filelogs segment*.
1343
1345
1344 Filelogs Segment
1346 Filelogs Segment
1345 ================
1347 ================
1346
1348
1347 The *filelogs segment* consists of multiple sub-segments, each
1349 The *filelogs segment* consists of multiple sub-segments, each
1348 corresponding to an individual file whose data is being described:
1350 corresponding to an individual file whose data is being described:
1349
1351
1350 +--------------------------------------------------+
1352 +--------------------------------------------------+
1351 | | | | | |
1353 | | | | | |
1352 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1354 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1353 | | | | | (4 bytes) |
1355 | | | | | (4 bytes) |
1354 | | | | | |
1356 | | | | | |
1355 +--------------------------------------------------+
1357 +--------------------------------------------------+
1356
1358
1357 The final filelog sub-segment is followed by an *empty chunk* (logically,
1359 The final filelog sub-segment is followed by an *empty chunk* (logically,
1358 a sub-segment with filename size 0). This denotes the end of the segment
1360 a sub-segment with filename size 0). This denotes the end of the segment
1359 and of the overall changegroup.
1361 and of the overall changegroup.
1360
1362
1361 Each filelog sub-segment consists of the following:
1363 Each filelog sub-segment consists of the following:
1362
1364
1363 +------------------------------------------------------+
1365 +------------------------------------------------------+
1364 | | | |
1366 | | | |
1365 | filename length | filename | delta group |
1367 | filename length | filename | delta group |
1366 | (4 bytes) | (<length - 4> bytes) | (various) |
1368 | (4 bytes) | (<length - 4> bytes) | (various) |
1367 | | | |
1369 | | | |
1368 +------------------------------------------------------+
1370 +------------------------------------------------------+
1369
1371
1370 That is, a *chunk* consisting of the filename (not terminated or padded)
1372 That is, a *chunk* consisting of the filename (not terminated or padded)
1371 followed by N chunks constituting the *delta group* for this file. The
1373 followed by N chunks constituting the *delta group* for this file. The
1372 *empty chunk* at the end of each *delta group* denotes the boundary to the
1374 *empty chunk* at the end of each *delta group* denotes the boundary to the
1373 next filelog sub-segment.
1375 next filelog sub-segment.
1374
1376
1375 non-existent subtopics print an error
1377 non-existent subtopics print an error
1376
1378
1377 $ hg help internals.foo
1379 $ hg help internals.foo
1378 abort: no such help topic: internals.foo
1380 abort: no such help topic: internals.foo
1379 (try 'hg help --keyword foo')
1381 (try 'hg help --keyword foo')
1380 [10]
1382 [10]
1381
1383
1382 test advanced, deprecated and experimental options are hidden in command help
1384 test advanced, deprecated and experimental options are hidden in command help
1383 $ hg help debugoptADV
1385 $ hg help debugoptADV
1384 hg debugoptADV
1386 hg debugoptADV
1385
1387
1386 (no help text available)
1388 (no help text available)
1387
1389
1388 options:
1390 options:
1389
1391
1390 (some details hidden, use --verbose to show complete help)
1392 (some details hidden, use --verbose to show complete help)
1391 $ hg help debugoptDEP
1393 $ hg help debugoptDEP
1392 hg debugoptDEP
1394 hg debugoptDEP
1393
1395
1394 (no help text available)
1396 (no help text available)
1395
1397
1396 options:
1398 options:
1397
1399
1398 (some details hidden, use --verbose to show complete help)
1400 (some details hidden, use --verbose to show complete help)
1399
1401
1400 $ hg help debugoptEXP
1402 $ hg help debugoptEXP
1401 hg debugoptEXP
1403 hg debugoptEXP
1402
1404
1403 (no help text available)
1405 (no help text available)
1404
1406
1405 options:
1407 options:
1406
1408
1407 (some details hidden, use --verbose to show complete help)
1409 (some details hidden, use --verbose to show complete help)
1408
1410
1409 test advanced, deprecated and experimental options are shown with -v
1411 test advanced, deprecated and experimental options are shown with -v
1410 $ hg help -v debugoptADV | grep aopt
1412 $ hg help -v debugoptADV | grep aopt
1411 --aopt option is (ADVANCED)
1413 --aopt option is (ADVANCED)
1412 $ hg help -v debugoptDEP | grep dopt
1414 $ hg help -v debugoptDEP | grep dopt
1413 --dopt option is (DEPRECATED)
1415 --dopt option is (DEPRECATED)
1414 $ hg help -v debugoptEXP | grep eopt
1416 $ hg help -v debugoptEXP | grep eopt
1415 --eopt option is (EXPERIMENTAL)
1417 --eopt option is (EXPERIMENTAL)
1416
1418
1417 #if gettext
1419 #if gettext
1418 test deprecated option is hidden with translation with untranslated description
1420 test deprecated option is hidden with translation with untranslated description
1419 (use many globy for not failing on changed transaction)
1421 (use many globy for not failing on changed transaction)
1420 $ LANGUAGE=sv hg help debugoptDEP
1422 $ LANGUAGE=sv hg help debugoptDEP
1421 hg debugoptDEP
1423 hg debugoptDEP
1422
1424
1423 (*) (glob)
1425 (*) (glob)
1424
1426
1425 options:
1427 options:
1426
1428
1427 (some details hidden, use --verbose to show complete help)
1429 (some details hidden, use --verbose to show complete help)
1428 #endif
1430 #endif
1429
1431
1430 Test commands that collide with topics (issue4240)
1432 Test commands that collide with topics (issue4240)
1431
1433
1432 $ hg config -hq
1434 $ hg config -hq
1433 hg config [-u] [NAME]...
1435 hg config [-u] [NAME]...
1434
1436
1435 show combined config settings from all hgrc files
1437 show combined config settings from all hgrc files
1436 $ hg showconfig -hq
1438 $ hg showconfig -hq
1437 hg config [-u] [NAME]...
1439 hg config [-u] [NAME]...
1438
1440
1439 show combined config settings from all hgrc files
1441 show combined config settings from all hgrc files
1440
1442
1441 Test a help topic
1443 Test a help topic
1442
1444
1443 $ hg help dates
1445 $ hg help dates
1444 Date Formats
1446 Date Formats
1445 """"""""""""
1447 """"""""""""
1446
1448
1447 Some commands allow the user to specify a date, e.g.:
1449 Some commands allow the user to specify a date, e.g.:
1448
1450
1449 - backout, commit, import, tag: Specify the commit date.
1451 - backout, commit, import, tag: Specify the commit date.
1450 - log, revert, update: Select revision(s) by date.
1452 - log, revert, update: Select revision(s) by date.
1451
1453
1452 Many date formats are valid. Here are some examples:
1454 Many date formats are valid. Here are some examples:
1453
1455
1454 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1456 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1455 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1457 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1456 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1458 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1457 - "Dec 6" (midnight)
1459 - "Dec 6" (midnight)
1458 - "13:18" (today assumed)
1460 - "13:18" (today assumed)
1459 - "3:39" (3:39AM assumed)
1461 - "3:39" (3:39AM assumed)
1460 - "3:39pm" (15:39)
1462 - "3:39pm" (15:39)
1461 - "2006-12-06 13:18:29" (ISO 8601 format)
1463 - "2006-12-06 13:18:29" (ISO 8601 format)
1462 - "2006-12-6 13:18"
1464 - "2006-12-6 13:18"
1463 - "2006-12-6"
1465 - "2006-12-6"
1464 - "12-6"
1466 - "12-6"
1465 - "12/6"
1467 - "12/6"
1466 - "12/6/6" (Dec 6 2006)
1468 - "12/6/6" (Dec 6 2006)
1467 - "today" (midnight)
1469 - "today" (midnight)
1468 - "yesterday" (midnight)
1470 - "yesterday" (midnight)
1469 - "now" - right now
1471 - "now" - right now
1470
1472
1471 Lastly, there is Mercurial's internal format:
1473 Lastly, there is Mercurial's internal format:
1472
1474
1473 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1475 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1474
1476
1475 This is the internal representation format for dates. The first number is
1477 This is the internal representation format for dates. The first number is
1476 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1478 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1477 is the offset of the local timezone, in seconds west of UTC (negative if
1479 is the offset of the local timezone, in seconds west of UTC (negative if
1478 the timezone is east of UTC).
1480 the timezone is east of UTC).
1479
1481
1480 The log command also accepts date ranges:
1482 The log command also accepts date ranges:
1481
1483
1482 - "<DATE" - at or before a given date/time
1484 - "<DATE" - at or before a given date/time
1483 - ">DATE" - on or after a given date/time
1485 - ">DATE" - on or after a given date/time
1484 - "DATE to DATE" - a date range, inclusive
1486 - "DATE to DATE" - a date range, inclusive
1485 - "-DAYS" - within a given number of days from today
1487 - "-DAYS" - within a given number of days from today
1486
1488
1487 Test repeated config section name
1489 Test repeated config section name
1488
1490
1489 $ hg help config.host
1491 $ hg help config.host
1490 "http_proxy.host"
1492 "http_proxy.host"
1491 Host name and (optional) port of the proxy server, for example
1493 Host name and (optional) port of the proxy server, for example
1492 "myproxy:8000".
1494 "myproxy:8000".
1493
1495
1494 "smtp.host"
1496 "smtp.host"
1495 Host name of mail server, e.g. "mail.example.com".
1497 Host name of mail server, e.g. "mail.example.com".
1496
1498
1497
1499
1498 Test section name with dot
1500 Test section name with dot
1499
1501
1500 $ hg help config.ui.username
1502 $ hg help config.ui.username
1501 "ui.username"
1503 "ui.username"
1502 The committer of a changeset created when running "commit". Typically
1504 The committer of a changeset created when running "commit". Typically
1503 a person's name and email address, e.g. "Fred Widget
1505 a person's name and email address, e.g. "Fred Widget
1504 <fred@example.com>". Environment variables in the username are
1506 <fred@example.com>". Environment variables in the username are
1505 expanded.
1507 expanded.
1506
1508
1507 (default: "$EMAIL" or "username@hostname". If the username in hgrc is
1509 (default: "$EMAIL" or "username@hostname". If the username in hgrc is
1508 empty, e.g. if the system admin set "username =" in the system hgrc,
1510 empty, e.g. if the system admin set "username =" in the system hgrc,
1509 it has to be specified manually or in a different hgrc file)
1511 it has to be specified manually or in a different hgrc file)
1510
1512
1511
1513
1512 $ hg help config.annotate.git
1514 $ hg help config.annotate.git
1513 abort: help section not found: config.annotate.git
1515 abort: help section not found: config.annotate.git
1514 [10]
1516 [10]
1515
1517
1516 $ hg help config.update.check
1518 $ hg help config.update.check
1517 "commands.update.check"
1519 "commands.update.check"
1518 Determines what level of checking 'hg update' will perform before
1520 Determines what level of checking 'hg update' will perform before
1519 moving to a destination revision. Valid values are "abort", "none",
1521 moving to a destination revision. Valid values are "abort", "none",
1520 "linear", and "noconflict". "abort" always fails if the working
1522 "linear", and "noconflict". "abort" always fails if the working
1521 directory has uncommitted changes. "none" performs no checking, and
1523 directory has uncommitted changes. "none" performs no checking, and
1522 may result in a merge with uncommitted changes. "linear" allows any
1524 may result in a merge with uncommitted changes. "linear" allows any
1523 update as long as it follows a straight line in the revision history,
1525 update as long as it follows a straight line in the revision history,
1524 and may trigger a merge with uncommitted changes. "noconflict" will
1526 and may trigger a merge with uncommitted changes. "noconflict" will
1525 allow any update which would not trigger a merge with uncommitted
1527 allow any update which would not trigger a merge with uncommitted
1526 changes, if any are present. (default: "linear")
1528 changes, if any are present. (default: "linear")
1527
1529
1528
1530
1529 $ hg help config.commands.update.check
1531 $ hg help config.commands.update.check
1530 "commands.update.check"
1532 "commands.update.check"
1531 Determines what level of checking 'hg update' will perform before
1533 Determines what level of checking 'hg update' will perform before
1532 moving to a destination revision. Valid values are "abort", "none",
1534 moving to a destination revision. Valid values are "abort", "none",
1533 "linear", and "noconflict". "abort" always fails if the working
1535 "linear", and "noconflict". "abort" always fails if the working
1534 directory has uncommitted changes. "none" performs no checking, and
1536 directory has uncommitted changes. "none" performs no checking, and
1535 may result in a merge with uncommitted changes. "linear" allows any
1537 may result in a merge with uncommitted changes. "linear" allows any
1536 update as long as it follows a straight line in the revision history,
1538 update as long as it follows a straight line in the revision history,
1537 and may trigger a merge with uncommitted changes. "noconflict" will
1539 and may trigger a merge with uncommitted changes. "noconflict" will
1538 allow any update which would not trigger a merge with uncommitted
1540 allow any update which would not trigger a merge with uncommitted
1539 changes, if any are present. (default: "linear")
1541 changes, if any are present. (default: "linear")
1540
1542
1541
1543
1542 $ hg help config.ommands.update.check
1544 $ hg help config.ommands.update.check
1543 abort: help section not found: config.ommands.update.check
1545 abort: help section not found: config.ommands.update.check
1544 [10]
1546 [10]
1545
1547
1546 Unrelated trailing paragraphs shouldn't be included
1548 Unrelated trailing paragraphs shouldn't be included
1547
1549
1548 $ hg help config.extramsg | grep '^$'
1550 $ hg help config.extramsg | grep '^$'
1549
1551
1550
1552
1551 Test capitalized section name
1553 Test capitalized section name
1552
1554
1553 $ hg help scripting.HGPLAIN > /dev/null
1555 $ hg help scripting.HGPLAIN > /dev/null
1554
1556
1555 Help subsection:
1557 Help subsection:
1556
1558
1557 $ hg help config.charsets |grep "Email example:" > /dev/null
1559 $ hg help config.charsets |grep "Email example:" > /dev/null
1558 [1]
1560 [1]
1559
1561
1560 Show nested definitions
1562 Show nested definitions
1561 ("profiling.type"[break]"ls"[break]"stat"[break])
1563 ("profiling.type"[break]"ls"[break]"stat"[break])
1562
1564
1563 $ hg help config.type | egrep '^$'|wc -l
1565 $ hg help config.type | egrep '^$'|wc -l
1564 \s*3 (re)
1566 \s*3 (re)
1565
1567
1566 $ hg help config.profiling.type.ls
1568 $ hg help config.profiling.type.ls
1567 "profiling.type.ls"
1569 "profiling.type.ls"
1568 Use Python's built-in instrumenting profiler. This profiler works on
1570 Use Python's built-in instrumenting profiler. This profiler works on
1569 all platforms, but each line number it reports is the first line of
1571 all platforms, but each line number it reports is the first line of
1570 a function. This restriction makes it difficult to identify the
1572 a function. This restriction makes it difficult to identify the
1571 expensive parts of a non-trivial function.
1573 expensive parts of a non-trivial function.
1572
1574
1573
1575
1574 Separate sections from subsections
1576 Separate sections from subsections
1575
1577
1576 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1578 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1577 "format"
1579 "format"
1578 --------
1580 --------
1579
1581
1580 "usegeneraldelta"
1582 "usegeneraldelta"
1581
1583
1582 "dotencode"
1584 "dotencode"
1583
1585
1584 "usefncache"
1586 "usefncache"
1585
1587
1588 "exp-rc-dirstate-v2"
1589
1586 "use-persistent-nodemap"
1590 "use-persistent-nodemap"
1587
1591
1588 "use-share-safe"
1592 "use-share-safe"
1589
1593
1590 "usestore"
1594 "usestore"
1591
1595
1592 "sparse-revlog"
1596 "sparse-revlog"
1593
1597
1594 "revlog-compression"
1598 "revlog-compression"
1595
1599
1596 "bookmarks-in-store"
1600 "bookmarks-in-store"
1597
1601
1598 "profiling"
1602 "profiling"
1599 -----------
1603 -----------
1600
1604
1601 "format"
1605 "format"
1602
1606
1603 "progress"
1607 "progress"
1604 ----------
1608 ----------
1605
1609
1606 "format"
1610 "format"
1607
1611
1608
1612
1609 Last item in help config.*:
1613 Last item in help config.*:
1610
1614
1611 $ hg help config.`hg help config|grep '^ "'| \
1615 $ hg help config.`hg help config|grep '^ "'| \
1612 > tail -1|sed 's![ "]*!!g'`| \
1616 > tail -1|sed 's![ "]*!!g'`| \
1613 > grep 'hg help -c config' > /dev/null
1617 > grep 'hg help -c config' > /dev/null
1614 [1]
1618 [1]
1615
1619
1616 note to use help -c for general hg help config:
1620 note to use help -c for general hg help config:
1617
1621
1618 $ hg help config |grep 'hg help -c config' > /dev/null
1622 $ hg help config |grep 'hg help -c config' > /dev/null
1619
1623
1620 Test templating help
1624 Test templating help
1621
1625
1622 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1626 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1623 desc String. The text of the changeset description.
1627 desc String. The text of the changeset description.
1624 diffstat String. Statistics of changes with the following format:
1628 diffstat String. Statistics of changes with the following format:
1625 firstline Any text. Returns the first line of text.
1629 firstline Any text. Returns the first line of text.
1626 nonempty Any text. Returns '(none)' if the string is empty.
1630 nonempty Any text. Returns '(none)' if the string is empty.
1627
1631
1628 Test deprecated items
1632 Test deprecated items
1629
1633
1630 $ hg help -v templating | grep currentbookmark
1634 $ hg help -v templating | grep currentbookmark
1631 currentbookmark
1635 currentbookmark
1632 $ hg help templating | (grep currentbookmark || true)
1636 $ hg help templating | (grep currentbookmark || true)
1633
1637
1634 Test help hooks
1638 Test help hooks
1635
1639
1636 $ cat > helphook1.py <<EOF
1640 $ cat > helphook1.py <<EOF
1637 > from mercurial import help
1641 > from mercurial import help
1638 >
1642 >
1639 > def rewrite(ui, topic, doc):
1643 > def rewrite(ui, topic, doc):
1640 > return doc + b'\nhelphook1\n'
1644 > return doc + b'\nhelphook1\n'
1641 >
1645 >
1642 > def extsetup(ui):
1646 > def extsetup(ui):
1643 > help.addtopichook(b'revisions', rewrite)
1647 > help.addtopichook(b'revisions', rewrite)
1644 > EOF
1648 > EOF
1645 $ cat > helphook2.py <<EOF
1649 $ cat > helphook2.py <<EOF
1646 > from mercurial import help
1650 > from mercurial import help
1647 >
1651 >
1648 > def rewrite(ui, topic, doc):
1652 > def rewrite(ui, topic, doc):
1649 > return doc + b'\nhelphook2\n'
1653 > return doc + b'\nhelphook2\n'
1650 >
1654 >
1651 > def extsetup(ui):
1655 > def extsetup(ui):
1652 > help.addtopichook(b'revisions', rewrite)
1656 > help.addtopichook(b'revisions', rewrite)
1653 > EOF
1657 > EOF
1654 $ echo '[extensions]' >> $HGRCPATH
1658 $ echo '[extensions]' >> $HGRCPATH
1655 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1659 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1656 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1660 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1657 $ hg help revsets | grep helphook
1661 $ hg help revsets | grep helphook
1658 helphook1
1662 helphook1
1659 helphook2
1663 helphook2
1660
1664
1661 help -c should only show debug --debug
1665 help -c should only show debug --debug
1662
1666
1663 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1667 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1664 [1]
1668 [1]
1665
1669
1666 help -c should only show deprecated for -v
1670 help -c should only show deprecated for -v
1667
1671
1668 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1672 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1669 [1]
1673 [1]
1670
1674
1671 Test -s / --system
1675 Test -s / --system
1672
1676
1673 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1677 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1674 > wc -l | sed -e 's/ //g'
1678 > wc -l | sed -e 's/ //g'
1675 0
1679 0
1676 $ hg help config.files --system unix | grep 'USER' | \
1680 $ hg help config.files --system unix | grep 'USER' | \
1677 > wc -l | sed -e 's/ //g'
1681 > wc -l | sed -e 's/ //g'
1678 0
1682 0
1679
1683
1680 Test -e / -c / -k combinations
1684 Test -e / -c / -k combinations
1681
1685
1682 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1686 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1683 Commands:
1687 Commands:
1684 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1688 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1685 Extensions:
1689 Extensions:
1686 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1690 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1687 Topics:
1691 Topics:
1688 Commands:
1692 Commands:
1689 Extensions:
1693 Extensions:
1690 Extension Commands:
1694 Extension Commands:
1691 $ hg help -c schemes
1695 $ hg help -c schemes
1692 abort: no such help topic: schemes
1696 abort: no such help topic: schemes
1693 (try 'hg help --keyword schemes')
1697 (try 'hg help --keyword schemes')
1694 [10]
1698 [10]
1695 $ hg help -e schemes |head -1
1699 $ hg help -e schemes |head -1
1696 schemes extension - extend schemes with shortcuts to repository swarms
1700 schemes extension - extend schemes with shortcuts to repository swarms
1697 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1701 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1698 Commands:
1702 Commands:
1699 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1703 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1700 Extensions:
1704 Extensions:
1701 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1705 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1702 Extensions:
1706 Extensions:
1703 Commands:
1707 Commands:
1704 $ hg help -c commit > /dev/null
1708 $ hg help -c commit > /dev/null
1705 $ hg help -e -c commit > /dev/null
1709 $ hg help -e -c commit > /dev/null
1706 $ hg help -e commit
1710 $ hg help -e commit
1707 abort: no such help topic: commit
1711 abort: no such help topic: commit
1708 (try 'hg help --keyword commit')
1712 (try 'hg help --keyword commit')
1709 [10]
1713 [10]
1710
1714
1711 Test keyword search help
1715 Test keyword search help
1712
1716
1713 $ cat > prefixedname.py <<EOF
1717 $ cat > prefixedname.py <<EOF
1714 > '''matched against word "clone"
1718 > '''matched against word "clone"
1715 > '''
1719 > '''
1716 > EOF
1720 > EOF
1717 $ echo '[extensions]' >> $HGRCPATH
1721 $ echo '[extensions]' >> $HGRCPATH
1718 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1722 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1719 $ hg help -k clone
1723 $ hg help -k clone
1720 Topics:
1724 Topics:
1721
1725
1722 config Configuration Files
1726 config Configuration Files
1723 extensions Using Additional Features
1727 extensions Using Additional Features
1724 glossary Glossary
1728 glossary Glossary
1725 phases Working with Phases
1729 phases Working with Phases
1726 subrepos Subrepositories
1730 subrepos Subrepositories
1727 urls URL Paths
1731 urls URL Paths
1728
1732
1729 Commands:
1733 Commands:
1730
1734
1731 bookmarks create a new bookmark or list existing bookmarks
1735 bookmarks create a new bookmark or list existing bookmarks
1732 clone make a copy of an existing repository
1736 clone make a copy of an existing repository
1733 paths show aliases for remote repositories
1737 paths show aliases for remote repositories
1734 pull pull changes from the specified source
1738 pull pull changes from the specified source
1735 update update working directory (or switch revisions)
1739 update update working directory (or switch revisions)
1736
1740
1737 Extensions:
1741 Extensions:
1738
1742
1739 clonebundles advertise pre-generated bundles to seed clones
1743 clonebundles advertise pre-generated bundles to seed clones
1740 narrow create clones which fetch history data for subset of files
1744 narrow create clones which fetch history data for subset of files
1741 (EXPERIMENTAL)
1745 (EXPERIMENTAL)
1742 prefixedname matched against word "clone"
1746 prefixedname matched against word "clone"
1743 relink recreates hardlinks between repository clones
1747 relink recreates hardlinks between repository clones
1744
1748
1745 Extension Commands:
1749 Extension Commands:
1746
1750
1747 qclone clone main and patch repository at same time
1751 qclone clone main and patch repository at same time
1748
1752
1749 Test unfound topic
1753 Test unfound topic
1750
1754
1751 $ hg help nonexistingtopicthatwillneverexisteverever
1755 $ hg help nonexistingtopicthatwillneverexisteverever
1752 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1756 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1753 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1757 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1754 [10]
1758 [10]
1755
1759
1756 Test unfound keyword
1760 Test unfound keyword
1757
1761
1758 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1762 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1759 abort: no matches
1763 abort: no matches
1760 (try 'hg help' for a list of topics)
1764 (try 'hg help' for a list of topics)
1761 [10]
1765 [10]
1762
1766
1763 Test omit indicating for help
1767 Test omit indicating for help
1764
1768
1765 $ cat > addverboseitems.py <<EOF
1769 $ cat > addverboseitems.py <<EOF
1766 > r'''extension to test omit indicating.
1770 > r'''extension to test omit indicating.
1767 >
1771 >
1768 > This paragraph is never omitted (for extension)
1772 > This paragraph is never omitted (for extension)
1769 >
1773 >
1770 > .. container:: verbose
1774 > .. container:: verbose
1771 >
1775 >
1772 > This paragraph is omitted,
1776 > This paragraph is omitted,
1773 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1777 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1774 >
1778 >
1775 > This paragraph is never omitted, too (for extension)
1779 > This paragraph is never omitted, too (for extension)
1776 > '''
1780 > '''
1777 > from __future__ import absolute_import
1781 > from __future__ import absolute_import
1778 > from mercurial import commands, help
1782 > from mercurial import commands, help
1779 > testtopic = br"""This paragraph is never omitted (for topic).
1783 > testtopic = br"""This paragraph is never omitted (for topic).
1780 >
1784 >
1781 > .. container:: verbose
1785 > .. container:: verbose
1782 >
1786 >
1783 > This paragraph is omitted,
1787 > This paragraph is omitted,
1784 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1788 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1785 >
1789 >
1786 > This paragraph is never omitted, too (for topic)
1790 > This paragraph is never omitted, too (for topic)
1787 > """
1791 > """
1788 > def extsetup(ui):
1792 > def extsetup(ui):
1789 > help.helptable.append(([b"topic-containing-verbose"],
1793 > help.helptable.append(([b"topic-containing-verbose"],
1790 > b"This is the topic to test omit indicating.",
1794 > b"This is the topic to test omit indicating.",
1791 > lambda ui: testtopic))
1795 > lambda ui: testtopic))
1792 > EOF
1796 > EOF
1793 $ echo '[extensions]' >> $HGRCPATH
1797 $ echo '[extensions]' >> $HGRCPATH
1794 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1798 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1795 $ hg help addverboseitems
1799 $ hg help addverboseitems
1796 addverboseitems extension - extension to test omit indicating.
1800 addverboseitems extension - extension to test omit indicating.
1797
1801
1798 This paragraph is never omitted (for extension)
1802 This paragraph is never omitted (for extension)
1799
1803
1800 This paragraph is never omitted, too (for extension)
1804 This paragraph is never omitted, too (for extension)
1801
1805
1802 (some details hidden, use --verbose to show complete help)
1806 (some details hidden, use --verbose to show complete help)
1803
1807
1804 no commands defined
1808 no commands defined
1805 $ hg help -v addverboseitems
1809 $ hg help -v addverboseitems
1806 addverboseitems extension - extension to test omit indicating.
1810 addverboseitems extension - extension to test omit indicating.
1807
1811
1808 This paragraph is never omitted (for extension)
1812 This paragraph is never omitted (for extension)
1809
1813
1810 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1814 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1811 extension)
1815 extension)
1812
1816
1813 This paragraph is never omitted, too (for extension)
1817 This paragraph is never omitted, too (for extension)
1814
1818
1815 no commands defined
1819 no commands defined
1816 $ hg help topic-containing-verbose
1820 $ hg help topic-containing-verbose
1817 This is the topic to test omit indicating.
1821 This is the topic to test omit indicating.
1818 """"""""""""""""""""""""""""""""""""""""""
1822 """"""""""""""""""""""""""""""""""""""""""
1819
1823
1820 This paragraph is never omitted (for topic).
1824 This paragraph is never omitted (for topic).
1821
1825
1822 This paragraph is never omitted, too (for topic)
1826 This paragraph is never omitted, too (for topic)
1823
1827
1824 (some details hidden, use --verbose to show complete help)
1828 (some details hidden, use --verbose to show complete help)
1825 $ hg help -v topic-containing-verbose
1829 $ hg help -v topic-containing-verbose
1826 This is the topic to test omit indicating.
1830 This is the topic to test omit indicating.
1827 """"""""""""""""""""""""""""""""""""""""""
1831 """"""""""""""""""""""""""""""""""""""""""
1828
1832
1829 This paragraph is never omitted (for topic).
1833 This paragraph is never omitted (for topic).
1830
1834
1831 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1835 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1832 topic)
1836 topic)
1833
1837
1834 This paragraph is never omitted, too (for topic)
1838 This paragraph is never omitted, too (for topic)
1835
1839
1836 Test section lookup
1840 Test section lookup
1837
1841
1838 $ hg help revset.merge
1842 $ hg help revset.merge
1839 "merge()"
1843 "merge()"
1840 Changeset is a merge changeset.
1844 Changeset is a merge changeset.
1841
1845
1842 $ hg help glossary.dag
1846 $ hg help glossary.dag
1843 DAG
1847 DAG
1844 The repository of changesets of a distributed version control system
1848 The repository of changesets of a distributed version control system
1845 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1849 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1846 of nodes and edges, where nodes correspond to changesets and edges
1850 of nodes and edges, where nodes correspond to changesets and edges
1847 imply a parent -> child relation. This graph can be visualized by
1851 imply a parent -> child relation. This graph can be visualized by
1848 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1852 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1849 limited by the requirement for children to have at most two parents.
1853 limited by the requirement for children to have at most two parents.
1850
1854
1851
1855
1852 $ hg help hgrc.paths
1856 $ hg help hgrc.paths
1853 "paths"
1857 "paths"
1854 -------
1858 -------
1855
1859
1856 Assigns symbolic names and behavior to repositories.
1860 Assigns symbolic names and behavior to repositories.
1857
1861
1858 Options are symbolic names defining the URL or directory that is the
1862 Options are symbolic names defining the URL or directory that is the
1859 location of the repository. Example:
1863 location of the repository. Example:
1860
1864
1861 [paths]
1865 [paths]
1862 my_server = https://example.com/my_repo
1866 my_server = https://example.com/my_repo
1863 local_path = /home/me/repo
1867 local_path = /home/me/repo
1864
1868
1865 These symbolic names can be used from the command line. To pull from
1869 These symbolic names can be used from the command line. To pull from
1866 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1870 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1867 local_path'. You can check 'hg help urls' for details about valid URLs.
1871 local_path'. You can check 'hg help urls' for details about valid URLs.
1868
1872
1869 Options containing colons (":") denote sub-options that can influence
1873 Options containing colons (":") denote sub-options that can influence
1870 behavior for that specific path. Example:
1874 behavior for that specific path. Example:
1871
1875
1872 [paths]
1876 [paths]
1873 my_server = https://example.com/my_path
1877 my_server = https://example.com/my_path
1874 my_server:pushurl = ssh://example.com/my_path
1878 my_server:pushurl = ssh://example.com/my_path
1875
1879
1876 Paths using the 'path://otherpath' scheme will inherit the sub-options
1880 Paths using the 'path://otherpath' scheme will inherit the sub-options
1877 value from the path they point to.
1881 value from the path they point to.
1878
1882
1879 The following sub-options can be defined:
1883 The following sub-options can be defined:
1880
1884
1881 "multi-urls"
1885 "multi-urls"
1882 A boolean option. When enabled the value of the '[paths]' entry will be
1886 A boolean option. When enabled the value of the '[paths]' entry will be
1883 parsed as a list and the alias will resolve to multiple destination. If
1887 parsed as a list and the alias will resolve to multiple destination. If
1884 some of the list entry use the 'path://' syntax, the suboption will be
1888 some of the list entry use the 'path://' syntax, the suboption will be
1885 inherited individually.
1889 inherited individually.
1886
1890
1887 "pushurl"
1891 "pushurl"
1888 The URL to use for push operations. If not defined, the location
1892 The URL to use for push operations. If not defined, the location
1889 defined by the path's main entry is used.
1893 defined by the path's main entry is used.
1890
1894
1891 "pushrev"
1895 "pushrev"
1892 A revset defining which revisions to push by default.
1896 A revset defining which revisions to push by default.
1893
1897
1894 When 'hg push' is executed without a "-r" argument, the revset defined
1898 When 'hg push' is executed without a "-r" argument, the revset defined
1895 by this sub-option is evaluated to determine what to push.
1899 by this sub-option is evaluated to determine what to push.
1896
1900
1897 For example, a value of "." will push the working directory's revision
1901 For example, a value of "." will push the working directory's revision
1898 by default.
1902 by default.
1899
1903
1900 Revsets specifying bookmarks will not result in the bookmark being
1904 Revsets specifying bookmarks will not result in the bookmark being
1901 pushed.
1905 pushed.
1902
1906
1903 "bookmarks.mode"
1907 "bookmarks.mode"
1904 How bookmark will be dealt during the exchange. It support the following
1908 How bookmark will be dealt during the exchange. It support the following
1905 value
1909 value
1906
1910
1907 - "default": the default behavior, local and remote bookmarks are
1911 - "default": the default behavior, local and remote bookmarks are
1908 "merged" on push/pull.
1912 "merged" on push/pull.
1909 - "mirror": when pulling, replace local bookmarks by remote bookmarks.
1913 - "mirror": when pulling, replace local bookmarks by remote bookmarks.
1910 This is useful to replicate a repository, or as an optimization.
1914 This is useful to replicate a repository, or as an optimization.
1911 - "ignore": ignore bookmarks during exchange. (This currently only
1915 - "ignore": ignore bookmarks during exchange. (This currently only
1912 affect pulling)
1916 affect pulling)
1913
1917
1914 The following special named paths exist:
1918 The following special named paths exist:
1915
1919
1916 "default"
1920 "default"
1917 The URL or directory to use when no source or remote is specified.
1921 The URL or directory to use when no source or remote is specified.
1918
1922
1919 'hg clone' will automatically define this path to the location the
1923 'hg clone' will automatically define this path to the location the
1920 repository was cloned from.
1924 repository was cloned from.
1921
1925
1922 "default-push"
1926 "default-push"
1923 (deprecated) The URL or directory for the default 'hg push' location.
1927 (deprecated) The URL or directory for the default 'hg push' location.
1924 "default:pushurl" should be used instead.
1928 "default:pushurl" should be used instead.
1925
1929
1926 $ hg help glossary.mcguffin
1930 $ hg help glossary.mcguffin
1927 abort: help section not found: glossary.mcguffin
1931 abort: help section not found: glossary.mcguffin
1928 [10]
1932 [10]
1929
1933
1930 $ hg help glossary.mc.guffin
1934 $ hg help glossary.mc.guffin
1931 abort: help section not found: glossary.mc.guffin
1935 abort: help section not found: glossary.mc.guffin
1932 [10]
1936 [10]
1933
1937
1934 $ hg help template.files
1938 $ hg help template.files
1935 files List of strings. All files modified, added, or removed by
1939 files List of strings. All files modified, added, or removed by
1936 this changeset.
1940 this changeset.
1937 files(pattern)
1941 files(pattern)
1938 All files of the current changeset matching the pattern. See
1942 All files of the current changeset matching the pattern. See
1939 'hg help patterns'.
1943 'hg help patterns'.
1940
1944
1941 Test section lookup by translated message
1945 Test section lookup by translated message
1942
1946
1943 str.lower() instead of encoding.lower(str) on translated message might
1947 str.lower() instead of encoding.lower(str) on translated message might
1944 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1948 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1945 as the second or later byte of multi-byte character.
1949 as the second or later byte of multi-byte character.
1946
1950
1947 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1951 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1948 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1952 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1949 replacement makes message meaningless.
1953 replacement makes message meaningless.
1950
1954
1951 This tests that section lookup by translated string isn't broken by
1955 This tests that section lookup by translated string isn't broken by
1952 such str.lower().
1956 such str.lower().
1953
1957
1954 $ "$PYTHON" <<EOF
1958 $ "$PYTHON" <<EOF
1955 > def escape(s):
1959 > def escape(s):
1956 > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932'))
1960 > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932'))
1957 > # translation of "record" in ja_JP.cp932
1961 > # translation of "record" in ja_JP.cp932
1958 > upper = b"\x8bL\x98^"
1962 > upper = b"\x8bL\x98^"
1959 > # str.lower()-ed section name should be treated as different one
1963 > # str.lower()-ed section name should be treated as different one
1960 > lower = b"\x8bl\x98^"
1964 > lower = b"\x8bl\x98^"
1961 > with open('ambiguous.py', 'wb') as fp:
1965 > with open('ambiguous.py', 'wb') as fp:
1962 > fp.write(b"""# ambiguous section names in ja_JP.cp932
1966 > fp.write(b"""# ambiguous section names in ja_JP.cp932
1963 > u'''summary of extension
1967 > u'''summary of extension
1964 >
1968 >
1965 > %s
1969 > %s
1966 > ----
1970 > ----
1967 >
1971 >
1968 > Upper name should show only this message
1972 > Upper name should show only this message
1969 >
1973 >
1970 > %s
1974 > %s
1971 > ----
1975 > ----
1972 >
1976 >
1973 > Lower name should show only this message
1977 > Lower name should show only this message
1974 >
1978 >
1975 > subsequent section
1979 > subsequent section
1976 > ------------------
1980 > ------------------
1977 >
1981 >
1978 > This should be hidden at 'hg help ambiguous' with section name.
1982 > This should be hidden at 'hg help ambiguous' with section name.
1979 > '''
1983 > '''
1980 > """ % (escape(upper), escape(lower)))
1984 > """ % (escape(upper), escape(lower)))
1981 > EOF
1985 > EOF
1982
1986
1983 $ cat >> $HGRCPATH <<EOF
1987 $ cat >> $HGRCPATH <<EOF
1984 > [extensions]
1988 > [extensions]
1985 > ambiguous = ./ambiguous.py
1989 > ambiguous = ./ambiguous.py
1986 > EOF
1990 > EOF
1987
1991
1988 $ "$PYTHON" <<EOF | sh
1992 $ "$PYTHON" <<EOF | sh
1989 > from mercurial.utils import procutil
1993 > from mercurial.utils import procutil
1990 > upper = b"\x8bL\x98^"
1994 > upper = b"\x8bL\x98^"
1991 > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper)
1995 > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper)
1992 > EOF
1996 > EOF
1993 \x8bL\x98^ (esc)
1997 \x8bL\x98^ (esc)
1994 ----
1998 ----
1995
1999
1996 Upper name should show only this message
2000 Upper name should show only this message
1997
2001
1998
2002
1999 $ "$PYTHON" <<EOF | sh
2003 $ "$PYTHON" <<EOF | sh
2000 > from mercurial.utils import procutil
2004 > from mercurial.utils import procutil
2001 > lower = b"\x8bl\x98^"
2005 > lower = b"\x8bl\x98^"
2002 > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower)
2006 > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower)
2003 > EOF
2007 > EOF
2004 \x8bl\x98^ (esc)
2008 \x8bl\x98^ (esc)
2005 ----
2009 ----
2006
2010
2007 Lower name should show only this message
2011 Lower name should show only this message
2008
2012
2009
2013
2010 $ cat >> $HGRCPATH <<EOF
2014 $ cat >> $HGRCPATH <<EOF
2011 > [extensions]
2015 > [extensions]
2012 > ambiguous = !
2016 > ambiguous = !
2013 > EOF
2017 > EOF
2014
2018
2015 Show help content of disabled extensions
2019 Show help content of disabled extensions
2016
2020
2017 $ cat >> $HGRCPATH <<EOF
2021 $ cat >> $HGRCPATH <<EOF
2018 > [extensions]
2022 > [extensions]
2019 > ambiguous = !./ambiguous.py
2023 > ambiguous = !./ambiguous.py
2020 > EOF
2024 > EOF
2021 $ hg help -e ambiguous
2025 $ hg help -e ambiguous
2022 ambiguous extension - (no help text available)
2026 ambiguous extension - (no help text available)
2023
2027
2024 (use 'hg help extensions' for information on enabling extensions)
2028 (use 'hg help extensions' for information on enabling extensions)
2025
2029
2026 Test dynamic list of merge tools only shows up once
2030 Test dynamic list of merge tools only shows up once
2027 $ hg help merge-tools
2031 $ hg help merge-tools
2028 Merge Tools
2032 Merge Tools
2029 """""""""""
2033 """""""""""
2030
2034
2031 To merge files Mercurial uses merge tools.
2035 To merge files Mercurial uses merge tools.
2032
2036
2033 A merge tool combines two different versions of a file into a merged file.
2037 A merge tool combines two different versions of a file into a merged file.
2034 Merge tools are given the two files and the greatest common ancestor of
2038 Merge tools are given the two files and the greatest common ancestor of
2035 the two file versions, so they can determine the changes made on both
2039 the two file versions, so they can determine the changes made on both
2036 branches.
2040 branches.
2037
2041
2038 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
2042 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
2039 backout' and in several extensions.
2043 backout' and in several extensions.
2040
2044
2041 Usually, the merge tool tries to automatically reconcile the files by
2045 Usually, the merge tool tries to automatically reconcile the files by
2042 combining all non-overlapping changes that occurred separately in the two
2046 combining all non-overlapping changes that occurred separately in the two
2043 different evolutions of the same initial base file. Furthermore, some
2047 different evolutions of the same initial base file. Furthermore, some
2044 interactive merge programs make it easier to manually resolve conflicting
2048 interactive merge programs make it easier to manually resolve conflicting
2045 merges, either in a graphical way, or by inserting some conflict markers.
2049 merges, either in a graphical way, or by inserting some conflict markers.
2046 Mercurial does not include any interactive merge programs but relies on
2050 Mercurial does not include any interactive merge programs but relies on
2047 external tools for that.
2051 external tools for that.
2048
2052
2049 Available merge tools
2053 Available merge tools
2050 =====================
2054 =====================
2051
2055
2052 External merge tools and their properties are configured in the merge-
2056 External merge tools and their properties are configured in the merge-
2053 tools configuration section - see hgrc(5) - but they can often just be
2057 tools configuration section - see hgrc(5) - but they can often just be
2054 named by their executable.
2058 named by their executable.
2055
2059
2056 A merge tool is generally usable if its executable can be found on the
2060 A merge tool is generally usable if its executable can be found on the
2057 system and if it can handle the merge. The executable is found if it is an
2061 system and if it can handle the merge. The executable is found if it is an
2058 absolute or relative executable path or the name of an application in the
2062 absolute or relative executable path or the name of an application in the
2059 executable search path. The tool is assumed to be able to handle the merge
2063 executable search path. The tool is assumed to be able to handle the merge
2060 if it can handle symlinks if the file is a symlink, if it can handle
2064 if it can handle symlinks if the file is a symlink, if it can handle
2061 binary files if the file is binary, and if a GUI is available if the tool
2065 binary files if the file is binary, and if a GUI is available if the tool
2062 requires a GUI.
2066 requires a GUI.
2063
2067
2064 There are some internal merge tools which can be used. The internal merge
2068 There are some internal merge tools which can be used. The internal merge
2065 tools are:
2069 tools are:
2066
2070
2067 ":dump"
2071 ":dump"
2068 Creates three versions of the files to merge, containing the contents of
2072 Creates three versions of the files to merge, containing the contents of
2069 local, other and base. These files can then be used to perform a merge
2073 local, other and base. These files can then be used to perform a merge
2070 manually. If the file to be merged is named "a.txt", these files will
2074 manually. If the file to be merged is named "a.txt", these files will
2071 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
2075 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
2072 they will be placed in the same directory as "a.txt".
2076 they will be placed in the same directory as "a.txt".
2073
2077
2074 This implies premerge. Therefore, files aren't dumped, if premerge runs
2078 This implies premerge. Therefore, files aren't dumped, if premerge runs
2075 successfully. Use :forcedump to forcibly write files out.
2079 successfully. Use :forcedump to forcibly write files out.
2076
2080
2077 (actual capabilities: binary, symlink)
2081 (actual capabilities: binary, symlink)
2078
2082
2079 ":fail"
2083 ":fail"
2080 Rather than attempting to merge files that were modified on both
2084 Rather than attempting to merge files that were modified on both
2081 branches, it marks them as unresolved. The resolve command must be used
2085 branches, it marks them as unresolved. The resolve command must be used
2082 to resolve these conflicts.
2086 to resolve these conflicts.
2083
2087
2084 (actual capabilities: binary, symlink)
2088 (actual capabilities: binary, symlink)
2085
2089
2086 ":forcedump"
2090 ":forcedump"
2087 Creates three versions of the files as same as :dump, but omits
2091 Creates three versions of the files as same as :dump, but omits
2088 premerge.
2092 premerge.
2089
2093
2090 (actual capabilities: binary, symlink)
2094 (actual capabilities: binary, symlink)
2091
2095
2092 ":local"
2096 ":local"
2093 Uses the local 'p1()' version of files as the merged version.
2097 Uses the local 'p1()' version of files as the merged version.
2094
2098
2095 (actual capabilities: binary, symlink)
2099 (actual capabilities: binary, symlink)
2096
2100
2097 ":merge"
2101 ":merge"
2098 Uses the internal non-interactive simple merge algorithm for merging
2102 Uses the internal non-interactive simple merge algorithm for merging
2099 files. It will fail if there are any conflicts and leave markers in the
2103 files. It will fail if there are any conflicts and leave markers in the
2100 partially merged file. Markers will have two sections, one for each side
2104 partially merged file. Markers will have two sections, one for each side
2101 of merge.
2105 of merge.
2102
2106
2103 ":merge-local"
2107 ":merge-local"
2104 Like :merge, but resolve all conflicts non-interactively in favor of the
2108 Like :merge, but resolve all conflicts non-interactively in favor of the
2105 local 'p1()' changes.
2109 local 'p1()' changes.
2106
2110
2107 ":merge-other"
2111 ":merge-other"
2108 Like :merge, but resolve all conflicts non-interactively in favor of the
2112 Like :merge, but resolve all conflicts non-interactively in favor of the
2109 other 'p2()' changes.
2113 other 'p2()' changes.
2110
2114
2111 ":merge3"
2115 ":merge3"
2112 Uses the internal non-interactive simple merge algorithm for merging
2116 Uses the internal non-interactive simple merge algorithm for merging
2113 files. It will fail if there are any conflicts and leave markers in the
2117 files. It will fail if there are any conflicts and leave markers in the
2114 partially merged file. Marker will have three sections, one from each
2118 partially merged file. Marker will have three sections, one from each
2115 side of the merge and one for the base content.
2119 side of the merge and one for the base content.
2116
2120
2117 ":mergediff"
2121 ":mergediff"
2118 Uses the internal non-interactive simple merge algorithm for merging
2122 Uses the internal non-interactive simple merge algorithm for merging
2119 files. It will fail if there are any conflicts and leave markers in the
2123 files. It will fail if there are any conflicts and leave markers in the
2120 partially merged file. The marker will have two sections, one with the
2124 partially merged file. The marker will have two sections, one with the
2121 content from one side of the merge, and one with a diff from the base
2125 content from one side of the merge, and one with a diff from the base
2122 content to the content on the other side. (experimental)
2126 content to the content on the other side. (experimental)
2123
2127
2124 ":other"
2128 ":other"
2125 Uses the other 'p2()' version of files as the merged version.
2129 Uses the other 'p2()' version of files as the merged version.
2126
2130
2127 (actual capabilities: binary, symlink)
2131 (actual capabilities: binary, symlink)
2128
2132
2129 ":prompt"
2133 ":prompt"
2130 Asks the user which of the local 'p1()' or the other 'p2()' version to
2134 Asks the user which of the local 'p1()' or the other 'p2()' version to
2131 keep as the merged version.
2135 keep as the merged version.
2132
2136
2133 (actual capabilities: binary, symlink)
2137 (actual capabilities: binary, symlink)
2134
2138
2135 ":tagmerge"
2139 ":tagmerge"
2136 Uses the internal tag merge algorithm (experimental).
2140 Uses the internal tag merge algorithm (experimental).
2137
2141
2138 ":union"
2142 ":union"
2139 Uses the internal non-interactive simple merge algorithm for merging
2143 Uses the internal non-interactive simple merge algorithm for merging
2140 files. It will use both left and right sides for conflict regions. No
2144 files. It will use both left and right sides for conflict regions. No
2141 markers are inserted.
2145 markers are inserted.
2142
2146
2143 Internal tools are always available and do not require a GUI but will by
2147 Internal tools are always available and do not require a GUI but will by
2144 default not handle symlinks or binary files. See next section for detail
2148 default not handle symlinks or binary files. See next section for detail
2145 about "actual capabilities" described above.
2149 about "actual capabilities" described above.
2146
2150
2147 Choosing a merge tool
2151 Choosing a merge tool
2148 =====================
2152 =====================
2149
2153
2150 Mercurial uses these rules when deciding which merge tool to use:
2154 Mercurial uses these rules when deciding which merge tool to use:
2151
2155
2152 1. If a tool has been specified with the --tool option to merge or
2156 1. If a tool has been specified with the --tool option to merge or
2153 resolve, it is used. If it is the name of a tool in the merge-tools
2157 resolve, it is used. If it is the name of a tool in the merge-tools
2154 configuration, its configuration is used. Otherwise the specified tool
2158 configuration, its configuration is used. Otherwise the specified tool
2155 must be executable by the shell.
2159 must be executable by the shell.
2156 2. If the "HGMERGE" environment variable is present, its value is used and
2160 2. If the "HGMERGE" environment variable is present, its value is used and
2157 must be executable by the shell.
2161 must be executable by the shell.
2158 3. If the filename of the file to be merged matches any of the patterns in
2162 3. If the filename of the file to be merged matches any of the patterns in
2159 the merge-patterns configuration section, the first usable merge tool
2163 the merge-patterns configuration section, the first usable merge tool
2160 corresponding to a matching pattern is used.
2164 corresponding to a matching pattern is used.
2161 4. If ui.merge is set it will be considered next. If the value is not the
2165 4. If ui.merge is set it will be considered next. If the value is not the
2162 name of a configured tool, the specified value is used and must be
2166 name of a configured tool, the specified value is used and must be
2163 executable by the shell. Otherwise the named tool is used if it is
2167 executable by the shell. Otherwise the named tool is used if it is
2164 usable.
2168 usable.
2165 5. If any usable merge tools are present in the merge-tools configuration
2169 5. If any usable merge tools are present in the merge-tools configuration
2166 section, the one with the highest priority is used.
2170 section, the one with the highest priority is used.
2167 6. If a program named "hgmerge" can be found on the system, it is used -
2171 6. If a program named "hgmerge" can be found on the system, it is used -
2168 but it will by default not be used for symlinks and binary files.
2172 but it will by default not be used for symlinks and binary files.
2169 7. If the file to be merged is not binary and is not a symlink, then
2173 7. If the file to be merged is not binary and is not a symlink, then
2170 internal ":merge" is used.
2174 internal ":merge" is used.
2171 8. Otherwise, ":prompt" is used.
2175 8. Otherwise, ":prompt" is used.
2172
2176
2173 For historical reason, Mercurial treats merge tools as below while
2177 For historical reason, Mercurial treats merge tools as below while
2174 examining rules above.
2178 examining rules above.
2175
2179
2176 step specified via binary symlink
2180 step specified via binary symlink
2177 ----------------------------------
2181 ----------------------------------
2178 1. --tool o/o o/o
2182 1. --tool o/o o/o
2179 2. HGMERGE o/o o/o
2183 2. HGMERGE o/o o/o
2180 3. merge-patterns o/o(*) x/?(*)
2184 3. merge-patterns o/o(*) x/?(*)
2181 4. ui.merge x/?(*) x/?(*)
2185 4. ui.merge x/?(*) x/?(*)
2182
2186
2183 Each capability column indicates Mercurial behavior for internal/external
2187 Each capability column indicates Mercurial behavior for internal/external
2184 merge tools at examining each rule.
2188 merge tools at examining each rule.
2185
2189
2186 - "o": "assume that a tool has capability"
2190 - "o": "assume that a tool has capability"
2187 - "x": "assume that a tool does not have capability"
2191 - "x": "assume that a tool does not have capability"
2188 - "?": "check actual capability of a tool"
2192 - "?": "check actual capability of a tool"
2189
2193
2190 If "merge.strict-capability-check" configuration is true, Mercurial checks
2194 If "merge.strict-capability-check" configuration is true, Mercurial checks
2191 capabilities of merge tools strictly in (*) cases above (= each capability
2195 capabilities of merge tools strictly in (*) cases above (= each capability
2192 column becomes "?/?"). It is false by default for backward compatibility.
2196 column becomes "?/?"). It is false by default for backward compatibility.
2193
2197
2194 Note:
2198 Note:
2195 After selecting a merge program, Mercurial will by default attempt to
2199 After selecting a merge program, Mercurial will by default attempt to
2196 merge the files using a simple merge algorithm first. Only if it
2200 merge the files using a simple merge algorithm first. Only if it
2197 doesn't succeed because of conflicting changes will Mercurial actually
2201 doesn't succeed because of conflicting changes will Mercurial actually
2198 execute the merge program. Whether to use the simple merge algorithm
2202 execute the merge program. Whether to use the simple merge algorithm
2199 first can be controlled by the premerge setting of the merge tool.
2203 first can be controlled by the premerge setting of the merge tool.
2200 Premerge is enabled by default unless the file is binary or a symlink.
2204 Premerge is enabled by default unless the file is binary or a symlink.
2201
2205
2202 See the merge-tools and ui sections of hgrc(5) for details on the
2206 See the merge-tools and ui sections of hgrc(5) for details on the
2203 configuration of merge tools.
2207 configuration of merge tools.
2204
2208
2205 Compression engines listed in `hg help bundlespec`
2209 Compression engines listed in `hg help bundlespec`
2206
2210
2207 $ hg help bundlespec | grep gzip
2211 $ hg help bundlespec | grep gzip
2208 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
2212 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
2209 An algorithm that produces smaller bundles than "gzip".
2213 An algorithm that produces smaller bundles than "gzip".
2210 This engine will likely produce smaller bundles than "gzip" but will be
2214 This engine will likely produce smaller bundles than "gzip" but will be
2211 "gzip"
2215 "gzip"
2212 better compression than "gzip". It also frequently yields better (?)
2216 better compression than "gzip". It also frequently yields better (?)
2213
2217
2214 Test usage of section marks in help documents
2218 Test usage of section marks in help documents
2215
2219
2216 $ cd "$TESTDIR"/../doc
2220 $ cd "$TESTDIR"/../doc
2217 $ "$PYTHON" check-seclevel.py
2221 $ "$PYTHON" check-seclevel.py
2218 $ cd $TESTTMP
2222 $ cd $TESTTMP
2219
2223
2220 #if serve
2224 #if serve
2221
2225
2222 Test the help pages in hgweb.
2226 Test the help pages in hgweb.
2223
2227
2224 Dish up an empty repo; serve it cold.
2228 Dish up an empty repo; serve it cold.
2225
2229
2226 $ hg init "$TESTTMP/test"
2230 $ hg init "$TESTTMP/test"
2227 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
2231 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
2228 $ cat hg.pid >> $DAEMON_PIDS
2232 $ cat hg.pid >> $DAEMON_PIDS
2229
2233
2230 $ get-with-headers.py $LOCALIP:$HGPORT "help"
2234 $ get-with-headers.py $LOCALIP:$HGPORT "help"
2231 200 Script output follows
2235 200 Script output follows
2232
2236
2233 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2237 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2234 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2238 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2235 <head>
2239 <head>
2236 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2240 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2237 <meta name="robots" content="index, nofollow" />
2241 <meta name="robots" content="index, nofollow" />
2238 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2242 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2239 <script type="text/javascript" src="/static/mercurial.js"></script>
2243 <script type="text/javascript" src="/static/mercurial.js"></script>
2240
2244
2241 <title>Help: Index</title>
2245 <title>Help: Index</title>
2242 </head>
2246 </head>
2243 <body>
2247 <body>
2244
2248
2245 <div class="container">
2249 <div class="container">
2246 <div class="menu">
2250 <div class="menu">
2247 <div class="logo">
2251 <div class="logo">
2248 <a href="https://mercurial-scm.org/">
2252 <a href="https://mercurial-scm.org/">
2249 <img src="/static/hglogo.png" alt="mercurial" /></a>
2253 <img src="/static/hglogo.png" alt="mercurial" /></a>
2250 </div>
2254 </div>
2251 <ul>
2255 <ul>
2252 <li><a href="/shortlog">log</a></li>
2256 <li><a href="/shortlog">log</a></li>
2253 <li><a href="/graph">graph</a></li>
2257 <li><a href="/graph">graph</a></li>
2254 <li><a href="/tags">tags</a></li>
2258 <li><a href="/tags">tags</a></li>
2255 <li><a href="/bookmarks">bookmarks</a></li>
2259 <li><a href="/bookmarks">bookmarks</a></li>
2256 <li><a href="/branches">branches</a></li>
2260 <li><a href="/branches">branches</a></li>
2257 </ul>
2261 </ul>
2258 <ul>
2262 <ul>
2259 <li class="active">help</li>
2263 <li class="active">help</li>
2260 </ul>
2264 </ul>
2261 </div>
2265 </div>
2262
2266
2263 <div class="main">
2267 <div class="main">
2264 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2268 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2265
2269
2266 <form class="search" action="/log">
2270 <form class="search" action="/log">
2267
2271
2268 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2272 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2269 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2273 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2270 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2274 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2271 </form>
2275 </form>
2272 <table class="bigtable">
2276 <table class="bigtable">
2273 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2277 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2274
2278
2275 <tr><td>
2279 <tr><td>
2276 <a href="/help/bundlespec">
2280 <a href="/help/bundlespec">
2277 bundlespec
2281 bundlespec
2278 </a>
2282 </a>
2279 </td><td>
2283 </td><td>
2280 Bundle File Formats
2284 Bundle File Formats
2281 </td></tr>
2285 </td></tr>
2282 <tr><td>
2286 <tr><td>
2283 <a href="/help/color">
2287 <a href="/help/color">
2284 color
2288 color
2285 </a>
2289 </a>
2286 </td><td>
2290 </td><td>
2287 Colorizing Outputs
2291 Colorizing Outputs
2288 </td></tr>
2292 </td></tr>
2289 <tr><td>
2293 <tr><td>
2290 <a href="/help/config">
2294 <a href="/help/config">
2291 config
2295 config
2292 </a>
2296 </a>
2293 </td><td>
2297 </td><td>
2294 Configuration Files
2298 Configuration Files
2295 </td></tr>
2299 </td></tr>
2296 <tr><td>
2300 <tr><td>
2297 <a href="/help/dates">
2301 <a href="/help/dates">
2298 dates
2302 dates
2299 </a>
2303 </a>
2300 </td><td>
2304 </td><td>
2301 Date Formats
2305 Date Formats
2302 </td></tr>
2306 </td></tr>
2303 <tr><td>
2307 <tr><td>
2304 <a href="/help/deprecated">
2308 <a href="/help/deprecated">
2305 deprecated
2309 deprecated
2306 </a>
2310 </a>
2307 </td><td>
2311 </td><td>
2308 Deprecated Features
2312 Deprecated Features
2309 </td></tr>
2313 </td></tr>
2310 <tr><td>
2314 <tr><td>
2311 <a href="/help/diffs">
2315 <a href="/help/diffs">
2312 diffs
2316 diffs
2313 </a>
2317 </a>
2314 </td><td>
2318 </td><td>
2315 Diff Formats
2319 Diff Formats
2316 </td></tr>
2320 </td></tr>
2317 <tr><td>
2321 <tr><td>
2318 <a href="/help/environment">
2322 <a href="/help/environment">
2319 environment
2323 environment
2320 </a>
2324 </a>
2321 </td><td>
2325 </td><td>
2322 Environment Variables
2326 Environment Variables
2323 </td></tr>
2327 </td></tr>
2324 <tr><td>
2328 <tr><td>
2325 <a href="/help/evolution">
2329 <a href="/help/evolution">
2326 evolution
2330 evolution
2327 </a>
2331 </a>
2328 </td><td>
2332 </td><td>
2329 Safely rewriting history (EXPERIMENTAL)
2333 Safely rewriting history (EXPERIMENTAL)
2330 </td></tr>
2334 </td></tr>
2331 <tr><td>
2335 <tr><td>
2332 <a href="/help/extensions">
2336 <a href="/help/extensions">
2333 extensions
2337 extensions
2334 </a>
2338 </a>
2335 </td><td>
2339 </td><td>
2336 Using Additional Features
2340 Using Additional Features
2337 </td></tr>
2341 </td></tr>
2338 <tr><td>
2342 <tr><td>
2339 <a href="/help/filesets">
2343 <a href="/help/filesets">
2340 filesets
2344 filesets
2341 </a>
2345 </a>
2342 </td><td>
2346 </td><td>
2343 Specifying File Sets
2347 Specifying File Sets
2344 </td></tr>
2348 </td></tr>
2345 <tr><td>
2349 <tr><td>
2346 <a href="/help/flags">
2350 <a href="/help/flags">
2347 flags
2351 flags
2348 </a>
2352 </a>
2349 </td><td>
2353 </td><td>
2350 Command-line flags
2354 Command-line flags
2351 </td></tr>
2355 </td></tr>
2352 <tr><td>
2356 <tr><td>
2353 <a href="/help/glossary">
2357 <a href="/help/glossary">
2354 glossary
2358 glossary
2355 </a>
2359 </a>
2356 </td><td>
2360 </td><td>
2357 Glossary
2361 Glossary
2358 </td></tr>
2362 </td></tr>
2359 <tr><td>
2363 <tr><td>
2360 <a href="/help/hgignore">
2364 <a href="/help/hgignore">
2361 hgignore
2365 hgignore
2362 </a>
2366 </a>
2363 </td><td>
2367 </td><td>
2364 Syntax for Mercurial Ignore Files
2368 Syntax for Mercurial Ignore Files
2365 </td></tr>
2369 </td></tr>
2366 <tr><td>
2370 <tr><td>
2367 <a href="/help/hgweb">
2371 <a href="/help/hgweb">
2368 hgweb
2372 hgweb
2369 </a>
2373 </a>
2370 </td><td>
2374 </td><td>
2371 Configuring hgweb
2375 Configuring hgweb
2372 </td></tr>
2376 </td></tr>
2373 <tr><td>
2377 <tr><td>
2374 <a href="/help/internals">
2378 <a href="/help/internals">
2375 internals
2379 internals
2376 </a>
2380 </a>
2377 </td><td>
2381 </td><td>
2378 Technical implementation topics
2382 Technical implementation topics
2379 </td></tr>
2383 </td></tr>
2380 <tr><td>
2384 <tr><td>
2381 <a href="/help/merge-tools">
2385 <a href="/help/merge-tools">
2382 merge-tools
2386 merge-tools
2383 </a>
2387 </a>
2384 </td><td>
2388 </td><td>
2385 Merge Tools
2389 Merge Tools
2386 </td></tr>
2390 </td></tr>
2387 <tr><td>
2391 <tr><td>
2388 <a href="/help/pager">
2392 <a href="/help/pager">
2389 pager
2393 pager
2390 </a>
2394 </a>
2391 </td><td>
2395 </td><td>
2392 Pager Support
2396 Pager Support
2393 </td></tr>
2397 </td></tr>
2394 <tr><td>
2398 <tr><td>
2395 <a href="/help/patterns">
2399 <a href="/help/patterns">
2396 patterns
2400 patterns
2397 </a>
2401 </a>
2398 </td><td>
2402 </td><td>
2399 File Name Patterns
2403 File Name Patterns
2400 </td></tr>
2404 </td></tr>
2401 <tr><td>
2405 <tr><td>
2402 <a href="/help/phases">
2406 <a href="/help/phases">
2403 phases
2407 phases
2404 </a>
2408 </a>
2405 </td><td>
2409 </td><td>
2406 Working with Phases
2410 Working with Phases
2407 </td></tr>
2411 </td></tr>
2408 <tr><td>
2412 <tr><td>
2409 <a href="/help/revisions">
2413 <a href="/help/revisions">
2410 revisions
2414 revisions
2411 </a>
2415 </a>
2412 </td><td>
2416 </td><td>
2413 Specifying Revisions
2417 Specifying Revisions
2414 </td></tr>
2418 </td></tr>
2415 <tr><td>
2419 <tr><td>
2420 <a href="/help/rust">
2421 rust
2422 </a>
2423 </td><td>
2424 Rust in Mercurial
2425 </td></tr>
2426 <tr><td>
2416 <a href="/help/scripting">
2427 <a href="/help/scripting">
2417 scripting
2428 scripting
2418 </a>
2429 </a>
2419 </td><td>
2430 </td><td>
2420 Using Mercurial from scripts and automation
2431 Using Mercurial from scripts and automation
2421 </td></tr>
2432 </td></tr>
2422 <tr><td>
2433 <tr><td>
2423 <a href="/help/subrepos">
2434 <a href="/help/subrepos">
2424 subrepos
2435 subrepos
2425 </a>
2436 </a>
2426 </td><td>
2437 </td><td>
2427 Subrepositories
2438 Subrepositories
2428 </td></tr>
2439 </td></tr>
2429 <tr><td>
2440 <tr><td>
2430 <a href="/help/templating">
2441 <a href="/help/templating">
2431 templating
2442 templating
2432 </a>
2443 </a>
2433 </td><td>
2444 </td><td>
2434 Template Usage
2445 Template Usage
2435 </td></tr>
2446 </td></tr>
2436 <tr><td>
2447 <tr><td>
2437 <a href="/help/urls">
2448 <a href="/help/urls">
2438 urls
2449 urls
2439 </a>
2450 </a>
2440 </td><td>
2451 </td><td>
2441 URL Paths
2452 URL Paths
2442 </td></tr>
2453 </td></tr>
2443 <tr><td>
2454 <tr><td>
2444 <a href="/help/topic-containing-verbose">
2455 <a href="/help/topic-containing-verbose">
2445 topic-containing-verbose
2456 topic-containing-verbose
2446 </a>
2457 </a>
2447 </td><td>
2458 </td><td>
2448 This is the topic to test omit indicating.
2459 This is the topic to test omit indicating.
2449 </td></tr>
2460 </td></tr>
2450
2461
2451
2462
2452 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2463 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2453
2464
2454 <tr><td>
2465 <tr><td>
2455 <a href="/help/abort">
2466 <a href="/help/abort">
2456 abort
2467 abort
2457 </a>
2468 </a>
2458 </td><td>
2469 </td><td>
2459 abort an unfinished operation (EXPERIMENTAL)
2470 abort an unfinished operation (EXPERIMENTAL)
2460 </td></tr>
2471 </td></tr>
2461 <tr><td>
2472 <tr><td>
2462 <a href="/help/add">
2473 <a href="/help/add">
2463 add
2474 add
2464 </a>
2475 </a>
2465 </td><td>
2476 </td><td>
2466 add the specified files on the next commit
2477 add the specified files on the next commit
2467 </td></tr>
2478 </td></tr>
2468 <tr><td>
2479 <tr><td>
2469 <a href="/help/annotate">
2480 <a href="/help/annotate">
2470 annotate
2481 annotate
2471 </a>
2482 </a>
2472 </td><td>
2483 </td><td>
2473 show changeset information by line for each file
2484 show changeset information by line for each file
2474 </td></tr>
2485 </td></tr>
2475 <tr><td>
2486 <tr><td>
2476 <a href="/help/clone">
2487 <a href="/help/clone">
2477 clone
2488 clone
2478 </a>
2489 </a>
2479 </td><td>
2490 </td><td>
2480 make a copy of an existing repository
2491 make a copy of an existing repository
2481 </td></tr>
2492 </td></tr>
2482 <tr><td>
2493 <tr><td>
2483 <a href="/help/commit">
2494 <a href="/help/commit">
2484 commit
2495 commit
2485 </a>
2496 </a>
2486 </td><td>
2497 </td><td>
2487 commit the specified files or all outstanding changes
2498 commit the specified files or all outstanding changes
2488 </td></tr>
2499 </td></tr>
2489 <tr><td>
2500 <tr><td>
2490 <a href="/help/continue">
2501 <a href="/help/continue">
2491 continue
2502 continue
2492 </a>
2503 </a>
2493 </td><td>
2504 </td><td>
2494 resumes an interrupted operation (EXPERIMENTAL)
2505 resumes an interrupted operation (EXPERIMENTAL)
2495 </td></tr>
2506 </td></tr>
2496 <tr><td>
2507 <tr><td>
2497 <a href="/help/diff">
2508 <a href="/help/diff">
2498 diff
2509 diff
2499 </a>
2510 </a>
2500 </td><td>
2511 </td><td>
2501 diff repository (or selected files)
2512 diff repository (or selected files)
2502 </td></tr>
2513 </td></tr>
2503 <tr><td>
2514 <tr><td>
2504 <a href="/help/export">
2515 <a href="/help/export">
2505 export
2516 export
2506 </a>
2517 </a>
2507 </td><td>
2518 </td><td>
2508 dump the header and diffs for one or more changesets
2519 dump the header and diffs for one or more changesets
2509 </td></tr>
2520 </td></tr>
2510 <tr><td>
2521 <tr><td>
2511 <a href="/help/forget">
2522 <a href="/help/forget">
2512 forget
2523 forget
2513 </a>
2524 </a>
2514 </td><td>
2525 </td><td>
2515 forget the specified files on the next commit
2526 forget the specified files on the next commit
2516 </td></tr>
2527 </td></tr>
2517 <tr><td>
2528 <tr><td>
2518 <a href="/help/init">
2529 <a href="/help/init">
2519 init
2530 init
2520 </a>
2531 </a>
2521 </td><td>
2532 </td><td>
2522 create a new repository in the given directory
2533 create a new repository in the given directory
2523 </td></tr>
2534 </td></tr>
2524 <tr><td>
2535 <tr><td>
2525 <a href="/help/log">
2536 <a href="/help/log">
2526 log
2537 log
2527 </a>
2538 </a>
2528 </td><td>
2539 </td><td>
2529 show revision history of entire repository or files
2540 show revision history of entire repository or files
2530 </td></tr>
2541 </td></tr>
2531 <tr><td>
2542 <tr><td>
2532 <a href="/help/merge">
2543 <a href="/help/merge">
2533 merge
2544 merge
2534 </a>
2545 </a>
2535 </td><td>
2546 </td><td>
2536 merge another revision into working directory
2547 merge another revision into working directory
2537 </td></tr>
2548 </td></tr>
2538 <tr><td>
2549 <tr><td>
2539 <a href="/help/pull">
2550 <a href="/help/pull">
2540 pull
2551 pull
2541 </a>
2552 </a>
2542 </td><td>
2553 </td><td>
2543 pull changes from the specified source
2554 pull changes from the specified source
2544 </td></tr>
2555 </td></tr>
2545 <tr><td>
2556 <tr><td>
2546 <a href="/help/push">
2557 <a href="/help/push">
2547 push
2558 push
2548 </a>
2559 </a>
2549 </td><td>
2560 </td><td>
2550 push changes to the specified destination
2561 push changes to the specified destination
2551 </td></tr>
2562 </td></tr>
2552 <tr><td>
2563 <tr><td>
2553 <a href="/help/remove">
2564 <a href="/help/remove">
2554 remove
2565 remove
2555 </a>
2566 </a>
2556 </td><td>
2567 </td><td>
2557 remove the specified files on the next commit
2568 remove the specified files on the next commit
2558 </td></tr>
2569 </td></tr>
2559 <tr><td>
2570 <tr><td>
2560 <a href="/help/serve">
2571 <a href="/help/serve">
2561 serve
2572 serve
2562 </a>
2573 </a>
2563 </td><td>
2574 </td><td>
2564 start stand-alone webserver
2575 start stand-alone webserver
2565 </td></tr>
2576 </td></tr>
2566 <tr><td>
2577 <tr><td>
2567 <a href="/help/status">
2578 <a href="/help/status">
2568 status
2579 status
2569 </a>
2580 </a>
2570 </td><td>
2581 </td><td>
2571 show changed files in the working directory
2582 show changed files in the working directory
2572 </td></tr>
2583 </td></tr>
2573 <tr><td>
2584 <tr><td>
2574 <a href="/help/summary">
2585 <a href="/help/summary">
2575 summary
2586 summary
2576 </a>
2587 </a>
2577 </td><td>
2588 </td><td>
2578 summarize working directory state
2589 summarize working directory state
2579 </td></tr>
2590 </td></tr>
2580 <tr><td>
2591 <tr><td>
2581 <a href="/help/update">
2592 <a href="/help/update">
2582 update
2593 update
2583 </a>
2594 </a>
2584 </td><td>
2595 </td><td>
2585 update working directory (or switch revisions)
2596 update working directory (or switch revisions)
2586 </td></tr>
2597 </td></tr>
2587
2598
2588
2599
2589
2600
2590 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2601 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2591
2602
2592 <tr><td>
2603 <tr><td>
2593 <a href="/help/addremove">
2604 <a href="/help/addremove">
2594 addremove
2605 addremove
2595 </a>
2606 </a>
2596 </td><td>
2607 </td><td>
2597 add all new files, delete all missing files
2608 add all new files, delete all missing files
2598 </td></tr>
2609 </td></tr>
2599 <tr><td>
2610 <tr><td>
2600 <a href="/help/archive">
2611 <a href="/help/archive">
2601 archive
2612 archive
2602 </a>
2613 </a>
2603 </td><td>
2614 </td><td>
2604 create an unversioned archive of a repository revision
2615 create an unversioned archive of a repository revision
2605 </td></tr>
2616 </td></tr>
2606 <tr><td>
2617 <tr><td>
2607 <a href="/help/backout">
2618 <a href="/help/backout">
2608 backout
2619 backout
2609 </a>
2620 </a>
2610 </td><td>
2621 </td><td>
2611 reverse effect of earlier changeset
2622 reverse effect of earlier changeset
2612 </td></tr>
2623 </td></tr>
2613 <tr><td>
2624 <tr><td>
2614 <a href="/help/bisect">
2625 <a href="/help/bisect">
2615 bisect
2626 bisect
2616 </a>
2627 </a>
2617 </td><td>
2628 </td><td>
2618 subdivision search of changesets
2629 subdivision search of changesets
2619 </td></tr>
2630 </td></tr>
2620 <tr><td>
2631 <tr><td>
2621 <a href="/help/bookmarks">
2632 <a href="/help/bookmarks">
2622 bookmarks
2633 bookmarks
2623 </a>
2634 </a>
2624 </td><td>
2635 </td><td>
2625 create a new bookmark or list existing bookmarks
2636 create a new bookmark or list existing bookmarks
2626 </td></tr>
2637 </td></tr>
2627 <tr><td>
2638 <tr><td>
2628 <a href="/help/branch">
2639 <a href="/help/branch">
2629 branch
2640 branch
2630 </a>
2641 </a>
2631 </td><td>
2642 </td><td>
2632 set or show the current branch name
2643 set or show the current branch name
2633 </td></tr>
2644 </td></tr>
2634 <tr><td>
2645 <tr><td>
2635 <a href="/help/branches">
2646 <a href="/help/branches">
2636 branches
2647 branches
2637 </a>
2648 </a>
2638 </td><td>
2649 </td><td>
2639 list repository named branches
2650 list repository named branches
2640 </td></tr>
2651 </td></tr>
2641 <tr><td>
2652 <tr><td>
2642 <a href="/help/bundle">
2653 <a href="/help/bundle">
2643 bundle
2654 bundle
2644 </a>
2655 </a>
2645 </td><td>
2656 </td><td>
2646 create a bundle file
2657 create a bundle file
2647 </td></tr>
2658 </td></tr>
2648 <tr><td>
2659 <tr><td>
2649 <a href="/help/cat">
2660 <a href="/help/cat">
2650 cat
2661 cat
2651 </a>
2662 </a>
2652 </td><td>
2663 </td><td>
2653 output the current or given revision of files
2664 output the current or given revision of files
2654 </td></tr>
2665 </td></tr>
2655 <tr><td>
2666 <tr><td>
2656 <a href="/help/config">
2667 <a href="/help/config">
2657 config
2668 config
2658 </a>
2669 </a>
2659 </td><td>
2670 </td><td>
2660 show combined config settings from all hgrc files
2671 show combined config settings from all hgrc files
2661 </td></tr>
2672 </td></tr>
2662 <tr><td>
2673 <tr><td>
2663 <a href="/help/copy">
2674 <a href="/help/copy">
2664 copy
2675 copy
2665 </a>
2676 </a>
2666 </td><td>
2677 </td><td>
2667 mark files as copied for the next commit
2678 mark files as copied for the next commit
2668 </td></tr>
2679 </td></tr>
2669 <tr><td>
2680 <tr><td>
2670 <a href="/help/files">
2681 <a href="/help/files">
2671 files
2682 files
2672 </a>
2683 </a>
2673 </td><td>
2684 </td><td>
2674 list tracked files
2685 list tracked files
2675 </td></tr>
2686 </td></tr>
2676 <tr><td>
2687 <tr><td>
2677 <a href="/help/graft">
2688 <a href="/help/graft">
2678 graft
2689 graft
2679 </a>
2690 </a>
2680 </td><td>
2691 </td><td>
2681 copy changes from other branches onto the current branch
2692 copy changes from other branches onto the current branch
2682 </td></tr>
2693 </td></tr>
2683 <tr><td>
2694 <tr><td>
2684 <a href="/help/grep">
2695 <a href="/help/grep">
2685 grep
2696 grep
2686 </a>
2697 </a>
2687 </td><td>
2698 </td><td>
2688 search for a pattern in specified files
2699 search for a pattern in specified files
2689 </td></tr>
2700 </td></tr>
2690 <tr><td>
2701 <tr><td>
2691 <a href="/help/hashelp">
2702 <a href="/help/hashelp">
2692 hashelp
2703 hashelp
2693 </a>
2704 </a>
2694 </td><td>
2705 </td><td>
2695 Extension command's help
2706 Extension command's help
2696 </td></tr>
2707 </td></tr>
2697 <tr><td>
2708 <tr><td>
2698 <a href="/help/heads">
2709 <a href="/help/heads">
2699 heads
2710 heads
2700 </a>
2711 </a>
2701 </td><td>
2712 </td><td>
2702 show branch heads
2713 show branch heads
2703 </td></tr>
2714 </td></tr>
2704 <tr><td>
2715 <tr><td>
2705 <a href="/help/help">
2716 <a href="/help/help">
2706 help
2717 help
2707 </a>
2718 </a>
2708 </td><td>
2719 </td><td>
2709 show help for a given topic or a help overview
2720 show help for a given topic or a help overview
2710 </td></tr>
2721 </td></tr>
2711 <tr><td>
2722 <tr><td>
2712 <a href="/help/hgalias">
2723 <a href="/help/hgalias">
2713 hgalias
2724 hgalias
2714 </a>
2725 </a>
2715 </td><td>
2726 </td><td>
2716 My doc
2727 My doc
2717 </td></tr>
2728 </td></tr>
2718 <tr><td>
2729 <tr><td>
2719 <a href="/help/hgaliasnodoc">
2730 <a href="/help/hgaliasnodoc">
2720 hgaliasnodoc
2731 hgaliasnodoc
2721 </a>
2732 </a>
2722 </td><td>
2733 </td><td>
2723 summarize working directory state
2734 summarize working directory state
2724 </td></tr>
2735 </td></tr>
2725 <tr><td>
2736 <tr><td>
2726 <a href="/help/identify">
2737 <a href="/help/identify">
2727 identify
2738 identify
2728 </a>
2739 </a>
2729 </td><td>
2740 </td><td>
2730 identify the working directory or specified revision
2741 identify the working directory or specified revision
2731 </td></tr>
2742 </td></tr>
2732 <tr><td>
2743 <tr><td>
2733 <a href="/help/import">
2744 <a href="/help/import">
2734 import
2745 import
2735 </a>
2746 </a>
2736 </td><td>
2747 </td><td>
2737 import an ordered set of patches
2748 import an ordered set of patches
2738 </td></tr>
2749 </td></tr>
2739 <tr><td>
2750 <tr><td>
2740 <a href="/help/incoming">
2751 <a href="/help/incoming">
2741 incoming
2752 incoming
2742 </a>
2753 </a>
2743 </td><td>
2754 </td><td>
2744 show new changesets found in source
2755 show new changesets found in source
2745 </td></tr>
2756 </td></tr>
2746 <tr><td>
2757 <tr><td>
2747 <a href="/help/manifest">
2758 <a href="/help/manifest">
2748 manifest
2759 manifest
2749 </a>
2760 </a>
2750 </td><td>
2761 </td><td>
2751 output the current or given revision of the project manifest
2762 output the current or given revision of the project manifest
2752 </td></tr>
2763 </td></tr>
2753 <tr><td>
2764 <tr><td>
2754 <a href="/help/nohelp">
2765 <a href="/help/nohelp">
2755 nohelp
2766 nohelp
2756 </a>
2767 </a>
2757 </td><td>
2768 </td><td>
2758 (no help text available)
2769 (no help text available)
2759 </td></tr>
2770 </td></tr>
2760 <tr><td>
2771 <tr><td>
2761 <a href="/help/outgoing">
2772 <a href="/help/outgoing">
2762 outgoing
2773 outgoing
2763 </a>
2774 </a>
2764 </td><td>
2775 </td><td>
2765 show changesets not found in the destination
2776 show changesets not found in the destination
2766 </td></tr>
2777 </td></tr>
2767 <tr><td>
2778 <tr><td>
2768 <a href="/help/paths">
2779 <a href="/help/paths">
2769 paths
2780 paths
2770 </a>
2781 </a>
2771 </td><td>
2782 </td><td>
2772 show aliases for remote repositories
2783 show aliases for remote repositories
2773 </td></tr>
2784 </td></tr>
2774 <tr><td>
2785 <tr><td>
2775 <a href="/help/phase">
2786 <a href="/help/phase">
2776 phase
2787 phase
2777 </a>
2788 </a>
2778 </td><td>
2789 </td><td>
2779 set or show the current phase name
2790 set or show the current phase name
2780 </td></tr>
2791 </td></tr>
2781 <tr><td>
2792 <tr><td>
2782 <a href="/help/purge">
2793 <a href="/help/purge">
2783 purge
2794 purge
2784 </a>
2795 </a>
2785 </td><td>
2796 </td><td>
2786 removes files not tracked by Mercurial
2797 removes files not tracked by Mercurial
2787 </td></tr>
2798 </td></tr>
2788 <tr><td>
2799 <tr><td>
2789 <a href="/help/recover">
2800 <a href="/help/recover">
2790 recover
2801 recover
2791 </a>
2802 </a>
2792 </td><td>
2803 </td><td>
2793 roll back an interrupted transaction
2804 roll back an interrupted transaction
2794 </td></tr>
2805 </td></tr>
2795 <tr><td>
2806 <tr><td>
2796 <a href="/help/rename">
2807 <a href="/help/rename">
2797 rename
2808 rename
2798 </a>
2809 </a>
2799 </td><td>
2810 </td><td>
2800 rename files; equivalent of copy + remove
2811 rename files; equivalent of copy + remove
2801 </td></tr>
2812 </td></tr>
2802 <tr><td>
2813 <tr><td>
2803 <a href="/help/resolve">
2814 <a href="/help/resolve">
2804 resolve
2815 resolve
2805 </a>
2816 </a>
2806 </td><td>
2817 </td><td>
2807 redo merges or set/view the merge status of files
2818 redo merges or set/view the merge status of files
2808 </td></tr>
2819 </td></tr>
2809 <tr><td>
2820 <tr><td>
2810 <a href="/help/revert">
2821 <a href="/help/revert">
2811 revert
2822 revert
2812 </a>
2823 </a>
2813 </td><td>
2824 </td><td>
2814 restore files to their checkout state
2825 restore files to their checkout state
2815 </td></tr>
2826 </td></tr>
2816 <tr><td>
2827 <tr><td>
2817 <a href="/help/root">
2828 <a href="/help/root">
2818 root
2829 root
2819 </a>
2830 </a>
2820 </td><td>
2831 </td><td>
2821 print the root (top) of the current working directory
2832 print the root (top) of the current working directory
2822 </td></tr>
2833 </td></tr>
2823 <tr><td>
2834 <tr><td>
2824 <a href="/help/shellalias">
2835 <a href="/help/shellalias">
2825 shellalias
2836 shellalias
2826 </a>
2837 </a>
2827 </td><td>
2838 </td><td>
2828 (no help text available)
2839 (no help text available)
2829 </td></tr>
2840 </td></tr>
2830 <tr><td>
2841 <tr><td>
2831 <a href="/help/shelve">
2842 <a href="/help/shelve">
2832 shelve
2843 shelve
2833 </a>
2844 </a>
2834 </td><td>
2845 </td><td>
2835 save and set aside changes from the working directory
2846 save and set aside changes from the working directory
2836 </td></tr>
2847 </td></tr>
2837 <tr><td>
2848 <tr><td>
2838 <a href="/help/tag">
2849 <a href="/help/tag">
2839 tag
2850 tag
2840 </a>
2851 </a>
2841 </td><td>
2852 </td><td>
2842 add one or more tags for the current or given revision
2853 add one or more tags for the current or given revision
2843 </td></tr>
2854 </td></tr>
2844 <tr><td>
2855 <tr><td>
2845 <a href="/help/tags">
2856 <a href="/help/tags">
2846 tags
2857 tags
2847 </a>
2858 </a>
2848 </td><td>
2859 </td><td>
2849 list repository tags
2860 list repository tags
2850 </td></tr>
2861 </td></tr>
2851 <tr><td>
2862 <tr><td>
2852 <a href="/help/unbundle">
2863 <a href="/help/unbundle">
2853 unbundle
2864 unbundle
2854 </a>
2865 </a>
2855 </td><td>
2866 </td><td>
2856 apply one or more bundle files
2867 apply one or more bundle files
2857 </td></tr>
2868 </td></tr>
2858 <tr><td>
2869 <tr><td>
2859 <a href="/help/unshelve">
2870 <a href="/help/unshelve">
2860 unshelve
2871 unshelve
2861 </a>
2872 </a>
2862 </td><td>
2873 </td><td>
2863 restore a shelved change to the working directory
2874 restore a shelved change to the working directory
2864 </td></tr>
2875 </td></tr>
2865 <tr><td>
2876 <tr><td>
2866 <a href="/help/verify">
2877 <a href="/help/verify">
2867 verify
2878 verify
2868 </a>
2879 </a>
2869 </td><td>
2880 </td><td>
2870 verify the integrity of the repository
2881 verify the integrity of the repository
2871 </td></tr>
2882 </td></tr>
2872 <tr><td>
2883 <tr><td>
2873 <a href="/help/version">
2884 <a href="/help/version">
2874 version
2885 version
2875 </a>
2886 </a>
2876 </td><td>
2887 </td><td>
2877 output version and copyright information
2888 output version and copyright information
2878 </td></tr>
2889 </td></tr>
2879
2890
2880
2891
2881 </table>
2892 </table>
2882 </div>
2893 </div>
2883 </div>
2894 </div>
2884
2895
2885
2896
2886
2897
2887 </body>
2898 </body>
2888 </html>
2899 </html>
2889
2900
2890
2901
2891 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2902 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2892 200 Script output follows
2903 200 Script output follows
2893
2904
2894 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2905 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2895 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2906 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2896 <head>
2907 <head>
2897 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2908 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2898 <meta name="robots" content="index, nofollow" />
2909 <meta name="robots" content="index, nofollow" />
2899 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2910 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2900 <script type="text/javascript" src="/static/mercurial.js"></script>
2911 <script type="text/javascript" src="/static/mercurial.js"></script>
2901
2912
2902 <title>Help: add</title>
2913 <title>Help: add</title>
2903 </head>
2914 </head>
2904 <body>
2915 <body>
2905
2916
2906 <div class="container">
2917 <div class="container">
2907 <div class="menu">
2918 <div class="menu">
2908 <div class="logo">
2919 <div class="logo">
2909 <a href="https://mercurial-scm.org/">
2920 <a href="https://mercurial-scm.org/">
2910 <img src="/static/hglogo.png" alt="mercurial" /></a>
2921 <img src="/static/hglogo.png" alt="mercurial" /></a>
2911 </div>
2922 </div>
2912 <ul>
2923 <ul>
2913 <li><a href="/shortlog">log</a></li>
2924 <li><a href="/shortlog">log</a></li>
2914 <li><a href="/graph">graph</a></li>
2925 <li><a href="/graph">graph</a></li>
2915 <li><a href="/tags">tags</a></li>
2926 <li><a href="/tags">tags</a></li>
2916 <li><a href="/bookmarks">bookmarks</a></li>
2927 <li><a href="/bookmarks">bookmarks</a></li>
2917 <li><a href="/branches">branches</a></li>
2928 <li><a href="/branches">branches</a></li>
2918 </ul>
2929 </ul>
2919 <ul>
2930 <ul>
2920 <li class="active"><a href="/help">help</a></li>
2931 <li class="active"><a href="/help">help</a></li>
2921 </ul>
2932 </ul>
2922 </div>
2933 </div>
2923
2934
2924 <div class="main">
2935 <div class="main">
2925 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2936 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2926 <h3>Help: add</h3>
2937 <h3>Help: add</h3>
2927
2938
2928 <form class="search" action="/log">
2939 <form class="search" action="/log">
2929
2940
2930 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2941 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2931 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2942 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2932 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2943 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2933 </form>
2944 </form>
2934 <div id="doc">
2945 <div id="doc">
2935 <p>
2946 <p>
2936 hg add [OPTION]... [FILE]...
2947 hg add [OPTION]... [FILE]...
2937 </p>
2948 </p>
2938 <p>
2949 <p>
2939 add the specified files on the next commit
2950 add the specified files on the next commit
2940 </p>
2951 </p>
2941 <p>
2952 <p>
2942 Schedule files to be version controlled and added to the
2953 Schedule files to be version controlled and added to the
2943 repository.
2954 repository.
2944 </p>
2955 </p>
2945 <p>
2956 <p>
2946 The files will be added to the repository at the next commit. To
2957 The files will be added to the repository at the next commit. To
2947 undo an add before that, see 'hg forget'.
2958 undo an add before that, see 'hg forget'.
2948 </p>
2959 </p>
2949 <p>
2960 <p>
2950 If no names are given, add all files to the repository (except
2961 If no names are given, add all files to the repository (except
2951 files matching &quot;.hgignore&quot;).
2962 files matching &quot;.hgignore&quot;).
2952 </p>
2963 </p>
2953 <p>
2964 <p>
2954 Examples:
2965 Examples:
2955 </p>
2966 </p>
2956 <ul>
2967 <ul>
2957 <li> New (unknown) files are added automatically by 'hg add':
2968 <li> New (unknown) files are added automatically by 'hg add':
2958 <pre>
2969 <pre>
2959 \$ ls (re)
2970 \$ ls (re)
2960 foo.c
2971 foo.c
2961 \$ hg status (re)
2972 \$ hg status (re)
2962 ? foo.c
2973 ? foo.c
2963 \$ hg add (re)
2974 \$ hg add (re)
2964 adding foo.c
2975 adding foo.c
2965 \$ hg status (re)
2976 \$ hg status (re)
2966 A foo.c
2977 A foo.c
2967 </pre>
2978 </pre>
2968 <li> Specific files to be added can be specified:
2979 <li> Specific files to be added can be specified:
2969 <pre>
2980 <pre>
2970 \$ ls (re)
2981 \$ ls (re)
2971 bar.c foo.c
2982 bar.c foo.c
2972 \$ hg status (re)
2983 \$ hg status (re)
2973 ? bar.c
2984 ? bar.c
2974 ? foo.c
2985 ? foo.c
2975 \$ hg add bar.c (re)
2986 \$ hg add bar.c (re)
2976 \$ hg status (re)
2987 \$ hg status (re)
2977 A bar.c
2988 A bar.c
2978 ? foo.c
2989 ? foo.c
2979 </pre>
2990 </pre>
2980 </ul>
2991 </ul>
2981 <p>
2992 <p>
2982 Returns 0 if all files are successfully added.
2993 Returns 0 if all files are successfully added.
2983 </p>
2994 </p>
2984 <p>
2995 <p>
2985 options ([+] can be repeated):
2996 options ([+] can be repeated):
2986 </p>
2997 </p>
2987 <table>
2998 <table>
2988 <tr><td>-I</td>
2999 <tr><td>-I</td>
2989 <td>--include PATTERN [+]</td>
3000 <td>--include PATTERN [+]</td>
2990 <td>include names matching the given patterns</td></tr>
3001 <td>include names matching the given patterns</td></tr>
2991 <tr><td>-X</td>
3002 <tr><td>-X</td>
2992 <td>--exclude PATTERN [+]</td>
3003 <td>--exclude PATTERN [+]</td>
2993 <td>exclude names matching the given patterns</td></tr>
3004 <td>exclude names matching the given patterns</td></tr>
2994 <tr><td>-S</td>
3005 <tr><td>-S</td>
2995 <td>--subrepos</td>
3006 <td>--subrepos</td>
2996 <td>recurse into subrepositories</td></tr>
3007 <td>recurse into subrepositories</td></tr>
2997 <tr><td>-n</td>
3008 <tr><td>-n</td>
2998 <td>--dry-run</td>
3009 <td>--dry-run</td>
2999 <td>do not perform actions, just print output</td></tr>
3010 <td>do not perform actions, just print output</td></tr>
3000 </table>
3011 </table>
3001 <p>
3012 <p>
3002 global options ([+] can be repeated):
3013 global options ([+] can be repeated):
3003 </p>
3014 </p>
3004 <table>
3015 <table>
3005 <tr><td>-R</td>
3016 <tr><td>-R</td>
3006 <td>--repository REPO</td>
3017 <td>--repository REPO</td>
3007 <td>repository root directory or name of overlay bundle file</td></tr>
3018 <td>repository root directory or name of overlay bundle file</td></tr>
3008 <tr><td></td>
3019 <tr><td></td>
3009 <td>--cwd DIR</td>
3020 <td>--cwd DIR</td>
3010 <td>change working directory</td></tr>
3021 <td>change working directory</td></tr>
3011 <tr><td>-y</td>
3022 <tr><td>-y</td>
3012 <td>--noninteractive</td>
3023 <td>--noninteractive</td>
3013 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
3024 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
3014 <tr><td>-q</td>
3025 <tr><td>-q</td>
3015 <td>--quiet</td>
3026 <td>--quiet</td>
3016 <td>suppress output</td></tr>
3027 <td>suppress output</td></tr>
3017 <tr><td>-v</td>
3028 <tr><td>-v</td>
3018 <td>--verbose</td>
3029 <td>--verbose</td>
3019 <td>enable additional output</td></tr>
3030 <td>enable additional output</td></tr>
3020 <tr><td></td>
3031 <tr><td></td>
3021 <td>--color TYPE</td>
3032 <td>--color TYPE</td>
3022 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
3033 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
3023 <tr><td></td>
3034 <tr><td></td>
3024 <td>--config CONFIG [+]</td>
3035 <td>--config CONFIG [+]</td>
3025 <td>set/override config option (use 'section.name=value')</td></tr>
3036 <td>set/override config option (use 'section.name=value')</td></tr>
3026 <tr><td></td>
3037 <tr><td></td>
3027 <td>--debug</td>
3038 <td>--debug</td>
3028 <td>enable debugging output</td></tr>
3039 <td>enable debugging output</td></tr>
3029 <tr><td></td>
3040 <tr><td></td>
3030 <td>--debugger</td>
3041 <td>--debugger</td>
3031 <td>start debugger</td></tr>
3042 <td>start debugger</td></tr>
3032 <tr><td></td>
3043 <tr><td></td>
3033 <td>--encoding ENCODE</td>
3044 <td>--encoding ENCODE</td>
3034 <td>set the charset encoding (default: ascii)</td></tr>
3045 <td>set the charset encoding (default: ascii)</td></tr>
3035 <tr><td></td>
3046 <tr><td></td>
3036 <td>--encodingmode MODE</td>
3047 <td>--encodingmode MODE</td>
3037 <td>set the charset encoding mode (default: strict)</td></tr>
3048 <td>set the charset encoding mode (default: strict)</td></tr>
3038 <tr><td></td>
3049 <tr><td></td>
3039 <td>--traceback</td>
3050 <td>--traceback</td>
3040 <td>always print a traceback on exception</td></tr>
3051 <td>always print a traceback on exception</td></tr>
3041 <tr><td></td>
3052 <tr><td></td>
3042 <td>--time</td>
3053 <td>--time</td>
3043 <td>time how long the command takes</td></tr>
3054 <td>time how long the command takes</td></tr>
3044 <tr><td></td>
3055 <tr><td></td>
3045 <td>--profile</td>
3056 <td>--profile</td>
3046 <td>print command execution profile</td></tr>
3057 <td>print command execution profile</td></tr>
3047 <tr><td></td>
3058 <tr><td></td>
3048 <td>--version</td>
3059 <td>--version</td>
3049 <td>output version information and exit</td></tr>
3060 <td>output version information and exit</td></tr>
3050 <tr><td>-h</td>
3061 <tr><td>-h</td>
3051 <td>--help</td>
3062 <td>--help</td>
3052 <td>display help and exit</td></tr>
3063 <td>display help and exit</td></tr>
3053 <tr><td></td>
3064 <tr><td></td>
3054 <td>--hidden</td>
3065 <td>--hidden</td>
3055 <td>consider hidden changesets</td></tr>
3066 <td>consider hidden changesets</td></tr>
3056 <tr><td></td>
3067 <tr><td></td>
3057 <td>--pager TYPE</td>
3068 <td>--pager TYPE</td>
3058 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3069 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3059 </table>
3070 </table>
3060
3071
3061 </div>
3072 </div>
3062 </div>
3073 </div>
3063 </div>
3074 </div>
3064
3075
3065
3076
3066
3077
3067 </body>
3078 </body>
3068 </html>
3079 </html>
3069
3080
3070
3081
3071 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
3082 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
3072 200 Script output follows
3083 200 Script output follows
3073
3084
3074 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3085 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3075 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3086 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3076 <head>
3087 <head>
3077 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3088 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3078 <meta name="robots" content="index, nofollow" />
3089 <meta name="robots" content="index, nofollow" />
3079 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3090 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3080 <script type="text/javascript" src="/static/mercurial.js"></script>
3091 <script type="text/javascript" src="/static/mercurial.js"></script>
3081
3092
3082 <title>Help: remove</title>
3093 <title>Help: remove</title>
3083 </head>
3094 </head>
3084 <body>
3095 <body>
3085
3096
3086 <div class="container">
3097 <div class="container">
3087 <div class="menu">
3098 <div class="menu">
3088 <div class="logo">
3099 <div class="logo">
3089 <a href="https://mercurial-scm.org/">
3100 <a href="https://mercurial-scm.org/">
3090 <img src="/static/hglogo.png" alt="mercurial" /></a>
3101 <img src="/static/hglogo.png" alt="mercurial" /></a>
3091 </div>
3102 </div>
3092 <ul>
3103 <ul>
3093 <li><a href="/shortlog">log</a></li>
3104 <li><a href="/shortlog">log</a></li>
3094 <li><a href="/graph">graph</a></li>
3105 <li><a href="/graph">graph</a></li>
3095 <li><a href="/tags">tags</a></li>
3106 <li><a href="/tags">tags</a></li>
3096 <li><a href="/bookmarks">bookmarks</a></li>
3107 <li><a href="/bookmarks">bookmarks</a></li>
3097 <li><a href="/branches">branches</a></li>
3108 <li><a href="/branches">branches</a></li>
3098 </ul>
3109 </ul>
3099 <ul>
3110 <ul>
3100 <li class="active"><a href="/help">help</a></li>
3111 <li class="active"><a href="/help">help</a></li>
3101 </ul>
3112 </ul>
3102 </div>
3113 </div>
3103
3114
3104 <div class="main">
3115 <div class="main">
3105 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3116 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3106 <h3>Help: remove</h3>
3117 <h3>Help: remove</h3>
3107
3118
3108 <form class="search" action="/log">
3119 <form class="search" action="/log">
3109
3120
3110 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3121 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3111 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3122 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3112 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3123 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3113 </form>
3124 </form>
3114 <div id="doc">
3125 <div id="doc">
3115 <p>
3126 <p>
3116 hg remove [OPTION]... FILE...
3127 hg remove [OPTION]... FILE...
3117 </p>
3128 </p>
3118 <p>
3129 <p>
3119 aliases: rm
3130 aliases: rm
3120 </p>
3131 </p>
3121 <p>
3132 <p>
3122 remove the specified files on the next commit
3133 remove the specified files on the next commit
3123 </p>
3134 </p>
3124 <p>
3135 <p>
3125 Schedule the indicated files for removal from the current branch.
3136 Schedule the indicated files for removal from the current branch.
3126 </p>
3137 </p>
3127 <p>
3138 <p>
3128 This command schedules the files to be removed at the next commit.
3139 This command schedules the files to be removed at the next commit.
3129 To undo a remove before that, see 'hg revert'. To undo added
3140 To undo a remove before that, see 'hg revert'. To undo added
3130 files, see 'hg forget'.
3141 files, see 'hg forget'.
3131 </p>
3142 </p>
3132 <p>
3143 <p>
3133 -A/--after can be used to remove only files that have already
3144 -A/--after can be used to remove only files that have already
3134 been deleted, -f/--force can be used to force deletion, and -Af
3145 been deleted, -f/--force can be used to force deletion, and -Af
3135 can be used to remove files from the next revision without
3146 can be used to remove files from the next revision without
3136 deleting them from the working directory.
3147 deleting them from the working directory.
3137 </p>
3148 </p>
3138 <p>
3149 <p>
3139 The following table details the behavior of remove for different
3150 The following table details the behavior of remove for different
3140 file states (columns) and option combinations (rows). The file
3151 file states (columns) and option combinations (rows). The file
3141 states are Added [A], Clean [C], Modified [M] and Missing [!]
3152 states are Added [A], Clean [C], Modified [M] and Missing [!]
3142 (as reported by 'hg status'). The actions are Warn, Remove
3153 (as reported by 'hg status'). The actions are Warn, Remove
3143 (from branch) and Delete (from disk):
3154 (from branch) and Delete (from disk):
3144 </p>
3155 </p>
3145 <table>
3156 <table>
3146 <tr><td>opt/state</td>
3157 <tr><td>opt/state</td>
3147 <td>A</td>
3158 <td>A</td>
3148 <td>C</td>
3159 <td>C</td>
3149 <td>M</td>
3160 <td>M</td>
3150 <td>!</td></tr>
3161 <td>!</td></tr>
3151 <tr><td>none</td>
3162 <tr><td>none</td>
3152 <td>W</td>
3163 <td>W</td>
3153 <td>RD</td>
3164 <td>RD</td>
3154 <td>W</td>
3165 <td>W</td>
3155 <td>R</td></tr>
3166 <td>R</td></tr>
3156 <tr><td>-f</td>
3167 <tr><td>-f</td>
3157 <td>R</td>
3168 <td>R</td>
3158 <td>RD</td>
3169 <td>RD</td>
3159 <td>RD</td>
3170 <td>RD</td>
3160 <td>R</td></tr>
3171 <td>R</td></tr>
3161 <tr><td>-A</td>
3172 <tr><td>-A</td>
3162 <td>W</td>
3173 <td>W</td>
3163 <td>W</td>
3174 <td>W</td>
3164 <td>W</td>
3175 <td>W</td>
3165 <td>R</td></tr>
3176 <td>R</td></tr>
3166 <tr><td>-Af</td>
3177 <tr><td>-Af</td>
3167 <td>R</td>
3178 <td>R</td>
3168 <td>R</td>
3179 <td>R</td>
3169 <td>R</td>
3180 <td>R</td>
3170 <td>R</td></tr>
3181 <td>R</td></tr>
3171 </table>
3182 </table>
3172 <p>
3183 <p>
3173 <b>Note:</b>
3184 <b>Note:</b>
3174 </p>
3185 </p>
3175 <p>
3186 <p>
3176 'hg remove' never deletes files in Added [A] state from the
3187 'hg remove' never deletes files in Added [A] state from the
3177 working directory, not even if &quot;--force&quot; is specified.
3188 working directory, not even if &quot;--force&quot; is specified.
3178 </p>
3189 </p>
3179 <p>
3190 <p>
3180 Returns 0 on success, 1 if any warnings encountered.
3191 Returns 0 on success, 1 if any warnings encountered.
3181 </p>
3192 </p>
3182 <p>
3193 <p>
3183 options ([+] can be repeated):
3194 options ([+] can be repeated):
3184 </p>
3195 </p>
3185 <table>
3196 <table>
3186 <tr><td>-A</td>
3197 <tr><td>-A</td>
3187 <td>--after</td>
3198 <td>--after</td>
3188 <td>record delete for missing files</td></tr>
3199 <td>record delete for missing files</td></tr>
3189 <tr><td>-f</td>
3200 <tr><td>-f</td>
3190 <td>--force</td>
3201 <td>--force</td>
3191 <td>forget added files, delete modified files</td></tr>
3202 <td>forget added files, delete modified files</td></tr>
3192 <tr><td>-S</td>
3203 <tr><td>-S</td>
3193 <td>--subrepos</td>
3204 <td>--subrepos</td>
3194 <td>recurse into subrepositories</td></tr>
3205 <td>recurse into subrepositories</td></tr>
3195 <tr><td>-I</td>
3206 <tr><td>-I</td>
3196 <td>--include PATTERN [+]</td>
3207 <td>--include PATTERN [+]</td>
3197 <td>include names matching the given patterns</td></tr>
3208 <td>include names matching the given patterns</td></tr>
3198 <tr><td>-X</td>
3209 <tr><td>-X</td>
3199 <td>--exclude PATTERN [+]</td>
3210 <td>--exclude PATTERN [+]</td>
3200 <td>exclude names matching the given patterns</td></tr>
3211 <td>exclude names matching the given patterns</td></tr>
3201 <tr><td>-n</td>
3212 <tr><td>-n</td>
3202 <td>--dry-run</td>
3213 <td>--dry-run</td>
3203 <td>do not perform actions, just print output</td></tr>
3214 <td>do not perform actions, just print output</td></tr>
3204 </table>
3215 </table>
3205 <p>
3216 <p>
3206 global options ([+] can be repeated):
3217 global options ([+] can be repeated):
3207 </p>
3218 </p>
3208 <table>
3219 <table>
3209 <tr><td>-R</td>
3220 <tr><td>-R</td>
3210 <td>--repository REPO</td>
3221 <td>--repository REPO</td>
3211 <td>repository root directory or name of overlay bundle file</td></tr>
3222 <td>repository root directory or name of overlay bundle file</td></tr>
3212 <tr><td></td>
3223 <tr><td></td>
3213 <td>--cwd DIR</td>
3224 <td>--cwd DIR</td>
3214 <td>change working directory</td></tr>
3225 <td>change working directory</td></tr>
3215 <tr><td>-y</td>
3226 <tr><td>-y</td>
3216 <td>--noninteractive</td>
3227 <td>--noninteractive</td>
3217 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
3228 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
3218 <tr><td>-q</td>
3229 <tr><td>-q</td>
3219 <td>--quiet</td>
3230 <td>--quiet</td>
3220 <td>suppress output</td></tr>
3231 <td>suppress output</td></tr>
3221 <tr><td>-v</td>
3232 <tr><td>-v</td>
3222 <td>--verbose</td>
3233 <td>--verbose</td>
3223 <td>enable additional output</td></tr>
3234 <td>enable additional output</td></tr>
3224 <tr><td></td>
3235 <tr><td></td>
3225 <td>--color TYPE</td>
3236 <td>--color TYPE</td>
3226 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
3237 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
3227 <tr><td></td>
3238 <tr><td></td>
3228 <td>--config CONFIG [+]</td>
3239 <td>--config CONFIG [+]</td>
3229 <td>set/override config option (use 'section.name=value')</td></tr>
3240 <td>set/override config option (use 'section.name=value')</td></tr>
3230 <tr><td></td>
3241 <tr><td></td>
3231 <td>--debug</td>
3242 <td>--debug</td>
3232 <td>enable debugging output</td></tr>
3243 <td>enable debugging output</td></tr>
3233 <tr><td></td>
3244 <tr><td></td>
3234 <td>--debugger</td>
3245 <td>--debugger</td>
3235 <td>start debugger</td></tr>
3246 <td>start debugger</td></tr>
3236 <tr><td></td>
3247 <tr><td></td>
3237 <td>--encoding ENCODE</td>
3248 <td>--encoding ENCODE</td>
3238 <td>set the charset encoding (default: ascii)</td></tr>
3249 <td>set the charset encoding (default: ascii)</td></tr>
3239 <tr><td></td>
3250 <tr><td></td>
3240 <td>--encodingmode MODE</td>
3251 <td>--encodingmode MODE</td>
3241 <td>set the charset encoding mode (default: strict)</td></tr>
3252 <td>set the charset encoding mode (default: strict)</td></tr>
3242 <tr><td></td>
3253 <tr><td></td>
3243 <td>--traceback</td>
3254 <td>--traceback</td>
3244 <td>always print a traceback on exception</td></tr>
3255 <td>always print a traceback on exception</td></tr>
3245 <tr><td></td>
3256 <tr><td></td>
3246 <td>--time</td>
3257 <td>--time</td>
3247 <td>time how long the command takes</td></tr>
3258 <td>time how long the command takes</td></tr>
3248 <tr><td></td>
3259 <tr><td></td>
3249 <td>--profile</td>
3260 <td>--profile</td>
3250 <td>print command execution profile</td></tr>
3261 <td>print command execution profile</td></tr>
3251 <tr><td></td>
3262 <tr><td></td>
3252 <td>--version</td>
3263 <td>--version</td>
3253 <td>output version information and exit</td></tr>
3264 <td>output version information and exit</td></tr>
3254 <tr><td>-h</td>
3265 <tr><td>-h</td>
3255 <td>--help</td>
3266 <td>--help</td>
3256 <td>display help and exit</td></tr>
3267 <td>display help and exit</td></tr>
3257 <tr><td></td>
3268 <tr><td></td>
3258 <td>--hidden</td>
3269 <td>--hidden</td>
3259 <td>consider hidden changesets</td></tr>
3270 <td>consider hidden changesets</td></tr>
3260 <tr><td></td>
3271 <tr><td></td>
3261 <td>--pager TYPE</td>
3272 <td>--pager TYPE</td>
3262 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3273 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3263 </table>
3274 </table>
3264
3275
3265 </div>
3276 </div>
3266 </div>
3277 </div>
3267 </div>
3278 </div>
3268
3279
3269
3280
3270
3281
3271 </body>
3282 </body>
3272 </html>
3283 </html>
3273
3284
3274
3285
3275 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
3286 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
3276 200 Script output follows
3287 200 Script output follows
3277
3288
3278 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3289 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3279 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3290 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3280 <head>
3291 <head>
3281 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3292 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3282 <meta name="robots" content="index, nofollow" />
3293 <meta name="robots" content="index, nofollow" />
3283 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3294 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3284 <script type="text/javascript" src="/static/mercurial.js"></script>
3295 <script type="text/javascript" src="/static/mercurial.js"></script>
3285
3296
3286 <title>Help: dates</title>
3297 <title>Help: dates</title>
3287 </head>
3298 </head>
3288 <body>
3299 <body>
3289
3300
3290 <div class="container">
3301 <div class="container">
3291 <div class="menu">
3302 <div class="menu">
3292 <div class="logo">
3303 <div class="logo">
3293 <a href="https://mercurial-scm.org/">
3304 <a href="https://mercurial-scm.org/">
3294 <img src="/static/hglogo.png" alt="mercurial" /></a>
3305 <img src="/static/hglogo.png" alt="mercurial" /></a>
3295 </div>
3306 </div>
3296 <ul>
3307 <ul>
3297 <li><a href="/shortlog">log</a></li>
3308 <li><a href="/shortlog">log</a></li>
3298 <li><a href="/graph">graph</a></li>
3309 <li><a href="/graph">graph</a></li>
3299 <li><a href="/tags">tags</a></li>
3310 <li><a href="/tags">tags</a></li>
3300 <li><a href="/bookmarks">bookmarks</a></li>
3311 <li><a href="/bookmarks">bookmarks</a></li>
3301 <li><a href="/branches">branches</a></li>
3312 <li><a href="/branches">branches</a></li>
3302 </ul>
3313 </ul>
3303 <ul>
3314 <ul>
3304 <li class="active"><a href="/help">help</a></li>
3315 <li class="active"><a href="/help">help</a></li>
3305 </ul>
3316 </ul>
3306 </div>
3317 </div>
3307
3318
3308 <div class="main">
3319 <div class="main">
3309 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3320 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3310 <h3>Help: dates</h3>
3321 <h3>Help: dates</h3>
3311
3322
3312 <form class="search" action="/log">
3323 <form class="search" action="/log">
3313
3324
3314 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3325 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3315 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3326 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3316 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3327 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3317 </form>
3328 </form>
3318 <div id="doc">
3329 <div id="doc">
3319 <h1>Date Formats</h1>
3330 <h1>Date Formats</h1>
3320 <p>
3331 <p>
3321 Some commands allow the user to specify a date, e.g.:
3332 Some commands allow the user to specify a date, e.g.:
3322 </p>
3333 </p>
3323 <ul>
3334 <ul>
3324 <li> backout, commit, import, tag: Specify the commit date.
3335 <li> backout, commit, import, tag: Specify the commit date.
3325 <li> log, revert, update: Select revision(s) by date.
3336 <li> log, revert, update: Select revision(s) by date.
3326 </ul>
3337 </ul>
3327 <p>
3338 <p>
3328 Many date formats are valid. Here are some examples:
3339 Many date formats are valid. Here are some examples:
3329 </p>
3340 </p>
3330 <ul>
3341 <ul>
3331 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3342 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3332 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3343 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3333 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3344 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3334 <li> &quot;Dec 6&quot; (midnight)
3345 <li> &quot;Dec 6&quot; (midnight)
3335 <li> &quot;13:18&quot; (today assumed)
3346 <li> &quot;13:18&quot; (today assumed)
3336 <li> &quot;3:39&quot; (3:39AM assumed)
3347 <li> &quot;3:39&quot; (3:39AM assumed)
3337 <li> &quot;3:39pm&quot; (15:39)
3348 <li> &quot;3:39pm&quot; (15:39)
3338 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3349 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3339 <li> &quot;2006-12-6 13:18&quot;
3350 <li> &quot;2006-12-6 13:18&quot;
3340 <li> &quot;2006-12-6&quot;
3351 <li> &quot;2006-12-6&quot;
3341 <li> &quot;12-6&quot;
3352 <li> &quot;12-6&quot;
3342 <li> &quot;12/6&quot;
3353 <li> &quot;12/6&quot;
3343 <li> &quot;12/6/6&quot; (Dec 6 2006)
3354 <li> &quot;12/6/6&quot; (Dec 6 2006)
3344 <li> &quot;today&quot; (midnight)
3355 <li> &quot;today&quot; (midnight)
3345 <li> &quot;yesterday&quot; (midnight)
3356 <li> &quot;yesterday&quot; (midnight)
3346 <li> &quot;now&quot; - right now
3357 <li> &quot;now&quot; - right now
3347 </ul>
3358 </ul>
3348 <p>
3359 <p>
3349 Lastly, there is Mercurial's internal format:
3360 Lastly, there is Mercurial's internal format:
3350 </p>
3361 </p>
3351 <ul>
3362 <ul>
3352 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3363 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3353 </ul>
3364 </ul>
3354 <p>
3365 <p>
3355 This is the internal representation format for dates. The first number
3366 This is the internal representation format for dates. The first number
3356 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3367 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3357 second is the offset of the local timezone, in seconds west of UTC
3368 second is the offset of the local timezone, in seconds west of UTC
3358 (negative if the timezone is east of UTC).
3369 (negative if the timezone is east of UTC).
3359 </p>
3370 </p>
3360 <p>
3371 <p>
3361 The log command also accepts date ranges:
3372 The log command also accepts date ranges:
3362 </p>
3373 </p>
3363 <ul>
3374 <ul>
3364 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3375 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3365 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3376 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3366 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3377 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3367 <li> &quot;-DAYS&quot; - within a given number of days from today
3378 <li> &quot;-DAYS&quot; - within a given number of days from today
3368 </ul>
3379 </ul>
3369
3380
3370 </div>
3381 </div>
3371 </div>
3382 </div>
3372 </div>
3383 </div>
3373
3384
3374
3385
3375
3386
3376 </body>
3387 </body>
3377 </html>
3388 </html>
3378
3389
3379
3390
3380 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3391 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3381 200 Script output follows
3392 200 Script output follows
3382
3393
3383 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3394 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3384 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3395 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3385 <head>
3396 <head>
3386 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3397 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3387 <meta name="robots" content="index, nofollow" />
3398 <meta name="robots" content="index, nofollow" />
3388 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3399 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3389 <script type="text/javascript" src="/static/mercurial.js"></script>
3400 <script type="text/javascript" src="/static/mercurial.js"></script>
3390
3401
3391 <title>Help: pager</title>
3402 <title>Help: pager</title>
3392 </head>
3403 </head>
3393 <body>
3404 <body>
3394
3405
3395 <div class="container">
3406 <div class="container">
3396 <div class="menu">
3407 <div class="menu">
3397 <div class="logo">
3408 <div class="logo">
3398 <a href="https://mercurial-scm.org/">
3409 <a href="https://mercurial-scm.org/">
3399 <img src="/static/hglogo.png" alt="mercurial" /></a>
3410 <img src="/static/hglogo.png" alt="mercurial" /></a>
3400 </div>
3411 </div>
3401 <ul>
3412 <ul>
3402 <li><a href="/shortlog">log</a></li>
3413 <li><a href="/shortlog">log</a></li>
3403 <li><a href="/graph">graph</a></li>
3414 <li><a href="/graph">graph</a></li>
3404 <li><a href="/tags">tags</a></li>
3415 <li><a href="/tags">tags</a></li>
3405 <li><a href="/bookmarks">bookmarks</a></li>
3416 <li><a href="/bookmarks">bookmarks</a></li>
3406 <li><a href="/branches">branches</a></li>
3417 <li><a href="/branches">branches</a></li>
3407 </ul>
3418 </ul>
3408 <ul>
3419 <ul>
3409 <li class="active"><a href="/help">help</a></li>
3420 <li class="active"><a href="/help">help</a></li>
3410 </ul>
3421 </ul>
3411 </div>
3422 </div>
3412
3423
3413 <div class="main">
3424 <div class="main">
3414 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3425 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3415 <h3>Help: pager</h3>
3426 <h3>Help: pager</h3>
3416
3427
3417 <form class="search" action="/log">
3428 <form class="search" action="/log">
3418
3429
3419 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3430 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3420 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3431 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3421 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3432 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3422 </form>
3433 </form>
3423 <div id="doc">
3434 <div id="doc">
3424 <h1>Pager Support</h1>
3435 <h1>Pager Support</h1>
3425 <p>
3436 <p>
3426 Some Mercurial commands can produce a lot of output, and Mercurial will
3437 Some Mercurial commands can produce a lot of output, and Mercurial will
3427 attempt to use a pager to make those commands more pleasant.
3438 attempt to use a pager to make those commands more pleasant.
3428 </p>
3439 </p>
3429 <p>
3440 <p>
3430 To set the pager that should be used, set the application variable:
3441 To set the pager that should be used, set the application variable:
3431 </p>
3442 </p>
3432 <pre>
3443 <pre>
3433 [pager]
3444 [pager]
3434 pager = less -FRX
3445 pager = less -FRX
3435 </pre>
3446 </pre>
3436 <p>
3447 <p>
3437 If no pager is set in the user or repository configuration, Mercurial uses the
3448 If no pager is set in the user or repository configuration, Mercurial uses the
3438 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3449 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3439 or system configuration is used. If none of these are set, a default pager will
3450 or system configuration is used. If none of these are set, a default pager will
3440 be used, typically 'less' on Unix and 'more' on Windows.
3451 be used, typically 'less' on Unix and 'more' on Windows.
3441 </p>
3452 </p>
3442 <p>
3453 <p>
3443 You can disable the pager for certain commands by adding them to the
3454 You can disable the pager for certain commands by adding them to the
3444 pager.ignore list:
3455 pager.ignore list:
3445 </p>
3456 </p>
3446 <pre>
3457 <pre>
3447 [pager]
3458 [pager]
3448 ignore = version, help, update
3459 ignore = version, help, update
3449 </pre>
3460 </pre>
3450 <p>
3461 <p>
3451 To ignore global commands like 'hg version' or 'hg help', you have
3462 To ignore global commands like 'hg version' or 'hg help', you have
3452 to specify them in your user configuration file.
3463 to specify them in your user configuration file.
3453 </p>
3464 </p>
3454 <p>
3465 <p>
3455 To control whether the pager is used at all for an individual command,
3466 To control whether the pager is used at all for an individual command,
3456 you can use --pager=&lt;value&gt;:
3467 you can use --pager=&lt;value&gt;:
3457 </p>
3468 </p>
3458 <ul>
3469 <ul>
3459 <li> use as needed: 'auto'.
3470 <li> use as needed: 'auto'.
3460 <li> require the pager: 'yes' or 'on'.
3471 <li> require the pager: 'yes' or 'on'.
3461 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3472 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3462 </ul>
3473 </ul>
3463 <p>
3474 <p>
3464 To globally turn off all attempts to use a pager, set:
3475 To globally turn off all attempts to use a pager, set:
3465 </p>
3476 </p>
3466 <pre>
3477 <pre>
3467 [ui]
3478 [ui]
3468 paginate = never
3479 paginate = never
3469 </pre>
3480 </pre>
3470 <p>
3481 <p>
3471 which will prevent the pager from running.
3482 which will prevent the pager from running.
3472 </p>
3483 </p>
3473
3484
3474 </div>
3485 </div>
3475 </div>
3486 </div>
3476 </div>
3487 </div>
3477
3488
3478
3489
3479
3490
3480 </body>
3491 </body>
3481 </html>
3492 </html>
3482
3493
3483
3494
3484 Sub-topic indexes rendered properly
3495 Sub-topic indexes rendered properly
3485
3496
3486 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3497 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3487 200 Script output follows
3498 200 Script output follows
3488
3499
3489 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3500 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3490 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3501 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3491 <head>
3502 <head>
3492 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3503 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3493 <meta name="robots" content="index, nofollow" />
3504 <meta name="robots" content="index, nofollow" />
3494 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3505 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3495 <script type="text/javascript" src="/static/mercurial.js"></script>
3506 <script type="text/javascript" src="/static/mercurial.js"></script>
3496
3507
3497 <title>Help: internals</title>
3508 <title>Help: internals</title>
3498 </head>
3509 </head>
3499 <body>
3510 <body>
3500
3511
3501 <div class="container">
3512 <div class="container">
3502 <div class="menu">
3513 <div class="menu">
3503 <div class="logo">
3514 <div class="logo">
3504 <a href="https://mercurial-scm.org/">
3515 <a href="https://mercurial-scm.org/">
3505 <img src="/static/hglogo.png" alt="mercurial" /></a>
3516 <img src="/static/hglogo.png" alt="mercurial" /></a>
3506 </div>
3517 </div>
3507 <ul>
3518 <ul>
3508 <li><a href="/shortlog">log</a></li>
3519 <li><a href="/shortlog">log</a></li>
3509 <li><a href="/graph">graph</a></li>
3520 <li><a href="/graph">graph</a></li>
3510 <li><a href="/tags">tags</a></li>
3521 <li><a href="/tags">tags</a></li>
3511 <li><a href="/bookmarks">bookmarks</a></li>
3522 <li><a href="/bookmarks">bookmarks</a></li>
3512 <li><a href="/branches">branches</a></li>
3523 <li><a href="/branches">branches</a></li>
3513 </ul>
3524 </ul>
3514 <ul>
3525 <ul>
3515 <li><a href="/help">help</a></li>
3526 <li><a href="/help">help</a></li>
3516 </ul>
3527 </ul>
3517 </div>
3528 </div>
3518
3529
3519 <div class="main">
3530 <div class="main">
3520 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3531 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3521
3532
3522 <form class="search" action="/log">
3533 <form class="search" action="/log">
3523
3534
3524 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3535 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3525 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3536 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3526 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3537 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3527 </form>
3538 </form>
3528 <table class="bigtable">
3539 <table class="bigtable">
3529 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3540 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3530
3541
3531 <tr><td>
3542 <tr><td>
3532 <a href="/help/internals.bid-merge">
3543 <a href="/help/internals.bid-merge">
3533 bid-merge
3544 bid-merge
3534 </a>
3545 </a>
3535 </td><td>
3546 </td><td>
3536 Bid Merge Algorithm
3547 Bid Merge Algorithm
3537 </td></tr>
3548 </td></tr>
3538 <tr><td>
3549 <tr><td>
3539 <a href="/help/internals.bundle2">
3550 <a href="/help/internals.bundle2">
3540 bundle2
3551 bundle2
3541 </a>
3552 </a>
3542 </td><td>
3553 </td><td>
3543 Bundle2
3554 Bundle2
3544 </td></tr>
3555 </td></tr>
3545 <tr><td>
3556 <tr><td>
3546 <a href="/help/internals.bundles">
3557 <a href="/help/internals.bundles">
3547 bundles
3558 bundles
3548 </a>
3559 </a>
3549 </td><td>
3560 </td><td>
3550 Bundles
3561 Bundles
3551 </td></tr>
3562 </td></tr>
3552 <tr><td>
3563 <tr><td>
3553 <a href="/help/internals.cbor">
3564 <a href="/help/internals.cbor">
3554 cbor
3565 cbor
3555 </a>
3566 </a>
3556 </td><td>
3567 </td><td>
3557 CBOR
3568 CBOR
3558 </td></tr>
3569 </td></tr>
3559 <tr><td>
3570 <tr><td>
3560 <a href="/help/internals.censor">
3571 <a href="/help/internals.censor">
3561 censor
3572 censor
3562 </a>
3573 </a>
3563 </td><td>
3574 </td><td>
3564 Censor
3575 Censor
3565 </td></tr>
3576 </td></tr>
3566 <tr><td>
3577 <tr><td>
3567 <a href="/help/internals.changegroups">
3578 <a href="/help/internals.changegroups">
3568 changegroups
3579 changegroups
3569 </a>
3580 </a>
3570 </td><td>
3581 </td><td>
3571 Changegroups
3582 Changegroups
3572 </td></tr>
3583 </td></tr>
3573 <tr><td>
3584 <tr><td>
3574 <a href="/help/internals.config">
3585 <a href="/help/internals.config">
3575 config
3586 config
3576 </a>
3587 </a>
3577 </td><td>
3588 </td><td>
3578 Config Registrar
3589 Config Registrar
3579 </td></tr>
3590 </td></tr>
3580 <tr><td>
3591 <tr><td>
3581 <a href="/help/internals.dirstate-v2">
3592 <a href="/help/internals.dirstate-v2">
3582 dirstate-v2
3593 dirstate-v2
3583 </a>
3594 </a>
3584 </td><td>
3595 </td><td>
3585 dirstate-v2 file format
3596 dirstate-v2 file format
3586 </td></tr>
3597 </td></tr>
3587 <tr><td>
3598 <tr><td>
3588 <a href="/help/internals.extensions">
3599 <a href="/help/internals.extensions">
3589 extensions
3600 extensions
3590 </a>
3601 </a>
3591 </td><td>
3602 </td><td>
3592 Extension API
3603 Extension API
3593 </td></tr>
3604 </td></tr>
3594 <tr><td>
3605 <tr><td>
3595 <a href="/help/internals.mergestate">
3606 <a href="/help/internals.mergestate">
3596 mergestate
3607 mergestate
3597 </a>
3608 </a>
3598 </td><td>
3609 </td><td>
3599 Mergestate
3610 Mergestate
3600 </td></tr>
3611 </td></tr>
3601 <tr><td>
3612 <tr><td>
3602 <a href="/help/internals.requirements">
3613 <a href="/help/internals.requirements">
3603 requirements
3614 requirements
3604 </a>
3615 </a>
3605 </td><td>
3616 </td><td>
3606 Repository Requirements
3617 Repository Requirements
3607 </td></tr>
3618 </td></tr>
3608 <tr><td>
3619 <tr><td>
3609 <a href="/help/internals.revlogs">
3620 <a href="/help/internals.revlogs">
3610 revlogs
3621 revlogs
3611 </a>
3622 </a>
3612 </td><td>
3623 </td><td>
3613 Revision Logs
3624 Revision Logs
3614 </td></tr>
3625 </td></tr>
3615 <tr><td>
3626 <tr><td>
3616 <a href="/help/internals.wireprotocol">
3627 <a href="/help/internals.wireprotocol">
3617 wireprotocol
3628 wireprotocol
3618 </a>
3629 </a>
3619 </td><td>
3630 </td><td>
3620 Wire Protocol
3631 Wire Protocol
3621 </td></tr>
3632 </td></tr>
3622 <tr><td>
3633 <tr><td>
3623 <a href="/help/internals.wireprotocolrpc">
3634 <a href="/help/internals.wireprotocolrpc">
3624 wireprotocolrpc
3635 wireprotocolrpc
3625 </a>
3636 </a>
3626 </td><td>
3637 </td><td>
3627 Wire Protocol RPC
3638 Wire Protocol RPC
3628 </td></tr>
3639 </td></tr>
3629 <tr><td>
3640 <tr><td>
3630 <a href="/help/internals.wireprotocolv2">
3641 <a href="/help/internals.wireprotocolv2">
3631 wireprotocolv2
3642 wireprotocolv2
3632 </a>
3643 </a>
3633 </td><td>
3644 </td><td>
3634 Wire Protocol Version 2
3645 Wire Protocol Version 2
3635 </td></tr>
3646 </td></tr>
3636
3647
3637
3648
3638
3649
3639
3650
3640
3651
3641 </table>
3652 </table>
3642 </div>
3653 </div>
3643 </div>
3654 </div>
3644
3655
3645
3656
3646
3657
3647 </body>
3658 </body>
3648 </html>
3659 </html>
3649
3660
3650
3661
3651 Sub-topic topics rendered properly
3662 Sub-topic topics rendered properly
3652
3663
3653 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3664 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3654 200 Script output follows
3665 200 Script output follows
3655
3666
3656 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3667 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3657 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3668 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3658 <head>
3669 <head>
3659 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3670 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3660 <meta name="robots" content="index, nofollow" />
3671 <meta name="robots" content="index, nofollow" />
3661 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3672 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3662 <script type="text/javascript" src="/static/mercurial.js"></script>
3673 <script type="text/javascript" src="/static/mercurial.js"></script>
3663
3674
3664 <title>Help: internals.changegroups</title>
3675 <title>Help: internals.changegroups</title>
3665 </head>
3676 </head>
3666 <body>
3677 <body>
3667
3678
3668 <div class="container">
3679 <div class="container">
3669 <div class="menu">
3680 <div class="menu">
3670 <div class="logo">
3681 <div class="logo">
3671 <a href="https://mercurial-scm.org/">
3682 <a href="https://mercurial-scm.org/">
3672 <img src="/static/hglogo.png" alt="mercurial" /></a>
3683 <img src="/static/hglogo.png" alt="mercurial" /></a>
3673 </div>
3684 </div>
3674 <ul>
3685 <ul>
3675 <li><a href="/shortlog">log</a></li>
3686 <li><a href="/shortlog">log</a></li>
3676 <li><a href="/graph">graph</a></li>
3687 <li><a href="/graph">graph</a></li>
3677 <li><a href="/tags">tags</a></li>
3688 <li><a href="/tags">tags</a></li>
3678 <li><a href="/bookmarks">bookmarks</a></li>
3689 <li><a href="/bookmarks">bookmarks</a></li>
3679 <li><a href="/branches">branches</a></li>
3690 <li><a href="/branches">branches</a></li>
3680 </ul>
3691 </ul>
3681 <ul>
3692 <ul>
3682 <li class="active"><a href="/help">help</a></li>
3693 <li class="active"><a href="/help">help</a></li>
3683 </ul>
3694 </ul>
3684 </div>
3695 </div>
3685
3696
3686 <div class="main">
3697 <div class="main">
3687 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3698 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3688 <h3>Help: internals.changegroups</h3>
3699 <h3>Help: internals.changegroups</h3>
3689
3700
3690 <form class="search" action="/log">
3701 <form class="search" action="/log">
3691
3702
3692 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3703 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3693 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3704 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3694 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3705 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3695 </form>
3706 </form>
3696 <div id="doc">
3707 <div id="doc">
3697 <h1>Changegroups</h1>
3708 <h1>Changegroups</h1>
3698 <p>
3709 <p>
3699 Changegroups are representations of repository revlog data, specifically
3710 Changegroups are representations of repository revlog data, specifically
3700 the changelog data, root/flat manifest data, treemanifest data, and
3711 the changelog data, root/flat manifest data, treemanifest data, and
3701 filelogs.
3712 filelogs.
3702 </p>
3713 </p>
3703 <p>
3714 <p>
3704 There are 4 versions of changegroups: &quot;1&quot;, &quot;2&quot;, &quot;3&quot; and &quot;4&quot;. From a
3715 There are 4 versions of changegroups: &quot;1&quot;, &quot;2&quot;, &quot;3&quot; and &quot;4&quot;. From a
3705 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3716 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3706 only difference being an additional item in the *delta header*. Version
3717 only difference being an additional item in the *delta header*. Version
3707 &quot;3&quot; adds support for storage flags in the *delta header* and optionally
3718 &quot;3&quot; adds support for storage flags in the *delta header* and optionally
3708 exchanging treemanifests (enabled by setting an option on the
3719 exchanging treemanifests (enabled by setting an option on the
3709 &quot;changegroup&quot; part in the bundle2). Version &quot;4&quot; adds support for exchanging
3720 &quot;changegroup&quot; part in the bundle2). Version &quot;4&quot; adds support for exchanging
3710 sidedata (additional revision metadata not part of the digest).
3721 sidedata (additional revision metadata not part of the digest).
3711 </p>
3722 </p>
3712 <p>
3723 <p>
3713 Changegroups when not exchanging treemanifests consist of 3 logical
3724 Changegroups when not exchanging treemanifests consist of 3 logical
3714 segments:
3725 segments:
3715 </p>
3726 </p>
3716 <pre>
3727 <pre>
3717 +---------------------------------+
3728 +---------------------------------+
3718 | | | |
3729 | | | |
3719 | changeset | manifest | filelogs |
3730 | changeset | manifest | filelogs |
3720 | | | |
3731 | | | |
3721 | | | |
3732 | | | |
3722 +---------------------------------+
3733 +---------------------------------+
3723 </pre>
3734 </pre>
3724 <p>
3735 <p>
3725 When exchanging treemanifests, there are 4 logical segments:
3736 When exchanging treemanifests, there are 4 logical segments:
3726 </p>
3737 </p>
3727 <pre>
3738 <pre>
3728 +-------------------------------------------------+
3739 +-------------------------------------------------+
3729 | | | | |
3740 | | | | |
3730 | changeset | root | treemanifests | filelogs |
3741 | changeset | root | treemanifests | filelogs |
3731 | | manifest | | |
3742 | | manifest | | |
3732 | | | | |
3743 | | | | |
3733 +-------------------------------------------------+
3744 +-------------------------------------------------+
3734 </pre>
3745 </pre>
3735 <p>
3746 <p>
3736 The principle building block of each segment is a *chunk*. A *chunk*
3747 The principle building block of each segment is a *chunk*. A *chunk*
3737 is a framed piece of data:
3748 is a framed piece of data:
3738 </p>
3749 </p>
3739 <pre>
3750 <pre>
3740 +---------------------------------------+
3751 +---------------------------------------+
3741 | | |
3752 | | |
3742 | length | data |
3753 | length | data |
3743 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3754 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3744 | | |
3755 | | |
3745 +---------------------------------------+
3756 +---------------------------------------+
3746 </pre>
3757 </pre>
3747 <p>
3758 <p>
3748 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3759 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3749 integer indicating the length of the entire chunk (including the length field
3760 integer indicating the length of the entire chunk (including the length field
3750 itself).
3761 itself).
3751 </p>
3762 </p>
3752 <p>
3763 <p>
3753 There is a special case chunk that has a value of 0 for the length
3764 There is a special case chunk that has a value of 0 for the length
3754 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3765 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3755 </p>
3766 </p>
3756 <h2>Delta Groups</h2>
3767 <h2>Delta Groups</h2>
3757 <p>
3768 <p>
3758 A *delta group* expresses the content of a revlog as a series of deltas,
3769 A *delta group* expresses the content of a revlog as a series of deltas,
3759 or patches against previous revisions.
3770 or patches against previous revisions.
3760 </p>
3771 </p>
3761 <p>
3772 <p>
3762 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3773 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3763 to signal the end of the delta group:
3774 to signal the end of the delta group:
3764 </p>
3775 </p>
3765 <pre>
3776 <pre>
3766 +------------------------------------------------------------------------+
3777 +------------------------------------------------------------------------+
3767 | | | | | |
3778 | | | | | |
3768 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3779 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3769 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3780 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3770 | | | | | |
3781 | | | | | |
3771 +------------------------------------------------------------------------+
3782 +------------------------------------------------------------------------+
3772 </pre>
3783 </pre>
3773 <p>
3784 <p>
3774 Each *chunk*'s data consists of the following:
3785 Each *chunk*'s data consists of the following:
3775 </p>
3786 </p>
3776 <pre>
3787 <pre>
3777 +---------------------------------------+
3788 +---------------------------------------+
3778 | | |
3789 | | |
3779 | delta header | delta data |
3790 | delta header | delta data |
3780 | (various by version) | (various) |
3791 | (various by version) | (various) |
3781 | | |
3792 | | |
3782 +---------------------------------------+
3793 +---------------------------------------+
3783 </pre>
3794 </pre>
3784 <p>
3795 <p>
3785 The *delta data* is a series of *delta*s that describe a diff from an existing
3796 The *delta data* is a series of *delta*s that describe a diff from an existing
3786 entry (either that the recipient already has, or previously specified in the
3797 entry (either that the recipient already has, or previously specified in the
3787 bundle/changegroup).
3798 bundle/changegroup).
3788 </p>
3799 </p>
3789 <p>
3800 <p>
3790 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, &quot;3&quot; and &quot;4&quot;
3801 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, &quot;3&quot; and &quot;4&quot;
3791 of the changegroup format.
3802 of the changegroup format.
3792 </p>
3803 </p>
3793 <p>
3804 <p>
3794 Version 1 (headerlen=80):
3805 Version 1 (headerlen=80):
3795 </p>
3806 </p>
3796 <pre>
3807 <pre>
3797 +------------------------------------------------------+
3808 +------------------------------------------------------+
3798 | | | | |
3809 | | | | |
3799 | node | p1 node | p2 node | link node |
3810 | node | p1 node | p2 node | link node |
3800 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3811 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3801 | | | | |
3812 | | | | |
3802 +------------------------------------------------------+
3813 +------------------------------------------------------+
3803 </pre>
3814 </pre>
3804 <p>
3815 <p>
3805 Version 2 (headerlen=100):
3816 Version 2 (headerlen=100):
3806 </p>
3817 </p>
3807 <pre>
3818 <pre>
3808 +------------------------------------------------------------------+
3819 +------------------------------------------------------------------+
3809 | | | | | |
3820 | | | | | |
3810 | node | p1 node | p2 node | base node | link node |
3821 | node | p1 node | p2 node | base node | link node |
3811 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3822 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3812 | | | | | |
3823 | | | | | |
3813 +------------------------------------------------------------------+
3824 +------------------------------------------------------------------+
3814 </pre>
3825 </pre>
3815 <p>
3826 <p>
3816 Version 3 (headerlen=102):
3827 Version 3 (headerlen=102):
3817 </p>
3828 </p>
3818 <pre>
3829 <pre>
3819 +------------------------------------------------------------------------------+
3830 +------------------------------------------------------------------------------+
3820 | | | | | | |
3831 | | | | | | |
3821 | node | p1 node | p2 node | base node | link node | flags |
3832 | node | p1 node | p2 node | base node | link node | flags |
3822 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3833 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3823 | | | | | | |
3834 | | | | | | |
3824 +------------------------------------------------------------------------------+
3835 +------------------------------------------------------------------------------+
3825 </pre>
3836 </pre>
3826 <p>
3837 <p>
3827 Version 4 (headerlen=103):
3838 Version 4 (headerlen=103):
3828 </p>
3839 </p>
3829 <pre>
3840 <pre>
3830 +------------------------------------------------------------------------------+----------+
3841 +------------------------------------------------------------------------------+----------+
3831 | | | | | | | |
3842 | | | | | | | |
3832 | node | p1 node | p2 node | base node | link node | flags | pflags |
3843 | node | p1 node | p2 node | base node | link node | flags | pflags |
3833 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | (1 byte) |
3844 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | (1 byte) |
3834 | | | | | | | |
3845 | | | | | | | |
3835 +------------------------------------------------------------------------------+----------+
3846 +------------------------------------------------------------------------------+----------+
3836 </pre>
3847 </pre>
3837 <p>
3848 <p>
3838 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3849 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3839 series of *delta*s, densely packed (no separators). These deltas describe a diff
3850 series of *delta*s, densely packed (no separators). These deltas describe a diff
3840 from an existing entry (either that the recipient already has, or previously
3851 from an existing entry (either that the recipient already has, or previously
3841 specified in the bundle/changegroup). The format is described more fully in
3852 specified in the bundle/changegroup). The format is described more fully in
3842 &quot;hg help internals.bdiff&quot;, but briefly:
3853 &quot;hg help internals.bdiff&quot;, but briefly:
3843 </p>
3854 </p>
3844 <pre>
3855 <pre>
3845 +---------------------------------------------------------------+
3856 +---------------------------------------------------------------+
3846 | | | | |
3857 | | | | |
3847 | start offset | end offset | new length | content |
3858 | start offset | end offset | new length | content |
3848 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3859 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3849 | | | | |
3860 | | | | |
3850 +---------------------------------------------------------------+
3861 +---------------------------------------------------------------+
3851 </pre>
3862 </pre>
3852 <p>
3863 <p>
3853 Please note that the length field in the delta data does *not* include itself.
3864 Please note that the length field in the delta data does *not* include itself.
3854 </p>
3865 </p>
3855 <p>
3866 <p>
3856 In version 1, the delta is always applied against the previous node from
3867 In version 1, the delta is always applied against the previous node from
3857 the changegroup or the first parent if this is the first entry in the
3868 the changegroup or the first parent if this is the first entry in the
3858 changegroup.
3869 changegroup.
3859 </p>
3870 </p>
3860 <p>
3871 <p>
3861 In version 2 and up, the delta base node is encoded in the entry in the
3872 In version 2 and up, the delta base node is encoded in the entry in the
3862 changegroup. This allows the delta to be expressed against any parent,
3873 changegroup. This allows the delta to be expressed against any parent,
3863 which can result in smaller deltas and more efficient encoding of data.
3874 which can result in smaller deltas and more efficient encoding of data.
3864 </p>
3875 </p>
3865 <p>
3876 <p>
3866 The *flags* field holds bitwise flags affecting the processing of revision
3877 The *flags* field holds bitwise flags affecting the processing of revision
3867 data. The following flags are defined:
3878 data. The following flags are defined:
3868 </p>
3879 </p>
3869 <dl>
3880 <dl>
3870 <dt>32768
3881 <dt>32768
3871 <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions.
3882 <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions.
3872 <dt>16384
3883 <dt>16384
3873 <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents).
3884 <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents).
3874 <dt>8192
3885 <dt>8192
3875 <dd>Externally stored. The revision fulltext contains &quot;key:value&quot; &quot;\n&quot; delimited metadata defining an object stored elsewhere. Used by the LFS extension.
3886 <dd>Externally stored. The revision fulltext contains &quot;key:value&quot; &quot;\n&quot; delimited metadata defining an object stored elsewhere. Used by the LFS extension.
3876 <dt>4096
3887 <dt>4096
3877 <dd>Contains copy information. This revision changes files in a way that could affect copy tracing. This does *not* affect changegroup handling, but is relevant for other parts of Mercurial.
3888 <dd>Contains copy information. This revision changes files in a way that could affect copy tracing. This does *not* affect changegroup handling, but is relevant for other parts of Mercurial.
3878 </dl>
3889 </dl>
3879 <p>
3890 <p>
3880 For historical reasons, the integer values are identical to revlog version 1
3891 For historical reasons, the integer values are identical to revlog version 1
3881 per-revision storage flags and correspond to bits being set in this 2-byte
3892 per-revision storage flags and correspond to bits being set in this 2-byte
3882 field. Bits were allocated starting from the most-significant bit, hence the
3893 field. Bits were allocated starting from the most-significant bit, hence the
3883 reverse ordering and allocation of these flags.
3894 reverse ordering and allocation of these flags.
3884 </p>
3895 </p>
3885 <p>
3896 <p>
3886 The *pflags* (protocol flags) field holds bitwise flags affecting the protocol
3897 The *pflags* (protocol flags) field holds bitwise flags affecting the protocol
3887 itself. They are first in the header since they may affect the handling of the
3898 itself. They are first in the header since they may affect the handling of the
3888 rest of the fields in a future version. They are defined as such:
3899 rest of the fields in a future version. They are defined as such:
3889 </p>
3900 </p>
3890 <dl>
3901 <dl>
3891 <dt>1 indicates whether to read a chunk of sidedata (of variable length) right
3902 <dt>1 indicates whether to read a chunk of sidedata (of variable length) right
3892 <dd>after the revision flags.
3903 <dd>after the revision flags.
3893 </dl>
3904 </dl>
3894 <h2>Changeset Segment</h2>
3905 <h2>Changeset Segment</h2>
3895 <p>
3906 <p>
3896 The *changeset segment* consists of a single *delta group* holding
3907 The *changeset segment* consists of a single *delta group* holding
3897 changelog data. The *empty chunk* at the end of the *delta group* denotes
3908 changelog data. The *empty chunk* at the end of the *delta group* denotes
3898 the boundary to the *manifest segment*.
3909 the boundary to the *manifest segment*.
3899 </p>
3910 </p>
3900 <h2>Manifest Segment</h2>
3911 <h2>Manifest Segment</h2>
3901 <p>
3912 <p>
3902 The *manifest segment* consists of a single *delta group* holding manifest
3913 The *manifest segment* consists of a single *delta group* holding manifest
3903 data. If treemanifests are in use, it contains only the manifest for the
3914 data. If treemanifests are in use, it contains only the manifest for the
3904 root directory of the repository. Otherwise, it contains the entire
3915 root directory of the repository. Otherwise, it contains the entire
3905 manifest data. The *empty chunk* at the end of the *delta group* denotes
3916 manifest data. The *empty chunk* at the end of the *delta group* denotes
3906 the boundary to the next segment (either the *treemanifests segment* or the
3917 the boundary to the next segment (either the *treemanifests segment* or the
3907 *filelogs segment*, depending on version and the request options).
3918 *filelogs segment*, depending on version and the request options).
3908 </p>
3919 </p>
3909 <h3>Treemanifests Segment</h3>
3920 <h3>Treemanifests Segment</h3>
3910 <p>
3921 <p>
3911 The *treemanifests segment* only exists in changegroup version &quot;3&quot; and &quot;4&quot;,
3922 The *treemanifests segment* only exists in changegroup version &quot;3&quot; and &quot;4&quot;,
3912 and only if the 'treemanifest' param is part of the bundle2 changegroup part
3923 and only if the 'treemanifest' param is part of the bundle2 changegroup part
3913 (it is not possible to use changegroup version 3 or 4 outside of bundle2).
3924 (it is not possible to use changegroup version 3 or 4 outside of bundle2).
3914 Aside from the filenames in the *treemanifests segment* containing a
3925 Aside from the filenames in the *treemanifests segment* containing a
3915 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3926 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3916 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3927 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3917 a sub-segment with filename size 0). This denotes the boundary to the
3928 a sub-segment with filename size 0). This denotes the boundary to the
3918 *filelogs segment*.
3929 *filelogs segment*.
3919 </p>
3930 </p>
3920 <h2>Filelogs Segment</h2>
3931 <h2>Filelogs Segment</h2>
3921 <p>
3932 <p>
3922 The *filelogs segment* consists of multiple sub-segments, each
3933 The *filelogs segment* consists of multiple sub-segments, each
3923 corresponding to an individual file whose data is being described:
3934 corresponding to an individual file whose data is being described:
3924 </p>
3935 </p>
3925 <pre>
3936 <pre>
3926 +--------------------------------------------------+
3937 +--------------------------------------------------+
3927 | | | | | |
3938 | | | | | |
3928 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3939 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3929 | | | | | (4 bytes) |
3940 | | | | | (4 bytes) |
3930 | | | | | |
3941 | | | | | |
3931 +--------------------------------------------------+
3942 +--------------------------------------------------+
3932 </pre>
3943 </pre>
3933 <p>
3944 <p>
3934 The final filelog sub-segment is followed by an *empty chunk* (logically,
3945 The final filelog sub-segment is followed by an *empty chunk* (logically,
3935 a sub-segment with filename size 0). This denotes the end of the segment
3946 a sub-segment with filename size 0). This denotes the end of the segment
3936 and of the overall changegroup.
3947 and of the overall changegroup.
3937 </p>
3948 </p>
3938 <p>
3949 <p>
3939 Each filelog sub-segment consists of the following:
3950 Each filelog sub-segment consists of the following:
3940 </p>
3951 </p>
3941 <pre>
3952 <pre>
3942 +------------------------------------------------------+
3953 +------------------------------------------------------+
3943 | | | |
3954 | | | |
3944 | filename length | filename | delta group |
3955 | filename length | filename | delta group |
3945 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3956 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3946 | | | |
3957 | | | |
3947 +------------------------------------------------------+
3958 +------------------------------------------------------+
3948 </pre>
3959 </pre>
3949 <p>
3960 <p>
3950 That is, a *chunk* consisting of the filename (not terminated or padded)
3961 That is, a *chunk* consisting of the filename (not terminated or padded)
3951 followed by N chunks constituting the *delta group* for this file. The
3962 followed by N chunks constituting the *delta group* for this file. The
3952 *empty chunk* at the end of each *delta group* denotes the boundary to the
3963 *empty chunk* at the end of each *delta group* denotes the boundary to the
3953 next filelog sub-segment.
3964 next filelog sub-segment.
3954 </p>
3965 </p>
3955
3966
3956 </div>
3967 </div>
3957 </div>
3968 </div>
3958 </div>
3969 </div>
3959
3970
3960
3971
3961
3972
3962 </body>
3973 </body>
3963 </html>
3974 </html>
3964
3975
3965
3976
3966 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3977 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3967 404 Not Found
3978 404 Not Found
3968
3979
3969 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3980 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3970 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3981 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3971 <head>
3982 <head>
3972 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3983 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3973 <meta name="robots" content="index, nofollow" />
3984 <meta name="robots" content="index, nofollow" />
3974 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3985 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3975 <script type="text/javascript" src="/static/mercurial.js"></script>
3986 <script type="text/javascript" src="/static/mercurial.js"></script>
3976
3987
3977 <title>test: error</title>
3988 <title>test: error</title>
3978 </head>
3989 </head>
3979 <body>
3990 <body>
3980
3991
3981 <div class="container">
3992 <div class="container">
3982 <div class="menu">
3993 <div class="menu">
3983 <div class="logo">
3994 <div class="logo">
3984 <a href="https://mercurial-scm.org/">
3995 <a href="https://mercurial-scm.org/">
3985 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3996 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3986 </div>
3997 </div>
3987 <ul>
3998 <ul>
3988 <li><a href="/shortlog">log</a></li>
3999 <li><a href="/shortlog">log</a></li>
3989 <li><a href="/graph">graph</a></li>
4000 <li><a href="/graph">graph</a></li>
3990 <li><a href="/tags">tags</a></li>
4001 <li><a href="/tags">tags</a></li>
3991 <li><a href="/bookmarks">bookmarks</a></li>
4002 <li><a href="/bookmarks">bookmarks</a></li>
3992 <li><a href="/branches">branches</a></li>
4003 <li><a href="/branches">branches</a></li>
3993 </ul>
4004 </ul>
3994 <ul>
4005 <ul>
3995 <li><a href="/help">help</a></li>
4006 <li><a href="/help">help</a></li>
3996 </ul>
4007 </ul>
3997 </div>
4008 </div>
3998
4009
3999 <div class="main">
4010 <div class="main">
4000
4011
4001 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
4012 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
4002 <h3>error</h3>
4013 <h3>error</h3>
4003
4014
4004
4015
4005 <form class="search" action="/log">
4016 <form class="search" action="/log">
4006
4017
4007 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
4018 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
4008 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
4019 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
4009 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
4020 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
4010 </form>
4021 </form>
4011
4022
4012 <div class="description">
4023 <div class="description">
4013 <p>
4024 <p>
4014 An error occurred while processing your request:
4025 An error occurred while processing your request:
4015 </p>
4026 </p>
4016 <p>
4027 <p>
4017 Not Found
4028 Not Found
4018 </p>
4029 </p>
4019 </div>
4030 </div>
4020 </div>
4031 </div>
4021 </div>
4032 </div>
4022
4033
4023
4034
4024
4035
4025 </body>
4036 </body>
4026 </html>
4037 </html>
4027
4038
4028 [1]
4039 [1]
4029
4040
4030 $ killdaemons.py
4041 $ killdaemons.py
4031
4042
4032 #endif
4043 #endif
@@ -1,2389 +1,2393 b''
1 #require serve
1 #require serve
2
2
3 $ request() {
3 $ request() {
4 > get-with-headers.py --json localhost:$HGPORT "$1"
4 > get-with-headers.py --json localhost:$HGPORT "$1"
5 > }
5 > }
6
6
7 $ hg init test
7 $ hg init test
8 $ cd test
8 $ cd test
9 $ mkdir da
9 $ mkdir da
10 $ echo foo > da/foo
10 $ echo foo > da/foo
11 $ echo foo > foo
11 $ echo foo > foo
12 $ hg -q ci -A -m initial
12 $ hg -q ci -A -m initial
13 $ echo bar > foo
13 $ echo bar > foo
14 $ hg ci -m 'modify foo'
14 $ hg ci -m 'modify foo'
15 $ echo bar > da/foo
15 $ echo bar > da/foo
16 $ hg ci -m 'modify da/foo'
16 $ hg ci -m 'modify da/foo'
17 $ hg bookmark bookmark1
17 $ hg bookmark bookmark1
18 $ hg up default
18 $ hg up default
19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 (leaving bookmark bookmark1)
20 (leaving bookmark bookmark1)
21 $ hg mv foo foo-new
21 $ hg mv foo foo-new
22 $ hg commit -m 'move foo'
22 $ hg commit -m 'move foo'
23 $ hg tag -m 'create tag' tag1
23 $ hg tag -m 'create tag' tag1
24 $ hg phase --public -r .
24 $ hg phase --public -r .
25 $ echo baz > da/foo
25 $ echo baz > da/foo
26 $ hg commit -m 'another commit to da/foo'
26 $ hg commit -m 'another commit to da/foo'
27 $ hg tag -m 'create tag2' tag2
27 $ hg tag -m 'create tag2' tag2
28 $ hg bookmark bookmark2
28 $ hg bookmark bookmark2
29 $ hg -q up -r 0
29 $ hg -q up -r 0
30 $ hg -q branch test-branch
30 $ hg -q branch test-branch
31 $ echo branch > foo
31 $ echo branch > foo
32 $ hg commit -m 'create test branch'
32 $ hg commit -m 'create test branch'
33 $ echo branch_commit_2 > foo
33 $ echo branch_commit_2 > foo
34 $ hg commit -m 'another commit in test-branch'
34 $ hg commit -m 'another commit in test-branch'
35 $ hg -q up default
35 $ hg -q up default
36 $ hg merge --tool :local test-branch
36 $ hg merge --tool :local test-branch
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
38 (branch merge, don't forget to commit)
38 (branch merge, don't forget to commit)
39 $ hg commit -m 'merge test-branch into default'
39 $ hg commit -m 'merge test-branch into default'
40
40
41 $ hg log -G
41 $ hg log -G
42 @ changeset: 9:cc725e08502a
42 @ changeset: 9:cc725e08502a
43 |\ tag: tip
43 |\ tag: tip
44 | | parent: 6:ceed296fe500
44 | | parent: 6:ceed296fe500
45 | | parent: 8:ed66c30e87eb
45 | | parent: 8:ed66c30e87eb
46 | | user: test
46 | | user: test
47 | | date: Thu Jan 01 00:00:00 1970 +0000
47 | | date: Thu Jan 01 00:00:00 1970 +0000
48 | | summary: merge test-branch into default
48 | | summary: merge test-branch into default
49 | |
49 | |
50 | o changeset: 8:ed66c30e87eb
50 | o changeset: 8:ed66c30e87eb
51 | | branch: test-branch
51 | | branch: test-branch
52 | | user: test
52 | | user: test
53 | | date: Thu Jan 01 00:00:00 1970 +0000
53 | | date: Thu Jan 01 00:00:00 1970 +0000
54 | | summary: another commit in test-branch
54 | | summary: another commit in test-branch
55 | |
55 | |
56 | o changeset: 7:6ab967a8ab34
56 | o changeset: 7:6ab967a8ab34
57 | | branch: test-branch
57 | | branch: test-branch
58 | | parent: 0:06e557f3edf6
58 | | parent: 0:06e557f3edf6
59 | | user: test
59 | | user: test
60 | | date: Thu Jan 01 00:00:00 1970 +0000
60 | | date: Thu Jan 01 00:00:00 1970 +0000
61 | | summary: create test branch
61 | | summary: create test branch
62 | |
62 | |
63 o | changeset: 6:ceed296fe500
63 o | changeset: 6:ceed296fe500
64 | | bookmark: bookmark2
64 | | bookmark: bookmark2
65 | | user: test
65 | | user: test
66 | | date: Thu Jan 01 00:00:00 1970 +0000
66 | | date: Thu Jan 01 00:00:00 1970 +0000
67 | | summary: create tag2
67 | | summary: create tag2
68 | |
68 | |
69 o | changeset: 5:f2890a05fea4
69 o | changeset: 5:f2890a05fea4
70 | | tag: tag2
70 | | tag: tag2
71 | | user: test
71 | | user: test
72 | | date: Thu Jan 01 00:00:00 1970 +0000
72 | | date: Thu Jan 01 00:00:00 1970 +0000
73 | | summary: another commit to da/foo
73 | | summary: another commit to da/foo
74 | |
74 | |
75 o | changeset: 4:93a8ce14f891
75 o | changeset: 4:93a8ce14f891
76 | | user: test
76 | | user: test
77 | | date: Thu Jan 01 00:00:00 1970 +0000
77 | | date: Thu Jan 01 00:00:00 1970 +0000
78 | | summary: create tag
78 | | summary: create tag
79 | |
79 | |
80 o | changeset: 3:78896eb0e102
80 o | changeset: 3:78896eb0e102
81 | | tag: tag1
81 | | tag: tag1
82 | | user: test
82 | | user: test
83 | | date: Thu Jan 01 00:00:00 1970 +0000
83 | | date: Thu Jan 01 00:00:00 1970 +0000
84 | | summary: move foo
84 | | summary: move foo
85 | |
85 | |
86 o | changeset: 2:8d7c456572ac
86 o | changeset: 2:8d7c456572ac
87 | | bookmark: bookmark1
87 | | bookmark: bookmark1
88 | | user: test
88 | | user: test
89 | | date: Thu Jan 01 00:00:00 1970 +0000
89 | | date: Thu Jan 01 00:00:00 1970 +0000
90 | | summary: modify da/foo
90 | | summary: modify da/foo
91 | |
91 | |
92 o | changeset: 1:f8bbb9024b10
92 o | changeset: 1:f8bbb9024b10
93 |/ user: test
93 |/ user: test
94 | date: Thu Jan 01 00:00:00 1970 +0000
94 | date: Thu Jan 01 00:00:00 1970 +0000
95 | summary: modify foo
95 | summary: modify foo
96 |
96 |
97 o changeset: 0:06e557f3edf6
97 o changeset: 0:06e557f3edf6
98 user: test
98 user: test
99 date: Thu Jan 01 00:00:00 1970 +0000
99 date: Thu Jan 01 00:00:00 1970 +0000
100 summary: initial
100 summary: initial
101
101
102
102
103 $ echo '[web]' >> .hg/hgrc
103 $ echo '[web]' >> .hg/hgrc
104 $ echo 'allow-archive = bz2' >> .hg/hgrc
104 $ echo 'allow-archive = bz2' >> .hg/hgrc
105 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
105 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
106 $ cat hg.pid >> $DAEMON_PIDS
106 $ cat hg.pid >> $DAEMON_PIDS
107
107
108 (Try to keep these in roughly the order they are defined in webcommands.py)
108 (Try to keep these in roughly the order they are defined in webcommands.py)
109
109
110 (log is handled by filelog/ and changelog/ - ignore it)
110 (log is handled by filelog/ and changelog/ - ignore it)
111
111
112 (rawfile/ doesn't use templating - nothing to test)
112 (rawfile/ doesn't use templating - nothing to test)
113
113
114 file/{revision}/{path} shows file revision
114 file/{revision}/{path} shows file revision
115
115
116 $ request json-file/78896eb0e102/foo-new
116 $ request json-file/78896eb0e102/foo-new
117 200 Script output follows
117 200 Script output follows
118
118
119 {
119 {
120 "bookmarks": [],
120 "bookmarks": [],
121 "branch": "default",
121 "branch": "default",
122 "date": [
122 "date": [
123 0.0,
123 0.0,
124 0
124 0
125 ],
125 ],
126 "desc": "move foo",
126 "desc": "move foo",
127 "lines": [
127 "lines": [
128 {
128 {
129 "line": "bar\n"
129 "line": "bar\n"
130 }
130 }
131 ],
131 ],
132 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
132 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
133 "parents": [
133 "parents": [
134 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
134 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
135 ],
135 ],
136 "path": "foo-new",
136 "path": "foo-new",
137 "phase": "public",
137 "phase": "public",
138 "tags": [
138 "tags": [
139 "tag1"
139 "tag1"
140 ],
140 ],
141 "user": "test"
141 "user": "test"
142 }
142 }
143
143
144 file/{revision} shows root directory info
144 file/{revision} shows root directory info
145
145
146 $ request json-file/cc725e08502a
146 $ request json-file/cc725e08502a
147 200 Script output follows
147 200 Script output follows
148
148
149 {
149 {
150 "abspath": "/",
150 "abspath": "/",
151 "bookmarks": [],
151 "bookmarks": [],
152 "directories": [
152 "directories": [
153 {
153 {
154 "abspath": "/da",
154 "abspath": "/da",
155 "basename": "da",
155 "basename": "da",
156 "emptydirs": ""
156 "emptydirs": ""
157 }
157 }
158 ],
158 ],
159 "files": [
159 "files": [
160 {
160 {
161 "abspath": ".hgtags",
161 "abspath": ".hgtags",
162 "basename": ".hgtags",
162 "basename": ".hgtags",
163 "date": [
163 "date": [
164 0.0,
164 0.0,
165 0
165 0
166 ],
166 ],
167 "flags": "",
167 "flags": "",
168 "size": 92
168 "size": 92
169 },
169 },
170 {
170 {
171 "abspath": "foo-new",
171 "abspath": "foo-new",
172 "basename": "foo-new",
172 "basename": "foo-new",
173 "date": [
173 "date": [
174 0.0,
174 0.0,
175 0
175 0
176 ],
176 ],
177 "flags": "",
177 "flags": "",
178 "size": 4
178 "size": 4
179 }
179 }
180 ],
180 ],
181 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
181 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
182 "tags": [
182 "tags": [
183 "tip"
183 "tip"
184 ]
184 ]
185 }
185 }
186
186
187 changelog/ shows information about several changesets
187 changelog/ shows information about several changesets
188
188
189 $ request json-changelog
189 $ request json-changelog
190 200 Script output follows
190 200 Script output follows
191
191
192 {
192 {
193 "changeset_count": 10,
193 "changeset_count": 10,
194 "changesets": [
194 "changesets": [
195 {
195 {
196 "bookmarks": [],
196 "bookmarks": [],
197 "branch": "default",
197 "branch": "default",
198 "date": [
198 "date": [
199 0.0,
199 0.0,
200 0
200 0
201 ],
201 ],
202 "desc": "merge test-branch into default",
202 "desc": "merge test-branch into default",
203 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
203 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
204 "parents": [
204 "parents": [
205 "ceed296fe500c3fac9541e31dad860cb49c89e45",
205 "ceed296fe500c3fac9541e31dad860cb49c89e45",
206 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
206 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
207 ],
207 ],
208 "phase": "draft",
208 "phase": "draft",
209 "tags": [
209 "tags": [
210 "tip"
210 "tip"
211 ],
211 ],
212 "user": "test"
212 "user": "test"
213 },
213 },
214 {
214 {
215 "bookmarks": [],
215 "bookmarks": [],
216 "branch": "test-branch",
216 "branch": "test-branch",
217 "date": [
217 "date": [
218 0.0,
218 0.0,
219 0
219 0
220 ],
220 ],
221 "desc": "another commit in test-branch",
221 "desc": "another commit in test-branch",
222 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
222 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
223 "parents": [
223 "parents": [
224 "6ab967a8ab3489227a83f80e920faa039a71819f"
224 "6ab967a8ab3489227a83f80e920faa039a71819f"
225 ],
225 ],
226 "phase": "draft",
226 "phase": "draft",
227 "tags": [],
227 "tags": [],
228 "user": "test"
228 "user": "test"
229 },
229 },
230 {
230 {
231 "bookmarks": [],
231 "bookmarks": [],
232 "branch": "test-branch",
232 "branch": "test-branch",
233 "date": [
233 "date": [
234 0.0,
234 0.0,
235 0
235 0
236 ],
236 ],
237 "desc": "create test branch",
237 "desc": "create test branch",
238 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
238 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
239 "parents": [
239 "parents": [
240 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
240 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
241 ],
241 ],
242 "phase": "draft",
242 "phase": "draft",
243 "tags": [],
243 "tags": [],
244 "user": "test"
244 "user": "test"
245 },
245 },
246 {
246 {
247 "bookmarks": [
247 "bookmarks": [
248 "bookmark2"
248 "bookmark2"
249 ],
249 ],
250 "branch": "default",
250 "branch": "default",
251 "date": [
251 "date": [
252 0.0,
252 0.0,
253 0
253 0
254 ],
254 ],
255 "desc": "create tag2",
255 "desc": "create tag2",
256 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
256 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
257 "parents": [
257 "parents": [
258 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
258 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
259 ],
259 ],
260 "phase": "draft",
260 "phase": "draft",
261 "tags": [],
261 "tags": [],
262 "user": "test"
262 "user": "test"
263 },
263 },
264 {
264 {
265 "bookmarks": [],
265 "bookmarks": [],
266 "branch": "default",
266 "branch": "default",
267 "date": [
267 "date": [
268 0.0,
268 0.0,
269 0
269 0
270 ],
270 ],
271 "desc": "another commit to da/foo",
271 "desc": "another commit to da/foo",
272 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
272 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
273 "parents": [
273 "parents": [
274 "93a8ce14f89156426b7fa981af8042da53f03aa0"
274 "93a8ce14f89156426b7fa981af8042da53f03aa0"
275 ],
275 ],
276 "phase": "draft",
276 "phase": "draft",
277 "tags": [
277 "tags": [
278 "tag2"
278 "tag2"
279 ],
279 ],
280 "user": "test"
280 "user": "test"
281 },
281 },
282 {
282 {
283 "bookmarks": [],
283 "bookmarks": [],
284 "branch": "default",
284 "branch": "default",
285 "date": [
285 "date": [
286 0.0,
286 0.0,
287 0
287 0
288 ],
288 ],
289 "desc": "create tag",
289 "desc": "create tag",
290 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
290 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
291 "parents": [
291 "parents": [
292 "78896eb0e102174ce9278438a95e12543e4367a7"
292 "78896eb0e102174ce9278438a95e12543e4367a7"
293 ],
293 ],
294 "phase": "public",
294 "phase": "public",
295 "tags": [],
295 "tags": [],
296 "user": "test"
296 "user": "test"
297 },
297 },
298 {
298 {
299 "bookmarks": [],
299 "bookmarks": [],
300 "branch": "default",
300 "branch": "default",
301 "date": [
301 "date": [
302 0.0,
302 0.0,
303 0
303 0
304 ],
304 ],
305 "desc": "move foo",
305 "desc": "move foo",
306 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
306 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
307 "parents": [
307 "parents": [
308 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
308 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
309 ],
309 ],
310 "phase": "public",
310 "phase": "public",
311 "tags": [
311 "tags": [
312 "tag1"
312 "tag1"
313 ],
313 ],
314 "user": "test"
314 "user": "test"
315 },
315 },
316 {
316 {
317 "bookmarks": [
317 "bookmarks": [
318 "bookmark1"
318 "bookmark1"
319 ],
319 ],
320 "branch": "default",
320 "branch": "default",
321 "date": [
321 "date": [
322 0.0,
322 0.0,
323 0
323 0
324 ],
324 ],
325 "desc": "modify da/foo",
325 "desc": "modify da/foo",
326 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
326 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
327 "parents": [
327 "parents": [
328 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
328 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
329 ],
329 ],
330 "phase": "public",
330 "phase": "public",
331 "tags": [],
331 "tags": [],
332 "user": "test"
332 "user": "test"
333 },
333 },
334 {
334 {
335 "bookmarks": [],
335 "bookmarks": [],
336 "branch": "default",
336 "branch": "default",
337 "date": [
337 "date": [
338 0.0,
338 0.0,
339 0
339 0
340 ],
340 ],
341 "desc": "modify foo",
341 "desc": "modify foo",
342 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
342 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
343 "parents": [
343 "parents": [
344 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
344 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
345 ],
345 ],
346 "phase": "public",
346 "phase": "public",
347 "tags": [],
347 "tags": [],
348 "user": "test"
348 "user": "test"
349 },
349 },
350 {
350 {
351 "bookmarks": [],
351 "bookmarks": [],
352 "branch": "default",
352 "branch": "default",
353 "date": [
353 "date": [
354 0.0,
354 0.0,
355 0
355 0
356 ],
356 ],
357 "desc": "initial",
357 "desc": "initial",
358 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
358 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
359 "parents": [],
359 "parents": [],
360 "phase": "public",
360 "phase": "public",
361 "tags": [],
361 "tags": [],
362 "user": "test"
362 "user": "test"
363 }
363 }
364 ],
364 ],
365 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
365 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
366 }
366 }
367
367
368 changelog/{revision} shows information starting at a specific changeset
368 changelog/{revision} shows information starting at a specific changeset
369
369
370 $ request json-changelog/f8bbb9024b10
370 $ request json-changelog/f8bbb9024b10
371 200 Script output follows
371 200 Script output follows
372
372
373 {
373 {
374 "changeset_count": 10,
374 "changeset_count": 10,
375 "changesets": [
375 "changesets": [
376 {
376 {
377 "bookmarks": [],
377 "bookmarks": [],
378 "branch": "default",
378 "branch": "default",
379 "date": [
379 "date": [
380 0.0,
380 0.0,
381 0
381 0
382 ],
382 ],
383 "desc": "modify foo",
383 "desc": "modify foo",
384 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
384 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
385 "parents": [
385 "parents": [
386 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
386 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
387 ],
387 ],
388 "phase": "public",
388 "phase": "public",
389 "tags": [],
389 "tags": [],
390 "user": "test"
390 "user": "test"
391 },
391 },
392 {
392 {
393 "bookmarks": [],
393 "bookmarks": [],
394 "branch": "default",
394 "branch": "default",
395 "date": [
395 "date": [
396 0.0,
396 0.0,
397 0
397 0
398 ],
398 ],
399 "desc": "initial",
399 "desc": "initial",
400 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
400 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
401 "parents": [],
401 "parents": [],
402 "phase": "public",
402 "phase": "public",
403 "tags": [],
403 "tags": [],
404 "user": "test"
404 "user": "test"
405 }
405 }
406 ],
406 ],
407 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
407 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
408 }
408 }
409
409
410 shortlog/ shows information about a set of changesets
410 shortlog/ shows information about a set of changesets
411
411
412 $ request json-shortlog
412 $ request json-shortlog
413 200 Script output follows
413 200 Script output follows
414
414
415 {
415 {
416 "changeset_count": 10,
416 "changeset_count": 10,
417 "changesets": [
417 "changesets": [
418 {
418 {
419 "bookmarks": [],
419 "bookmarks": [],
420 "branch": "default",
420 "branch": "default",
421 "date": [
421 "date": [
422 0.0,
422 0.0,
423 0
423 0
424 ],
424 ],
425 "desc": "merge test-branch into default",
425 "desc": "merge test-branch into default",
426 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
426 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
427 "parents": [
427 "parents": [
428 "ceed296fe500c3fac9541e31dad860cb49c89e45",
428 "ceed296fe500c3fac9541e31dad860cb49c89e45",
429 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
429 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
430 ],
430 ],
431 "phase": "draft",
431 "phase": "draft",
432 "tags": [
432 "tags": [
433 "tip"
433 "tip"
434 ],
434 ],
435 "user": "test"
435 "user": "test"
436 },
436 },
437 {
437 {
438 "bookmarks": [],
438 "bookmarks": [],
439 "branch": "test-branch",
439 "branch": "test-branch",
440 "date": [
440 "date": [
441 0.0,
441 0.0,
442 0
442 0
443 ],
443 ],
444 "desc": "another commit in test-branch",
444 "desc": "another commit in test-branch",
445 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
445 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
446 "parents": [
446 "parents": [
447 "6ab967a8ab3489227a83f80e920faa039a71819f"
447 "6ab967a8ab3489227a83f80e920faa039a71819f"
448 ],
448 ],
449 "phase": "draft",
449 "phase": "draft",
450 "tags": [],
450 "tags": [],
451 "user": "test"
451 "user": "test"
452 },
452 },
453 {
453 {
454 "bookmarks": [],
454 "bookmarks": [],
455 "branch": "test-branch",
455 "branch": "test-branch",
456 "date": [
456 "date": [
457 0.0,
457 0.0,
458 0
458 0
459 ],
459 ],
460 "desc": "create test branch",
460 "desc": "create test branch",
461 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
461 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
462 "parents": [
462 "parents": [
463 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
463 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
464 ],
464 ],
465 "phase": "draft",
465 "phase": "draft",
466 "tags": [],
466 "tags": [],
467 "user": "test"
467 "user": "test"
468 },
468 },
469 {
469 {
470 "bookmarks": [
470 "bookmarks": [
471 "bookmark2"
471 "bookmark2"
472 ],
472 ],
473 "branch": "default",
473 "branch": "default",
474 "date": [
474 "date": [
475 0.0,
475 0.0,
476 0
476 0
477 ],
477 ],
478 "desc": "create tag2",
478 "desc": "create tag2",
479 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
479 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
480 "parents": [
480 "parents": [
481 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
481 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
482 ],
482 ],
483 "phase": "draft",
483 "phase": "draft",
484 "tags": [],
484 "tags": [],
485 "user": "test"
485 "user": "test"
486 },
486 },
487 {
487 {
488 "bookmarks": [],
488 "bookmarks": [],
489 "branch": "default",
489 "branch": "default",
490 "date": [
490 "date": [
491 0.0,
491 0.0,
492 0
492 0
493 ],
493 ],
494 "desc": "another commit to da/foo",
494 "desc": "another commit to da/foo",
495 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
495 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
496 "parents": [
496 "parents": [
497 "93a8ce14f89156426b7fa981af8042da53f03aa0"
497 "93a8ce14f89156426b7fa981af8042da53f03aa0"
498 ],
498 ],
499 "phase": "draft",
499 "phase": "draft",
500 "tags": [
500 "tags": [
501 "tag2"
501 "tag2"
502 ],
502 ],
503 "user": "test"
503 "user": "test"
504 },
504 },
505 {
505 {
506 "bookmarks": [],
506 "bookmarks": [],
507 "branch": "default",
507 "branch": "default",
508 "date": [
508 "date": [
509 0.0,
509 0.0,
510 0
510 0
511 ],
511 ],
512 "desc": "create tag",
512 "desc": "create tag",
513 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
513 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
514 "parents": [
514 "parents": [
515 "78896eb0e102174ce9278438a95e12543e4367a7"
515 "78896eb0e102174ce9278438a95e12543e4367a7"
516 ],
516 ],
517 "phase": "public",
517 "phase": "public",
518 "tags": [],
518 "tags": [],
519 "user": "test"
519 "user": "test"
520 },
520 },
521 {
521 {
522 "bookmarks": [],
522 "bookmarks": [],
523 "branch": "default",
523 "branch": "default",
524 "date": [
524 "date": [
525 0.0,
525 0.0,
526 0
526 0
527 ],
527 ],
528 "desc": "move foo",
528 "desc": "move foo",
529 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
529 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
530 "parents": [
530 "parents": [
531 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
531 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
532 ],
532 ],
533 "phase": "public",
533 "phase": "public",
534 "tags": [
534 "tags": [
535 "tag1"
535 "tag1"
536 ],
536 ],
537 "user": "test"
537 "user": "test"
538 },
538 },
539 {
539 {
540 "bookmarks": [
540 "bookmarks": [
541 "bookmark1"
541 "bookmark1"
542 ],
542 ],
543 "branch": "default",
543 "branch": "default",
544 "date": [
544 "date": [
545 0.0,
545 0.0,
546 0
546 0
547 ],
547 ],
548 "desc": "modify da/foo",
548 "desc": "modify da/foo",
549 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
549 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
550 "parents": [
550 "parents": [
551 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
551 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
552 ],
552 ],
553 "phase": "public",
553 "phase": "public",
554 "tags": [],
554 "tags": [],
555 "user": "test"
555 "user": "test"
556 },
556 },
557 {
557 {
558 "bookmarks": [],
558 "bookmarks": [],
559 "branch": "default",
559 "branch": "default",
560 "date": [
560 "date": [
561 0.0,
561 0.0,
562 0
562 0
563 ],
563 ],
564 "desc": "modify foo",
564 "desc": "modify foo",
565 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
565 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
566 "parents": [
566 "parents": [
567 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
567 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
568 ],
568 ],
569 "phase": "public",
569 "phase": "public",
570 "tags": [],
570 "tags": [],
571 "user": "test"
571 "user": "test"
572 },
572 },
573 {
573 {
574 "bookmarks": [],
574 "bookmarks": [],
575 "branch": "default",
575 "branch": "default",
576 "date": [
576 "date": [
577 0.0,
577 0.0,
578 0
578 0
579 ],
579 ],
580 "desc": "initial",
580 "desc": "initial",
581 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
581 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
582 "parents": [],
582 "parents": [],
583 "phase": "public",
583 "phase": "public",
584 "tags": [],
584 "tags": [],
585 "user": "test"
585 "user": "test"
586 }
586 }
587 ],
587 ],
588 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
588 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
589 }
589 }
590
590
591 shortlog is displayed by default (issue5978)
591 shortlog is displayed by default (issue5978)
592
592
593 $ request '?style=json'
593 $ request '?style=json'
594 200 Script output follows
594 200 Script output follows
595
595
596 {
596 {
597 "changeset_count": 10,
597 "changeset_count": 10,
598 "changesets": [
598 "changesets": [
599 {
599 {
600 "bookmarks": [],
600 "bookmarks": [],
601 "branch": "default",
601 "branch": "default",
602 "date": [
602 "date": [
603 0.0,
603 0.0,
604 0
604 0
605 ],
605 ],
606 "desc": "merge test-branch into default",
606 "desc": "merge test-branch into default",
607 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
607 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
608 "parents": [
608 "parents": [
609 "ceed296fe500c3fac9541e31dad860cb49c89e45",
609 "ceed296fe500c3fac9541e31dad860cb49c89e45",
610 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
610 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
611 ],
611 ],
612 "phase": "draft",
612 "phase": "draft",
613 "tags": [
613 "tags": [
614 "tip"
614 "tip"
615 ],
615 ],
616 "user": "test"
616 "user": "test"
617 },
617 },
618 {
618 {
619 "bookmarks": [],
619 "bookmarks": [],
620 "branch": "test-branch",
620 "branch": "test-branch",
621 "date": [
621 "date": [
622 0.0,
622 0.0,
623 0
623 0
624 ],
624 ],
625 "desc": "another commit in test-branch",
625 "desc": "another commit in test-branch",
626 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
626 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
627 "parents": [
627 "parents": [
628 "6ab967a8ab3489227a83f80e920faa039a71819f"
628 "6ab967a8ab3489227a83f80e920faa039a71819f"
629 ],
629 ],
630 "phase": "draft",
630 "phase": "draft",
631 "tags": [],
631 "tags": [],
632 "user": "test"
632 "user": "test"
633 },
633 },
634 {
634 {
635 "bookmarks": [],
635 "bookmarks": [],
636 "branch": "test-branch",
636 "branch": "test-branch",
637 "date": [
637 "date": [
638 0.0,
638 0.0,
639 0
639 0
640 ],
640 ],
641 "desc": "create test branch",
641 "desc": "create test branch",
642 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
642 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
643 "parents": [
643 "parents": [
644 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
644 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
645 ],
645 ],
646 "phase": "draft",
646 "phase": "draft",
647 "tags": [],
647 "tags": [],
648 "user": "test"
648 "user": "test"
649 },
649 },
650 {
650 {
651 "bookmarks": [
651 "bookmarks": [
652 "bookmark2"
652 "bookmark2"
653 ],
653 ],
654 "branch": "default",
654 "branch": "default",
655 "date": [
655 "date": [
656 0.0,
656 0.0,
657 0
657 0
658 ],
658 ],
659 "desc": "create tag2",
659 "desc": "create tag2",
660 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
660 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
661 "parents": [
661 "parents": [
662 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
662 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
663 ],
663 ],
664 "phase": "draft",
664 "phase": "draft",
665 "tags": [],
665 "tags": [],
666 "user": "test"
666 "user": "test"
667 },
667 },
668 {
668 {
669 "bookmarks": [],
669 "bookmarks": [],
670 "branch": "default",
670 "branch": "default",
671 "date": [
671 "date": [
672 0.0,
672 0.0,
673 0
673 0
674 ],
674 ],
675 "desc": "another commit to da/foo",
675 "desc": "another commit to da/foo",
676 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
676 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
677 "parents": [
677 "parents": [
678 "93a8ce14f89156426b7fa981af8042da53f03aa0"
678 "93a8ce14f89156426b7fa981af8042da53f03aa0"
679 ],
679 ],
680 "phase": "draft",
680 "phase": "draft",
681 "tags": [
681 "tags": [
682 "tag2"
682 "tag2"
683 ],
683 ],
684 "user": "test"
684 "user": "test"
685 },
685 },
686 {
686 {
687 "bookmarks": [],
687 "bookmarks": [],
688 "branch": "default",
688 "branch": "default",
689 "date": [
689 "date": [
690 0.0,
690 0.0,
691 0
691 0
692 ],
692 ],
693 "desc": "create tag",
693 "desc": "create tag",
694 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
694 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
695 "parents": [
695 "parents": [
696 "78896eb0e102174ce9278438a95e12543e4367a7"
696 "78896eb0e102174ce9278438a95e12543e4367a7"
697 ],
697 ],
698 "phase": "public",
698 "phase": "public",
699 "tags": [],
699 "tags": [],
700 "user": "test"
700 "user": "test"
701 },
701 },
702 {
702 {
703 "bookmarks": [],
703 "bookmarks": [],
704 "branch": "default",
704 "branch": "default",
705 "date": [
705 "date": [
706 0.0,
706 0.0,
707 0
707 0
708 ],
708 ],
709 "desc": "move foo",
709 "desc": "move foo",
710 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
710 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
711 "parents": [
711 "parents": [
712 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
712 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
713 ],
713 ],
714 "phase": "public",
714 "phase": "public",
715 "tags": [
715 "tags": [
716 "tag1"
716 "tag1"
717 ],
717 ],
718 "user": "test"
718 "user": "test"
719 },
719 },
720 {
720 {
721 "bookmarks": [
721 "bookmarks": [
722 "bookmark1"
722 "bookmark1"
723 ],
723 ],
724 "branch": "default",
724 "branch": "default",
725 "date": [
725 "date": [
726 0.0,
726 0.0,
727 0
727 0
728 ],
728 ],
729 "desc": "modify da/foo",
729 "desc": "modify da/foo",
730 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
730 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
731 "parents": [
731 "parents": [
732 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
732 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
733 ],
733 ],
734 "phase": "public",
734 "phase": "public",
735 "tags": [],
735 "tags": [],
736 "user": "test"
736 "user": "test"
737 },
737 },
738 {
738 {
739 "bookmarks": [],
739 "bookmarks": [],
740 "branch": "default",
740 "branch": "default",
741 "date": [
741 "date": [
742 0.0,
742 0.0,
743 0
743 0
744 ],
744 ],
745 "desc": "modify foo",
745 "desc": "modify foo",
746 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
746 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
747 "parents": [
747 "parents": [
748 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
748 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
749 ],
749 ],
750 "phase": "public",
750 "phase": "public",
751 "tags": [],
751 "tags": [],
752 "user": "test"
752 "user": "test"
753 },
753 },
754 {
754 {
755 "bookmarks": [],
755 "bookmarks": [],
756 "branch": "default",
756 "branch": "default",
757 "date": [
757 "date": [
758 0.0,
758 0.0,
759 0
759 0
760 ],
760 ],
761 "desc": "initial",
761 "desc": "initial",
762 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
762 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
763 "parents": [],
763 "parents": [],
764 "phase": "public",
764 "phase": "public",
765 "tags": [],
765 "tags": [],
766 "user": "test"
766 "user": "test"
767 }
767 }
768 ],
768 ],
769 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
769 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
770 }
770 }
771
771
772 changeset/ renders the tip changeset
772 changeset/ renders the tip changeset
773
773
774 $ request json-rev
774 $ request json-rev
775 200 Script output follows
775 200 Script output follows
776
776
777 {
777 {
778 "bookmarks": [],
778 "bookmarks": [],
779 "branch": "default",
779 "branch": "default",
780 "date": [
780 "date": [
781 0.0,
781 0.0,
782 0
782 0
783 ],
783 ],
784 "desc": "merge test-branch into default",
784 "desc": "merge test-branch into default",
785 "diff": [],
785 "diff": [],
786 "files": [
786 "files": [
787 {
787 {
788 "file": "foo-new",
788 "file": "foo-new",
789 "status": "modified"
789 "status": "modified"
790 }
790 }
791 ],
791 ],
792 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
792 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
793 "parents": [
793 "parents": [
794 "ceed296fe500c3fac9541e31dad860cb49c89e45",
794 "ceed296fe500c3fac9541e31dad860cb49c89e45",
795 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
795 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
796 ],
796 ],
797 "phase": "draft",
797 "phase": "draft",
798 "tags": [
798 "tags": [
799 "tip"
799 "tip"
800 ],
800 ],
801 "user": "test"
801 "user": "test"
802 }
802 }
803
803
804 changeset/{revision} shows tags
804 changeset/{revision} shows tags
805
805
806 $ request json-rev/78896eb0e102
806 $ request json-rev/78896eb0e102
807 200 Script output follows
807 200 Script output follows
808
808
809 {
809 {
810 "bookmarks": [],
810 "bookmarks": [],
811 "branch": "default",
811 "branch": "default",
812 "date": [
812 "date": [
813 0.0,
813 0.0,
814 0
814 0
815 ],
815 ],
816 "desc": "move foo",
816 "desc": "move foo",
817 "diff": [
817 "diff": [
818 {
818 {
819 "blockno": 1,
819 "blockno": 1,
820 "lines": [
820 "lines": [
821 {
821 {
822 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
822 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
823 "n": 1,
823 "n": 1,
824 "t": "-"
824 "t": "-"
825 },
825 },
826 {
826 {
827 "l": "+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
827 "l": "+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
828 "n": 2,
828 "n": 2,
829 "t": "+"
829 "t": "+"
830 },
830 },
831 {
831 {
832 "l": "@@ -1,1 +0,0 @@\n",
832 "l": "@@ -1,1 +0,0 @@\n",
833 "n": 3,
833 "n": 3,
834 "t": "@"
834 "t": "@"
835 },
835 },
836 {
836 {
837 "l": "-bar\n",
837 "l": "-bar\n",
838 "n": 4,
838 "n": 4,
839 "t": "-"
839 "t": "-"
840 }
840 }
841 ]
841 ]
842 },
842 },
843 {
843 {
844 "blockno": 2,
844 "blockno": 2,
845 "lines": [
845 "lines": [
846 {
846 {
847 "l": "--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
847 "l": "--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
848 "n": 1,
848 "n": 1,
849 "t": "-"
849 "t": "-"
850 },
850 },
851 {
851 {
852 "l": "+++ b/foo-new\tThu Jan 01 00:00:00 1970 +0000\n",
852 "l": "+++ b/foo-new\tThu Jan 01 00:00:00 1970 +0000\n",
853 "n": 2,
853 "n": 2,
854 "t": "+"
854 "t": "+"
855 },
855 },
856 {
856 {
857 "l": "@@ -0,0 +1,1 @@\n",
857 "l": "@@ -0,0 +1,1 @@\n",
858 "n": 3,
858 "n": 3,
859 "t": "@"
859 "t": "@"
860 },
860 },
861 {
861 {
862 "l": "+bar\n",
862 "l": "+bar\n",
863 "n": 4,
863 "n": 4,
864 "t": "+"
864 "t": "+"
865 }
865 }
866 ]
866 ]
867 }
867 }
868 ],
868 ],
869 "files": [
869 "files": [
870 {
870 {
871 "file": "foo",
871 "file": "foo",
872 "status": "removed"
872 "status": "removed"
873 },
873 },
874 {
874 {
875 "file": "foo-new",
875 "file": "foo-new",
876 "status": "added"
876 "status": "added"
877 }
877 }
878 ],
878 ],
879 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
879 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
880 "parents": [
880 "parents": [
881 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
881 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
882 ],
882 ],
883 "phase": "public",
883 "phase": "public",
884 "tags": [
884 "tags": [
885 "tag1"
885 "tag1"
886 ],
886 ],
887 "user": "test"
887 "user": "test"
888 }
888 }
889
889
890 changeset/{revision} shows bookmarks
890 changeset/{revision} shows bookmarks
891
891
892 $ request json-rev/8d7c456572ac
892 $ request json-rev/8d7c456572ac
893 200 Script output follows
893 200 Script output follows
894
894
895 {
895 {
896 "bookmarks": [
896 "bookmarks": [
897 "bookmark1"
897 "bookmark1"
898 ],
898 ],
899 "branch": "default",
899 "branch": "default",
900 "date": [
900 "date": [
901 0.0,
901 0.0,
902 0
902 0
903 ],
903 ],
904 "desc": "modify da/foo",
904 "desc": "modify da/foo",
905 "diff": [
905 "diff": [
906 {
906 {
907 "blockno": 1,
907 "blockno": 1,
908 "lines": [
908 "lines": [
909 {
909 {
910 "l": "--- a/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
910 "l": "--- a/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
911 "n": 1,
911 "n": 1,
912 "t": "-"
912 "t": "-"
913 },
913 },
914 {
914 {
915 "l": "+++ b/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
915 "l": "+++ b/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
916 "n": 2,
916 "n": 2,
917 "t": "+"
917 "t": "+"
918 },
918 },
919 {
919 {
920 "l": "@@ -1,1 +1,1 @@\n",
920 "l": "@@ -1,1 +1,1 @@\n",
921 "n": 3,
921 "n": 3,
922 "t": "@"
922 "t": "@"
923 },
923 },
924 {
924 {
925 "l": "-foo\n",
925 "l": "-foo\n",
926 "n": 4,
926 "n": 4,
927 "t": "-"
927 "t": "-"
928 },
928 },
929 {
929 {
930 "l": "+bar\n",
930 "l": "+bar\n",
931 "n": 5,
931 "n": 5,
932 "t": "+"
932 "t": "+"
933 }
933 }
934 ]
934 ]
935 }
935 }
936 ],
936 ],
937 "files": [
937 "files": [
938 {
938 {
939 "file": "da/foo",
939 "file": "da/foo",
940 "status": "modified"
940 "status": "modified"
941 }
941 }
942 ],
942 ],
943 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
943 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
944 "parents": [
944 "parents": [
945 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
945 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
946 ],
946 ],
947 "phase": "public",
947 "phase": "public",
948 "tags": [],
948 "tags": [],
949 "user": "test"
949 "user": "test"
950 }
950 }
951
951
952 changeset/{revision} shows branches
952 changeset/{revision} shows branches
953
953
954 $ request json-rev/6ab967a8ab34
954 $ request json-rev/6ab967a8ab34
955 200 Script output follows
955 200 Script output follows
956
956
957 {
957 {
958 "bookmarks": [],
958 "bookmarks": [],
959 "branch": "test-branch",
959 "branch": "test-branch",
960 "date": [
960 "date": [
961 0.0,
961 0.0,
962 0
962 0
963 ],
963 ],
964 "desc": "create test branch",
964 "desc": "create test branch",
965 "diff": [
965 "diff": [
966 {
966 {
967 "blockno": 1,
967 "blockno": 1,
968 "lines": [
968 "lines": [
969 {
969 {
970 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
970 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
971 "n": 1,
971 "n": 1,
972 "t": "-"
972 "t": "-"
973 },
973 },
974 {
974 {
975 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
975 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
976 "n": 2,
976 "n": 2,
977 "t": "+"
977 "t": "+"
978 },
978 },
979 {
979 {
980 "l": "@@ -1,1 +1,1 @@\n",
980 "l": "@@ -1,1 +1,1 @@\n",
981 "n": 3,
981 "n": 3,
982 "t": "@"
982 "t": "@"
983 },
983 },
984 {
984 {
985 "l": "-foo\n",
985 "l": "-foo\n",
986 "n": 4,
986 "n": 4,
987 "t": "-"
987 "t": "-"
988 },
988 },
989 {
989 {
990 "l": "+branch\n",
990 "l": "+branch\n",
991 "n": 5,
991 "n": 5,
992 "t": "+"
992 "t": "+"
993 }
993 }
994 ]
994 ]
995 }
995 }
996 ],
996 ],
997 "files": [
997 "files": [
998 {
998 {
999 "file": "foo",
999 "file": "foo",
1000 "status": "modified"
1000 "status": "modified"
1001 }
1001 }
1002 ],
1002 ],
1003 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1003 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1004 "parents": [
1004 "parents": [
1005 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1005 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1006 ],
1006 ],
1007 "phase": "draft",
1007 "phase": "draft",
1008 "tags": [],
1008 "tags": [],
1009 "user": "test"
1009 "user": "test"
1010 }
1010 }
1011
1011
1012 manifest/{revision}/{path} shows info about a directory at a revision
1012 manifest/{revision}/{path} shows info about a directory at a revision
1013
1013
1014 $ request json-manifest/06e557f3edf6/
1014 $ request json-manifest/06e557f3edf6/
1015 200 Script output follows
1015 200 Script output follows
1016
1016
1017 {
1017 {
1018 "abspath": "/",
1018 "abspath": "/",
1019 "bookmarks": [],
1019 "bookmarks": [],
1020 "directories": [
1020 "directories": [
1021 {
1021 {
1022 "abspath": "/da",
1022 "abspath": "/da",
1023 "basename": "da",
1023 "basename": "da",
1024 "emptydirs": ""
1024 "emptydirs": ""
1025 }
1025 }
1026 ],
1026 ],
1027 "files": [
1027 "files": [
1028 {
1028 {
1029 "abspath": "foo",
1029 "abspath": "foo",
1030 "basename": "foo",
1030 "basename": "foo",
1031 "date": [
1031 "date": [
1032 0.0,
1032 0.0,
1033 0
1033 0
1034 ],
1034 ],
1035 "flags": "",
1035 "flags": "",
1036 "size": 4
1036 "size": 4
1037 }
1037 }
1038 ],
1038 ],
1039 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1039 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1040 "tags": []
1040 "tags": []
1041 }
1041 }
1042
1042
1043 tags/ shows tags info
1043 tags/ shows tags info
1044
1044
1045 $ request json-tags
1045 $ request json-tags
1046 200 Script output follows
1046 200 Script output follows
1047
1047
1048 {
1048 {
1049 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1049 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1050 "tags": [
1050 "tags": [
1051 {
1051 {
1052 "date": [
1052 "date": [
1053 0.0,
1053 0.0,
1054 0
1054 0
1055 ],
1055 ],
1056 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1056 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1057 "tag": "tag2"
1057 "tag": "tag2"
1058 },
1058 },
1059 {
1059 {
1060 "date": [
1060 "date": [
1061 0.0,
1061 0.0,
1062 0
1062 0
1063 ],
1063 ],
1064 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1064 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1065 "tag": "tag1"
1065 "tag": "tag1"
1066 }
1066 }
1067 ]
1067 ]
1068 }
1068 }
1069
1069
1070 bookmarks/ shows bookmarks info
1070 bookmarks/ shows bookmarks info
1071
1071
1072 $ request json-bookmarks
1072 $ request json-bookmarks
1073 200 Script output follows
1073 200 Script output follows
1074
1074
1075 {
1075 {
1076 "bookmarks": [
1076 "bookmarks": [
1077 {
1077 {
1078 "bookmark": "bookmark2",
1078 "bookmark": "bookmark2",
1079 "date": [
1079 "date": [
1080 0.0,
1080 0.0,
1081 0
1081 0
1082 ],
1082 ],
1083 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1083 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1084 },
1084 },
1085 {
1085 {
1086 "bookmark": "bookmark1",
1086 "bookmark": "bookmark1",
1087 "date": [
1087 "date": [
1088 0.0,
1088 0.0,
1089 0
1089 0
1090 ],
1090 ],
1091 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1091 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1092 }
1092 }
1093 ],
1093 ],
1094 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1094 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1095 }
1095 }
1096
1096
1097 branches/ shows branches info
1097 branches/ shows branches info
1098
1098
1099 $ request json-branches
1099 $ request json-branches
1100 200 Script output follows
1100 200 Script output follows
1101
1101
1102 {
1102 {
1103 "branches": [
1103 "branches": [
1104 {
1104 {
1105 "branch": "default",
1105 "branch": "default",
1106 "date": [
1106 "date": [
1107 0.0,
1107 0.0,
1108 0
1108 0
1109 ],
1109 ],
1110 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1110 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1111 "status": "open"
1111 "status": "open"
1112 },
1112 },
1113 {
1113 {
1114 "branch": "test-branch",
1114 "branch": "test-branch",
1115 "date": [
1115 "date": [
1116 0.0,
1116 0.0,
1117 0
1117 0
1118 ],
1118 ],
1119 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1119 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1120 "status": "inactive"
1120 "status": "inactive"
1121 }
1121 }
1122 ]
1122 ]
1123 }
1123 }
1124
1124
1125 summary/ shows a summary of repository state
1125 summary/ shows a summary of repository state
1126
1126
1127 $ request json-summary
1127 $ request json-summary
1128 200 Script output follows
1128 200 Script output follows
1129
1129
1130 {
1130 {
1131 "archives": [
1131 "archives": [
1132 {
1132 {
1133 "extension": ".tar.bz2",
1133 "extension": ".tar.bz2",
1134 "node": "tip",
1134 "node": "tip",
1135 "type": "bz2",
1135 "type": "bz2",
1136 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
1136 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
1137 }
1137 }
1138 ],
1138 ],
1139 "bookmarks": [
1139 "bookmarks": [
1140 {
1140 {
1141 "bookmark": "bookmark2",
1141 "bookmark": "bookmark2",
1142 "date": [
1142 "date": [
1143 0.0,
1143 0.0,
1144 0
1144 0
1145 ],
1145 ],
1146 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1146 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1147 },
1147 },
1148 {
1148 {
1149 "bookmark": "bookmark1",
1149 "bookmark": "bookmark1",
1150 "date": [
1150 "date": [
1151 0.0,
1151 0.0,
1152 0
1152 0
1153 ],
1153 ],
1154 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1154 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1155 }
1155 }
1156 ],
1156 ],
1157 "branches": [
1157 "branches": [
1158 {
1158 {
1159 "branch": "default",
1159 "branch": "default",
1160 "date": [
1160 "date": [
1161 0.0,
1161 0.0,
1162 0
1162 0
1163 ],
1163 ],
1164 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1164 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1165 "status": "open"
1165 "status": "open"
1166 },
1166 },
1167 {
1167 {
1168 "branch": "test-branch",
1168 "branch": "test-branch",
1169 "date": [
1169 "date": [
1170 0.0,
1170 0.0,
1171 0
1171 0
1172 ],
1172 ],
1173 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1173 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1174 "status": "inactive"
1174 "status": "inactive"
1175 }
1175 }
1176 ],
1176 ],
1177 "labels": [],
1177 "labels": [],
1178 "lastchange": [
1178 "lastchange": [
1179 0.0,
1179 0.0,
1180 0
1180 0
1181 ],
1181 ],
1182 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1182 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1183 "shortlog": [
1183 "shortlog": [
1184 {
1184 {
1185 "bookmarks": [],
1185 "bookmarks": [],
1186 "branch": "default",
1186 "branch": "default",
1187 "date": [
1187 "date": [
1188 0.0,
1188 0.0,
1189 0
1189 0
1190 ],
1190 ],
1191 "desc": "merge test-branch into default",
1191 "desc": "merge test-branch into default",
1192 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1192 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1193 "parents": [
1193 "parents": [
1194 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1194 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1195 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1195 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1196 ],
1196 ],
1197 "phase": "draft",
1197 "phase": "draft",
1198 "tags": [
1198 "tags": [
1199 "tip"
1199 "tip"
1200 ],
1200 ],
1201 "user": "test"
1201 "user": "test"
1202 },
1202 },
1203 {
1203 {
1204 "bookmarks": [],
1204 "bookmarks": [],
1205 "branch": "test-branch",
1205 "branch": "test-branch",
1206 "date": [
1206 "date": [
1207 0.0,
1207 0.0,
1208 0
1208 0
1209 ],
1209 ],
1210 "desc": "another commit in test-branch",
1210 "desc": "another commit in test-branch",
1211 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1211 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1212 "parents": [
1212 "parents": [
1213 "6ab967a8ab3489227a83f80e920faa039a71819f"
1213 "6ab967a8ab3489227a83f80e920faa039a71819f"
1214 ],
1214 ],
1215 "phase": "draft",
1215 "phase": "draft",
1216 "tags": [],
1216 "tags": [],
1217 "user": "test"
1217 "user": "test"
1218 },
1218 },
1219 {
1219 {
1220 "bookmarks": [],
1220 "bookmarks": [],
1221 "branch": "test-branch",
1221 "branch": "test-branch",
1222 "date": [
1222 "date": [
1223 0.0,
1223 0.0,
1224 0
1224 0
1225 ],
1225 ],
1226 "desc": "create test branch",
1226 "desc": "create test branch",
1227 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1227 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1228 "parents": [
1228 "parents": [
1229 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1229 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1230 ],
1230 ],
1231 "phase": "draft",
1231 "phase": "draft",
1232 "tags": [],
1232 "tags": [],
1233 "user": "test"
1233 "user": "test"
1234 },
1234 },
1235 {
1235 {
1236 "bookmarks": [
1236 "bookmarks": [
1237 "bookmark2"
1237 "bookmark2"
1238 ],
1238 ],
1239 "branch": "default",
1239 "branch": "default",
1240 "date": [
1240 "date": [
1241 0.0,
1241 0.0,
1242 0
1242 0
1243 ],
1243 ],
1244 "desc": "create tag2",
1244 "desc": "create tag2",
1245 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1245 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1246 "parents": [
1246 "parents": [
1247 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1247 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1248 ],
1248 ],
1249 "phase": "draft",
1249 "phase": "draft",
1250 "tags": [],
1250 "tags": [],
1251 "user": "test"
1251 "user": "test"
1252 },
1252 },
1253 {
1253 {
1254 "bookmarks": [],
1254 "bookmarks": [],
1255 "branch": "default",
1255 "branch": "default",
1256 "date": [
1256 "date": [
1257 0.0,
1257 0.0,
1258 0
1258 0
1259 ],
1259 ],
1260 "desc": "another commit to da/foo",
1260 "desc": "another commit to da/foo",
1261 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1261 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1262 "parents": [
1262 "parents": [
1263 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1263 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1264 ],
1264 ],
1265 "phase": "draft",
1265 "phase": "draft",
1266 "tags": [
1266 "tags": [
1267 "tag2"
1267 "tag2"
1268 ],
1268 ],
1269 "user": "test"
1269 "user": "test"
1270 },
1270 },
1271 {
1271 {
1272 "bookmarks": [],
1272 "bookmarks": [],
1273 "branch": "default",
1273 "branch": "default",
1274 "date": [
1274 "date": [
1275 0.0,
1275 0.0,
1276 0
1276 0
1277 ],
1277 ],
1278 "desc": "create tag",
1278 "desc": "create tag",
1279 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1279 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1280 "parents": [
1280 "parents": [
1281 "78896eb0e102174ce9278438a95e12543e4367a7"
1281 "78896eb0e102174ce9278438a95e12543e4367a7"
1282 ],
1282 ],
1283 "phase": "public",
1283 "phase": "public",
1284 "tags": [],
1284 "tags": [],
1285 "user": "test"
1285 "user": "test"
1286 },
1286 },
1287 {
1287 {
1288 "bookmarks": [],
1288 "bookmarks": [],
1289 "branch": "default",
1289 "branch": "default",
1290 "date": [
1290 "date": [
1291 0.0,
1291 0.0,
1292 0
1292 0
1293 ],
1293 ],
1294 "desc": "move foo",
1294 "desc": "move foo",
1295 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1295 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1296 "parents": [
1296 "parents": [
1297 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1297 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1298 ],
1298 ],
1299 "phase": "public",
1299 "phase": "public",
1300 "tags": [
1300 "tags": [
1301 "tag1"
1301 "tag1"
1302 ],
1302 ],
1303 "user": "test"
1303 "user": "test"
1304 },
1304 },
1305 {
1305 {
1306 "bookmarks": [
1306 "bookmarks": [
1307 "bookmark1"
1307 "bookmark1"
1308 ],
1308 ],
1309 "branch": "default",
1309 "branch": "default",
1310 "date": [
1310 "date": [
1311 0.0,
1311 0.0,
1312 0
1312 0
1313 ],
1313 ],
1314 "desc": "modify da/foo",
1314 "desc": "modify da/foo",
1315 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1315 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1316 "parents": [
1316 "parents": [
1317 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1317 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1318 ],
1318 ],
1319 "phase": "public",
1319 "phase": "public",
1320 "tags": [],
1320 "tags": [],
1321 "user": "test"
1321 "user": "test"
1322 },
1322 },
1323 {
1323 {
1324 "bookmarks": [],
1324 "bookmarks": [],
1325 "branch": "default",
1325 "branch": "default",
1326 "date": [
1326 "date": [
1327 0.0,
1327 0.0,
1328 0
1328 0
1329 ],
1329 ],
1330 "desc": "modify foo",
1330 "desc": "modify foo",
1331 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1331 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1332 "parents": [
1332 "parents": [
1333 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1333 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1334 ],
1334 ],
1335 "phase": "public",
1335 "phase": "public",
1336 "tags": [],
1336 "tags": [],
1337 "user": "test"
1337 "user": "test"
1338 },
1338 },
1339 {
1339 {
1340 "bookmarks": [],
1340 "bookmarks": [],
1341 "branch": "default",
1341 "branch": "default",
1342 "date": [
1342 "date": [
1343 0.0,
1343 0.0,
1344 0
1344 0
1345 ],
1345 ],
1346 "desc": "initial",
1346 "desc": "initial",
1347 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1347 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1348 "parents": [],
1348 "parents": [],
1349 "phase": "public",
1349 "phase": "public",
1350 "tags": [],
1350 "tags": [],
1351 "user": "test"
1351 "user": "test"
1352 }
1352 }
1353 ],
1353 ],
1354 "tags": [
1354 "tags": [
1355 {
1355 {
1356 "date": [
1356 "date": [
1357 0.0,
1357 0.0,
1358 0
1358 0
1359 ],
1359 ],
1360 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1360 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1361 "tag": "tag2"
1361 "tag": "tag2"
1362 },
1362 },
1363 {
1363 {
1364 "date": [
1364 "date": [
1365 0.0,
1365 0.0,
1366 0
1366 0
1367 ],
1367 ],
1368 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1368 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1369 "tag": "tag1"
1369 "tag": "tag1"
1370 }
1370 }
1371 ]
1371 ]
1372 }
1372 }
1373
1373
1374 $ request json-changelog?rev=create
1374 $ request json-changelog?rev=create
1375 200 Script output follows
1375 200 Script output follows
1376
1376
1377 {
1377 {
1378 "entries": [
1378 "entries": [
1379 {
1379 {
1380 "bookmarks": [],
1380 "bookmarks": [],
1381 "branch": "test-branch",
1381 "branch": "test-branch",
1382 "date": [
1382 "date": [
1383 0.0,
1383 0.0,
1384 0
1384 0
1385 ],
1385 ],
1386 "desc": "create test branch",
1386 "desc": "create test branch",
1387 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1387 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1388 "parents": [
1388 "parents": [
1389 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1389 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1390 ],
1390 ],
1391 "phase": "draft",
1391 "phase": "draft",
1392 "tags": [],
1392 "tags": [],
1393 "user": "test"
1393 "user": "test"
1394 },
1394 },
1395 {
1395 {
1396 "bookmarks": [
1396 "bookmarks": [
1397 "bookmark2"
1397 "bookmark2"
1398 ],
1398 ],
1399 "branch": "default",
1399 "branch": "default",
1400 "date": [
1400 "date": [
1401 0.0,
1401 0.0,
1402 0
1402 0
1403 ],
1403 ],
1404 "desc": "create tag2",
1404 "desc": "create tag2",
1405 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1405 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1406 "parents": [
1406 "parents": [
1407 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1407 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1408 ],
1408 ],
1409 "phase": "draft",
1409 "phase": "draft",
1410 "tags": [],
1410 "tags": [],
1411 "user": "test"
1411 "user": "test"
1412 },
1412 },
1413 {
1413 {
1414 "bookmarks": [],
1414 "bookmarks": [],
1415 "branch": "default",
1415 "branch": "default",
1416 "date": [
1416 "date": [
1417 0.0,
1417 0.0,
1418 0
1418 0
1419 ],
1419 ],
1420 "desc": "create tag",
1420 "desc": "create tag",
1421 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1421 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1422 "parents": [
1422 "parents": [
1423 "78896eb0e102174ce9278438a95e12543e4367a7"
1423 "78896eb0e102174ce9278438a95e12543e4367a7"
1424 ],
1424 ],
1425 "phase": "public",
1425 "phase": "public",
1426 "tags": [],
1426 "tags": [],
1427 "user": "test"
1427 "user": "test"
1428 }
1428 }
1429 ],
1429 ],
1430 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1430 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1431 "query": "create"
1431 "query": "create"
1432 }
1432 }
1433
1433
1434 filediff/{revision}/{path} shows changes to a file in a revision
1434 filediff/{revision}/{path} shows changes to a file in a revision
1435
1435
1436 $ request json-diff/f8bbb9024b10/foo
1436 $ request json-diff/f8bbb9024b10/foo
1437 200 Script output follows
1437 200 Script output follows
1438
1438
1439 {
1439 {
1440 "author": "test",
1440 "author": "test",
1441 "children": [],
1441 "children": [],
1442 "date": [
1442 "date": [
1443 0.0,
1443 0.0,
1444 0
1444 0
1445 ],
1445 ],
1446 "desc": "modify foo",
1446 "desc": "modify foo",
1447 "diff": [
1447 "diff": [
1448 {
1448 {
1449 "blockno": 1,
1449 "blockno": 1,
1450 "lines": [
1450 "lines": [
1451 {
1451 {
1452 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1452 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1453 "n": 1,
1453 "n": 1,
1454 "t": "-"
1454 "t": "-"
1455 },
1455 },
1456 {
1456 {
1457 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1457 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1458 "n": 2,
1458 "n": 2,
1459 "t": "+"
1459 "t": "+"
1460 },
1460 },
1461 {
1461 {
1462 "l": "@@ -1,1 +1,1 @@\n",
1462 "l": "@@ -1,1 +1,1 @@\n",
1463 "n": 3,
1463 "n": 3,
1464 "t": "@"
1464 "t": "@"
1465 },
1465 },
1466 {
1466 {
1467 "l": "-foo\n",
1467 "l": "-foo\n",
1468 "n": 4,
1468 "n": 4,
1469 "t": "-"
1469 "t": "-"
1470 },
1470 },
1471 {
1471 {
1472 "l": "+bar\n",
1472 "l": "+bar\n",
1473 "n": 5,
1473 "n": 5,
1474 "t": "+"
1474 "t": "+"
1475 }
1475 }
1476 ]
1476 ]
1477 }
1477 }
1478 ],
1478 ],
1479 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1479 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1480 "parents": [
1480 "parents": [
1481 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1481 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1482 ],
1482 ],
1483 "path": "foo"
1483 "path": "foo"
1484 }
1484 }
1485
1485
1486 comparison/{revision}/{path} shows information about before and after for a file
1486 comparison/{revision}/{path} shows information about before and after for a file
1487
1487
1488 $ request json-comparison/f8bbb9024b10/foo
1488 $ request json-comparison/f8bbb9024b10/foo
1489 200 Script output follows
1489 200 Script output follows
1490
1490
1491 {
1491 {
1492 "author": "test",
1492 "author": "test",
1493 "children": [],
1493 "children": [],
1494 "comparison": [
1494 "comparison": [
1495 {
1495 {
1496 "lines": [
1496 "lines": [
1497 {
1497 {
1498 "ll": "foo",
1498 "ll": "foo",
1499 "ln": 1,
1499 "ln": 1,
1500 "rl": "bar",
1500 "rl": "bar",
1501 "rn": 1,
1501 "rn": 1,
1502 "t": "replace"
1502 "t": "replace"
1503 }
1503 }
1504 ]
1504 ]
1505 }
1505 }
1506 ],
1506 ],
1507 "date": [
1507 "date": [
1508 0.0,
1508 0.0,
1509 0
1509 0
1510 ],
1510 ],
1511 "desc": "modify foo",
1511 "desc": "modify foo",
1512 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1512 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1513 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1513 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1514 "parents": [
1514 "parents": [
1515 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1515 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1516 ],
1516 ],
1517 "path": "foo",
1517 "path": "foo",
1518 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1518 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1519 }
1519 }
1520
1520
1521 annotate/{revision}/{path} shows annotations for each line
1521 annotate/{revision}/{path} shows annotations for each line
1522
1522
1523 $ request json-annotate/f8bbb9024b10/foo
1523 $ request json-annotate/f8bbb9024b10/foo
1524 200 Script output follows
1524 200 Script output follows
1525
1525
1526 {
1526 {
1527 "abspath": "foo",
1527 "abspath": "foo",
1528 "annotate": [
1528 "annotate": [
1529 {
1529 {
1530 "abspath": "foo",
1530 "abspath": "foo",
1531 "author": "test",
1531 "author": "test",
1532 "desc": "modify foo",
1532 "desc": "modify foo",
1533 "line": "bar\n",
1533 "line": "bar\n",
1534 "lineno": 1,
1534 "lineno": 1,
1535 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1535 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1536 "revdate": [
1536 "revdate": [
1537 0.0,
1537 0.0,
1538 0
1538 0
1539 ],
1539 ],
1540 "targetline": 1
1540 "targetline": 1
1541 }
1541 }
1542 ],
1542 ],
1543 "author": "test",
1543 "author": "test",
1544 "children": [],
1544 "children": [],
1545 "date": [
1545 "date": [
1546 0.0,
1546 0.0,
1547 0
1547 0
1548 ],
1548 ],
1549 "desc": "modify foo",
1549 "desc": "modify foo",
1550 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1550 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1551 "parents": [
1551 "parents": [
1552 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1552 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1553 ],
1553 ],
1554 "permissions": ""
1554 "permissions": ""
1555 }
1555 }
1556
1556
1557 filelog/{revision}/{path} shows history of a single file
1557 filelog/{revision}/{path} shows history of a single file
1558
1558
1559 $ request json-filelog/f8bbb9024b10/foo
1559 $ request json-filelog/f8bbb9024b10/foo
1560 200 Script output follows
1560 200 Script output follows
1561
1561
1562 {
1562 {
1563 "entries": [
1563 "entries": [
1564 {
1564 {
1565 "bookmarks": [],
1565 "bookmarks": [],
1566 "branch": "default",
1566 "branch": "default",
1567 "date": [
1567 "date": [
1568 0.0,
1568 0.0,
1569 0
1569 0
1570 ],
1570 ],
1571 "desc": "modify foo",
1571 "desc": "modify foo",
1572 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1572 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1573 "parents": [
1573 "parents": [
1574 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1574 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1575 ],
1575 ],
1576 "phase": "public",
1576 "phase": "public",
1577 "tags": [],
1577 "tags": [],
1578 "user": "test"
1578 "user": "test"
1579 },
1579 },
1580 {
1580 {
1581 "bookmarks": [],
1581 "bookmarks": [],
1582 "branch": "default",
1582 "branch": "default",
1583 "date": [
1583 "date": [
1584 0.0,
1584 0.0,
1585 0
1585 0
1586 ],
1586 ],
1587 "desc": "initial",
1587 "desc": "initial",
1588 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1588 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1589 "parents": [],
1589 "parents": [],
1590 "phase": "public",
1590 "phase": "public",
1591 "tags": [],
1591 "tags": [],
1592 "user": "test"
1592 "user": "test"
1593 }
1593 }
1594 ]
1594 ]
1595 }
1595 }
1596
1596
1597 $ request json-filelog/cc725e08502a/da/foo
1597 $ request json-filelog/cc725e08502a/da/foo
1598 200 Script output follows
1598 200 Script output follows
1599
1599
1600 {
1600 {
1601 "entries": [
1601 "entries": [
1602 {
1602 {
1603 "bookmarks": [],
1603 "bookmarks": [],
1604 "branch": "default",
1604 "branch": "default",
1605 "date": [
1605 "date": [
1606 0.0,
1606 0.0,
1607 0
1607 0
1608 ],
1608 ],
1609 "desc": "another commit to da/foo",
1609 "desc": "another commit to da/foo",
1610 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1610 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1611 "parents": [
1611 "parents": [
1612 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1612 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1613 ],
1613 ],
1614 "phase": "draft",
1614 "phase": "draft",
1615 "tags": [
1615 "tags": [
1616 "tag2"
1616 "tag2"
1617 ],
1617 ],
1618 "user": "test"
1618 "user": "test"
1619 },
1619 },
1620 {
1620 {
1621 "bookmarks": [
1621 "bookmarks": [
1622 "bookmark1"
1622 "bookmark1"
1623 ],
1623 ],
1624 "branch": "default",
1624 "branch": "default",
1625 "date": [
1625 "date": [
1626 0.0,
1626 0.0,
1627 0
1627 0
1628 ],
1628 ],
1629 "desc": "modify da/foo",
1629 "desc": "modify da/foo",
1630 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1630 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1631 "parents": [
1631 "parents": [
1632 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1632 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1633 ],
1633 ],
1634 "phase": "public",
1634 "phase": "public",
1635 "tags": [],
1635 "tags": [],
1636 "user": "test"
1636 "user": "test"
1637 },
1637 },
1638 {
1638 {
1639 "bookmarks": [],
1639 "bookmarks": [],
1640 "branch": "default",
1640 "branch": "default",
1641 "date": [
1641 "date": [
1642 0.0,
1642 0.0,
1643 0
1643 0
1644 ],
1644 ],
1645 "desc": "initial",
1645 "desc": "initial",
1646 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1646 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1647 "parents": [],
1647 "parents": [],
1648 "phase": "public",
1648 "phase": "public",
1649 "tags": [],
1649 "tags": [],
1650 "user": "test"
1650 "user": "test"
1651 }
1651 }
1652 ]
1652 ]
1653 }
1653 }
1654
1654
1655 (archive/ doesn't use templating, so ignore it)
1655 (archive/ doesn't use templating, so ignore it)
1656
1656
1657 (static/ doesn't use templating, so ignore it)
1657 (static/ doesn't use templating, so ignore it)
1658
1658
1659 graph/ shows information that can be used to render a graph of the DAG
1659 graph/ shows information that can be used to render a graph of the DAG
1660
1660
1661 $ request json-graph
1661 $ request json-graph
1662 200 Script output follows
1662 200 Script output follows
1663
1663
1664 {
1664 {
1665 "changeset_count": 10,
1665 "changeset_count": 10,
1666 "changesets": [
1666 "changesets": [
1667 {
1667 {
1668 "bookmarks": [],
1668 "bookmarks": [],
1669 "branch": "default",
1669 "branch": "default",
1670 "col": 0,
1670 "col": 0,
1671 "color": 1,
1671 "color": 1,
1672 "date": [
1672 "date": [
1673 0.0,
1673 0.0,
1674 0
1674 0
1675 ],
1675 ],
1676 "desc": "merge test-branch into default",
1676 "desc": "merge test-branch into default",
1677 "edges": [
1677 "edges": [
1678 {
1678 {
1679 "bcolor": "",
1679 "bcolor": "",
1680 "col": 0,
1680 "col": 0,
1681 "color": 1,
1681 "color": 1,
1682 "nextcol": 0,
1682 "nextcol": 0,
1683 "width": -1
1683 "width": -1
1684 },
1684 },
1685 {
1685 {
1686 "bcolor": "",
1686 "bcolor": "",
1687 "col": 0,
1687 "col": 0,
1688 "color": 1,
1688 "color": 1,
1689 "nextcol": 1,
1689 "nextcol": 1,
1690 "width": -1
1690 "width": -1
1691 }
1691 }
1692 ],
1692 ],
1693 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1693 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1694 "parents": [
1694 "parents": [
1695 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1695 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1696 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1696 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1697 ],
1697 ],
1698 "phase": "draft",
1698 "phase": "draft",
1699 "row": 0,
1699 "row": 0,
1700 "tags": [
1700 "tags": [
1701 "tip"
1701 "tip"
1702 ],
1702 ],
1703 "user": "test"
1703 "user": "test"
1704 },
1704 },
1705 {
1705 {
1706 "bookmarks": [],
1706 "bookmarks": [],
1707 "branch": "test-branch",
1707 "branch": "test-branch",
1708 "col": 1,
1708 "col": 1,
1709 "color": 2,
1709 "color": 2,
1710 "date": [
1710 "date": [
1711 0.0,
1711 0.0,
1712 0
1712 0
1713 ],
1713 ],
1714 "desc": "another commit in test-branch",
1714 "desc": "another commit in test-branch",
1715 "edges": [
1715 "edges": [
1716 {
1716 {
1717 "bcolor": "",
1717 "bcolor": "",
1718 "col": 0,
1718 "col": 0,
1719 "color": 1,
1719 "color": 1,
1720 "nextcol": 0,
1720 "nextcol": 0,
1721 "width": -1
1721 "width": -1
1722 },
1722 },
1723 {
1723 {
1724 "bcolor": "",
1724 "bcolor": "",
1725 "col": 1,
1725 "col": 1,
1726 "color": 2,
1726 "color": 2,
1727 "nextcol": 1,
1727 "nextcol": 1,
1728 "width": -1
1728 "width": -1
1729 }
1729 }
1730 ],
1730 ],
1731 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1731 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1732 "parents": [
1732 "parents": [
1733 "6ab967a8ab3489227a83f80e920faa039a71819f"
1733 "6ab967a8ab3489227a83f80e920faa039a71819f"
1734 ],
1734 ],
1735 "phase": "draft",
1735 "phase": "draft",
1736 "row": 1,
1736 "row": 1,
1737 "tags": [],
1737 "tags": [],
1738 "user": "test"
1738 "user": "test"
1739 },
1739 },
1740 {
1740 {
1741 "bookmarks": [],
1741 "bookmarks": [],
1742 "branch": "test-branch",
1742 "branch": "test-branch",
1743 "col": 1,
1743 "col": 1,
1744 "color": 2,
1744 "color": 2,
1745 "date": [
1745 "date": [
1746 0.0,
1746 0.0,
1747 0
1747 0
1748 ],
1748 ],
1749 "desc": "create test branch",
1749 "desc": "create test branch",
1750 "edges": [
1750 "edges": [
1751 {
1751 {
1752 "bcolor": "",
1752 "bcolor": "",
1753 "col": 0,
1753 "col": 0,
1754 "color": 1,
1754 "color": 1,
1755 "nextcol": 0,
1755 "nextcol": 0,
1756 "width": -1
1756 "width": -1
1757 },
1757 },
1758 {
1758 {
1759 "bcolor": "",
1759 "bcolor": "",
1760 "col": 1,
1760 "col": 1,
1761 "color": 2,
1761 "color": 2,
1762 "nextcol": 1,
1762 "nextcol": 1,
1763 "width": -1
1763 "width": -1
1764 }
1764 }
1765 ],
1765 ],
1766 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1766 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1767 "parents": [
1767 "parents": [
1768 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1768 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1769 ],
1769 ],
1770 "phase": "draft",
1770 "phase": "draft",
1771 "row": 2,
1771 "row": 2,
1772 "tags": [],
1772 "tags": [],
1773 "user": "test"
1773 "user": "test"
1774 },
1774 },
1775 {
1775 {
1776 "bookmarks": [
1776 "bookmarks": [
1777 "bookmark2"
1777 "bookmark2"
1778 ],
1778 ],
1779 "branch": "default",
1779 "branch": "default",
1780 "col": 0,
1780 "col": 0,
1781 "color": 1,
1781 "color": 1,
1782 "date": [
1782 "date": [
1783 0.0,
1783 0.0,
1784 0
1784 0
1785 ],
1785 ],
1786 "desc": "create tag2",
1786 "desc": "create tag2",
1787 "edges": [
1787 "edges": [
1788 {
1788 {
1789 "bcolor": "",
1789 "bcolor": "",
1790 "col": 0,
1790 "col": 0,
1791 "color": 1,
1791 "color": 1,
1792 "nextcol": 0,
1792 "nextcol": 0,
1793 "width": -1
1793 "width": -1
1794 },
1794 },
1795 {
1795 {
1796 "bcolor": "",
1796 "bcolor": "",
1797 "col": 1,
1797 "col": 1,
1798 "color": 2,
1798 "color": 2,
1799 "nextcol": 1,
1799 "nextcol": 1,
1800 "width": -1
1800 "width": -1
1801 }
1801 }
1802 ],
1802 ],
1803 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1803 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1804 "parents": [
1804 "parents": [
1805 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1805 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1806 ],
1806 ],
1807 "phase": "draft",
1807 "phase": "draft",
1808 "row": 3,
1808 "row": 3,
1809 "tags": [],
1809 "tags": [],
1810 "user": "test"
1810 "user": "test"
1811 },
1811 },
1812 {
1812 {
1813 "bookmarks": [],
1813 "bookmarks": [],
1814 "branch": "default",
1814 "branch": "default",
1815 "col": 0,
1815 "col": 0,
1816 "color": 1,
1816 "color": 1,
1817 "date": [
1817 "date": [
1818 0.0,
1818 0.0,
1819 0
1819 0
1820 ],
1820 ],
1821 "desc": "another commit to da/foo",
1821 "desc": "another commit to da/foo",
1822 "edges": [
1822 "edges": [
1823 {
1823 {
1824 "bcolor": "",
1824 "bcolor": "",
1825 "col": 0,
1825 "col": 0,
1826 "color": 1,
1826 "color": 1,
1827 "nextcol": 0,
1827 "nextcol": 0,
1828 "width": -1
1828 "width": -1
1829 },
1829 },
1830 {
1830 {
1831 "bcolor": "",
1831 "bcolor": "",
1832 "col": 1,
1832 "col": 1,
1833 "color": 2,
1833 "color": 2,
1834 "nextcol": 1,
1834 "nextcol": 1,
1835 "width": -1
1835 "width": -1
1836 }
1836 }
1837 ],
1837 ],
1838 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1838 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1839 "parents": [
1839 "parents": [
1840 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1840 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1841 ],
1841 ],
1842 "phase": "draft",
1842 "phase": "draft",
1843 "row": 4,
1843 "row": 4,
1844 "tags": [
1844 "tags": [
1845 "tag2"
1845 "tag2"
1846 ],
1846 ],
1847 "user": "test"
1847 "user": "test"
1848 },
1848 },
1849 {
1849 {
1850 "bookmarks": [],
1850 "bookmarks": [],
1851 "branch": "default",
1851 "branch": "default",
1852 "col": 0,
1852 "col": 0,
1853 "color": 1,
1853 "color": 1,
1854 "date": [
1854 "date": [
1855 0.0,
1855 0.0,
1856 0
1856 0
1857 ],
1857 ],
1858 "desc": "create tag",
1858 "desc": "create tag",
1859 "edges": [
1859 "edges": [
1860 {
1860 {
1861 "bcolor": "",
1861 "bcolor": "",
1862 "col": 0,
1862 "col": 0,
1863 "color": 1,
1863 "color": 1,
1864 "nextcol": 0,
1864 "nextcol": 0,
1865 "width": -1
1865 "width": -1
1866 },
1866 },
1867 {
1867 {
1868 "bcolor": "",
1868 "bcolor": "",
1869 "col": 1,
1869 "col": 1,
1870 "color": 2,
1870 "color": 2,
1871 "nextcol": 1,
1871 "nextcol": 1,
1872 "width": -1
1872 "width": -1
1873 }
1873 }
1874 ],
1874 ],
1875 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1875 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1876 "parents": [
1876 "parents": [
1877 "78896eb0e102174ce9278438a95e12543e4367a7"
1877 "78896eb0e102174ce9278438a95e12543e4367a7"
1878 ],
1878 ],
1879 "phase": "public",
1879 "phase": "public",
1880 "row": 5,
1880 "row": 5,
1881 "tags": [],
1881 "tags": [],
1882 "user": "test"
1882 "user": "test"
1883 },
1883 },
1884 {
1884 {
1885 "bookmarks": [],
1885 "bookmarks": [],
1886 "branch": "default",
1886 "branch": "default",
1887 "col": 0,
1887 "col": 0,
1888 "color": 1,
1888 "color": 1,
1889 "date": [
1889 "date": [
1890 0.0,
1890 0.0,
1891 0
1891 0
1892 ],
1892 ],
1893 "desc": "move foo",
1893 "desc": "move foo",
1894 "edges": [
1894 "edges": [
1895 {
1895 {
1896 "bcolor": "",
1896 "bcolor": "",
1897 "col": 0,
1897 "col": 0,
1898 "color": 1,
1898 "color": 1,
1899 "nextcol": 0,
1899 "nextcol": 0,
1900 "width": -1
1900 "width": -1
1901 },
1901 },
1902 {
1902 {
1903 "bcolor": "",
1903 "bcolor": "",
1904 "col": 1,
1904 "col": 1,
1905 "color": 2,
1905 "color": 2,
1906 "nextcol": 1,
1906 "nextcol": 1,
1907 "width": -1
1907 "width": -1
1908 }
1908 }
1909 ],
1909 ],
1910 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1910 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1911 "parents": [
1911 "parents": [
1912 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1912 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1913 ],
1913 ],
1914 "phase": "public",
1914 "phase": "public",
1915 "row": 6,
1915 "row": 6,
1916 "tags": [
1916 "tags": [
1917 "tag1"
1917 "tag1"
1918 ],
1918 ],
1919 "user": "test"
1919 "user": "test"
1920 },
1920 },
1921 {
1921 {
1922 "bookmarks": [
1922 "bookmarks": [
1923 "bookmark1"
1923 "bookmark1"
1924 ],
1924 ],
1925 "branch": "default",
1925 "branch": "default",
1926 "col": 0,
1926 "col": 0,
1927 "color": 1,
1927 "color": 1,
1928 "date": [
1928 "date": [
1929 0.0,
1929 0.0,
1930 0
1930 0
1931 ],
1931 ],
1932 "desc": "modify da/foo",
1932 "desc": "modify da/foo",
1933 "edges": [
1933 "edges": [
1934 {
1934 {
1935 "bcolor": "",
1935 "bcolor": "",
1936 "col": 0,
1936 "col": 0,
1937 "color": 1,
1937 "color": 1,
1938 "nextcol": 0,
1938 "nextcol": 0,
1939 "width": -1
1939 "width": -1
1940 },
1940 },
1941 {
1941 {
1942 "bcolor": "",
1942 "bcolor": "",
1943 "col": 1,
1943 "col": 1,
1944 "color": 2,
1944 "color": 2,
1945 "nextcol": 1,
1945 "nextcol": 1,
1946 "width": -1
1946 "width": -1
1947 }
1947 }
1948 ],
1948 ],
1949 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1949 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1950 "parents": [
1950 "parents": [
1951 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1951 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1952 ],
1952 ],
1953 "phase": "public",
1953 "phase": "public",
1954 "row": 7,
1954 "row": 7,
1955 "tags": [],
1955 "tags": [],
1956 "user": "test"
1956 "user": "test"
1957 },
1957 },
1958 {
1958 {
1959 "bookmarks": [],
1959 "bookmarks": [],
1960 "branch": "default",
1960 "branch": "default",
1961 "col": 0,
1961 "col": 0,
1962 "color": 1,
1962 "color": 1,
1963 "date": [
1963 "date": [
1964 0.0,
1964 0.0,
1965 0
1965 0
1966 ],
1966 ],
1967 "desc": "modify foo",
1967 "desc": "modify foo",
1968 "edges": [
1968 "edges": [
1969 {
1969 {
1970 "bcolor": "",
1970 "bcolor": "",
1971 "col": 0,
1971 "col": 0,
1972 "color": 1,
1972 "color": 1,
1973 "nextcol": 0,
1973 "nextcol": 0,
1974 "width": -1
1974 "width": -1
1975 },
1975 },
1976 {
1976 {
1977 "bcolor": "",
1977 "bcolor": "",
1978 "col": 1,
1978 "col": 1,
1979 "color": 2,
1979 "color": 2,
1980 "nextcol": 0,
1980 "nextcol": 0,
1981 "width": -1
1981 "width": -1
1982 }
1982 }
1983 ],
1983 ],
1984 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1984 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1985 "parents": [
1985 "parents": [
1986 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1986 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1987 ],
1987 ],
1988 "phase": "public",
1988 "phase": "public",
1989 "row": 8,
1989 "row": 8,
1990 "tags": [],
1990 "tags": [],
1991 "user": "test"
1991 "user": "test"
1992 },
1992 },
1993 {
1993 {
1994 "bookmarks": [],
1994 "bookmarks": [],
1995 "branch": "default",
1995 "branch": "default",
1996 "col": 0,
1996 "col": 0,
1997 "color": 2,
1997 "color": 2,
1998 "date": [
1998 "date": [
1999 0.0,
1999 0.0,
2000 0
2000 0
2001 ],
2001 ],
2002 "desc": "initial",
2002 "desc": "initial",
2003 "edges": [],
2003 "edges": [],
2004 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
2004 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
2005 "parents": [],
2005 "parents": [],
2006 "phase": "public",
2006 "phase": "public",
2007 "row": 9,
2007 "row": 9,
2008 "tags": [],
2008 "tags": [],
2009 "user": "test"
2009 "user": "test"
2010 }
2010 }
2011 ],
2011 ],
2012 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
2012 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
2013 }
2013 }
2014
2014
2015 help/ shows help topics
2015 help/ shows help topics
2016
2016
2017 $ request json-help
2017 $ request json-help
2018 200 Script output follows
2018 200 Script output follows
2019
2019
2020 {
2020 {
2021 "earlycommands": [
2021 "earlycommands": [
2022 {
2022 {
2023 "summary": "abort an unfinished operation (EXPERIMENTAL)",
2023 "summary": "abort an unfinished operation (EXPERIMENTAL)",
2024 "topic": "abort"
2024 "topic": "abort"
2025 },
2025 },
2026 {
2026 {
2027 "summary": "add the specified files on the next commit",
2027 "summary": "add the specified files on the next commit",
2028 "topic": "add"
2028 "topic": "add"
2029 },
2029 },
2030 {
2030 {
2031 "summary": "show changeset information by line for each file",
2031 "summary": "show changeset information by line for each file",
2032 "topic": "annotate"
2032 "topic": "annotate"
2033 },
2033 },
2034 {
2034 {
2035 "summary": "make a copy of an existing repository",
2035 "summary": "make a copy of an existing repository",
2036 "topic": "clone"
2036 "topic": "clone"
2037 },
2037 },
2038 {
2038 {
2039 "summary": "commit the specified files or all outstanding changes",
2039 "summary": "commit the specified files or all outstanding changes",
2040 "topic": "commit"
2040 "topic": "commit"
2041 },
2041 },
2042 {
2042 {
2043 "summary": "resumes an interrupted operation (EXPERIMENTAL)",
2043 "summary": "resumes an interrupted operation (EXPERIMENTAL)",
2044 "topic": "continue"
2044 "topic": "continue"
2045 },
2045 },
2046 {
2046 {
2047 "summary": "diff repository (or selected files)",
2047 "summary": "diff repository (or selected files)",
2048 "topic": "diff"
2048 "topic": "diff"
2049 },
2049 },
2050 {
2050 {
2051 "summary": "dump the header and diffs for one or more changesets",
2051 "summary": "dump the header and diffs for one or more changesets",
2052 "topic": "export"
2052 "topic": "export"
2053 },
2053 },
2054 {
2054 {
2055 "summary": "forget the specified files on the next commit",
2055 "summary": "forget the specified files on the next commit",
2056 "topic": "forget"
2056 "topic": "forget"
2057 },
2057 },
2058 {
2058 {
2059 "summary": "create a new repository in the given directory",
2059 "summary": "create a new repository in the given directory",
2060 "topic": "init"
2060 "topic": "init"
2061 },
2061 },
2062 {
2062 {
2063 "summary": "show revision history of entire repository or files",
2063 "summary": "show revision history of entire repository or files",
2064 "topic": "log"
2064 "topic": "log"
2065 },
2065 },
2066 {
2066 {
2067 "summary": "merge another revision into working directory",
2067 "summary": "merge another revision into working directory",
2068 "topic": "merge"
2068 "topic": "merge"
2069 },
2069 },
2070 {
2070 {
2071 "summary": "pull changes from the specified source",
2071 "summary": "pull changes from the specified source",
2072 "topic": "pull"
2072 "topic": "pull"
2073 },
2073 },
2074 {
2074 {
2075 "summary": "push changes to the specified destination",
2075 "summary": "push changes to the specified destination",
2076 "topic": "push"
2076 "topic": "push"
2077 },
2077 },
2078 {
2078 {
2079 "summary": "remove the specified files on the next commit",
2079 "summary": "remove the specified files on the next commit",
2080 "topic": "remove"
2080 "topic": "remove"
2081 },
2081 },
2082 {
2082 {
2083 "summary": "start stand-alone webserver",
2083 "summary": "start stand-alone webserver",
2084 "topic": "serve"
2084 "topic": "serve"
2085 },
2085 },
2086 {
2086 {
2087 "summary": "show changed files in the working directory",
2087 "summary": "show changed files in the working directory",
2088 "topic": "status"
2088 "topic": "status"
2089 },
2089 },
2090 {
2090 {
2091 "summary": "summarize working directory state",
2091 "summary": "summarize working directory state",
2092 "topic": "summary"
2092 "topic": "summary"
2093 },
2093 },
2094 {
2094 {
2095 "summary": "update working directory (or switch revisions)",
2095 "summary": "update working directory (or switch revisions)",
2096 "topic": "update"
2096 "topic": "update"
2097 }
2097 }
2098 ],
2098 ],
2099 "othercommands": [
2099 "othercommands": [
2100 {
2100 {
2101 "summary": "add all new files, delete all missing files",
2101 "summary": "add all new files, delete all missing files",
2102 "topic": "addremove"
2102 "topic": "addremove"
2103 },
2103 },
2104 {
2104 {
2105 "summary": "create an unversioned archive of a repository revision",
2105 "summary": "create an unversioned archive of a repository revision",
2106 "topic": "archive"
2106 "topic": "archive"
2107 },
2107 },
2108 {
2108 {
2109 "summary": "reverse effect of earlier changeset",
2109 "summary": "reverse effect of earlier changeset",
2110 "topic": "backout"
2110 "topic": "backout"
2111 },
2111 },
2112 {
2112 {
2113 "summary": "subdivision search of changesets",
2113 "summary": "subdivision search of changesets",
2114 "topic": "bisect"
2114 "topic": "bisect"
2115 },
2115 },
2116 {
2116 {
2117 "summary": "create a new bookmark or list existing bookmarks",
2117 "summary": "create a new bookmark or list existing bookmarks",
2118 "topic": "bookmarks"
2118 "topic": "bookmarks"
2119 },
2119 },
2120 {
2120 {
2121 "summary": "set or show the current branch name",
2121 "summary": "set or show the current branch name",
2122 "topic": "branch"
2122 "topic": "branch"
2123 },
2123 },
2124 {
2124 {
2125 "summary": "list repository named branches",
2125 "summary": "list repository named branches",
2126 "topic": "branches"
2126 "topic": "branches"
2127 },
2127 },
2128 {
2128 {
2129 "summary": "create a bundle file",
2129 "summary": "create a bundle file",
2130 "topic": "bundle"
2130 "topic": "bundle"
2131 },
2131 },
2132 {
2132 {
2133 "summary": "output the current or given revision of files",
2133 "summary": "output the current or given revision of files",
2134 "topic": "cat"
2134 "topic": "cat"
2135 },
2135 },
2136 {
2136 {
2137 "summary": "show combined config settings from all hgrc files",
2137 "summary": "show combined config settings from all hgrc files",
2138 "topic": "config"
2138 "topic": "config"
2139 },
2139 },
2140 {
2140 {
2141 "summary": "mark files as copied for the next commit",
2141 "summary": "mark files as copied for the next commit",
2142 "topic": "copy"
2142 "topic": "copy"
2143 },
2143 },
2144 {
2144 {
2145 "summary": "list tracked files",
2145 "summary": "list tracked files",
2146 "topic": "files"
2146 "topic": "files"
2147 },
2147 },
2148 {
2148 {
2149 "summary": "copy changes from other branches onto the current branch",
2149 "summary": "copy changes from other branches onto the current branch",
2150 "topic": "graft"
2150 "topic": "graft"
2151 },
2151 },
2152 {
2152 {
2153 "summary": "search for a pattern in specified files",
2153 "summary": "search for a pattern in specified files",
2154 "topic": "grep"
2154 "topic": "grep"
2155 },
2155 },
2156 {
2156 {
2157 "summary": "show branch heads",
2157 "summary": "show branch heads",
2158 "topic": "heads"
2158 "topic": "heads"
2159 },
2159 },
2160 {
2160 {
2161 "summary": "show help for a given topic or a help overview",
2161 "summary": "show help for a given topic or a help overview",
2162 "topic": "help"
2162 "topic": "help"
2163 },
2163 },
2164 {
2164 {
2165 "summary": "identify the working directory or specified revision",
2165 "summary": "identify the working directory or specified revision",
2166 "topic": "identify"
2166 "topic": "identify"
2167 },
2167 },
2168 {
2168 {
2169 "summary": "import an ordered set of patches",
2169 "summary": "import an ordered set of patches",
2170 "topic": "import"
2170 "topic": "import"
2171 },
2171 },
2172 {
2172 {
2173 "summary": "show new changesets found in source",
2173 "summary": "show new changesets found in source",
2174 "topic": "incoming"
2174 "topic": "incoming"
2175 },
2175 },
2176 {
2176 {
2177 "summary": "output the current or given revision of the project manifest",
2177 "summary": "output the current or given revision of the project manifest",
2178 "topic": "manifest"
2178 "topic": "manifest"
2179 },
2179 },
2180 {
2180 {
2181 "summary": "show changesets not found in the destination",
2181 "summary": "show changesets not found in the destination",
2182 "topic": "outgoing"
2182 "topic": "outgoing"
2183 },
2183 },
2184 {
2184 {
2185 "summary": "show aliases for remote repositories",
2185 "summary": "show aliases for remote repositories",
2186 "topic": "paths"
2186 "topic": "paths"
2187 },
2187 },
2188 {
2188 {
2189 "summary": "set or show the current phase name",
2189 "summary": "set or show the current phase name",
2190 "topic": "phase"
2190 "topic": "phase"
2191 },
2191 },
2192 {
2192 {
2193 "summary": "removes files not tracked by Mercurial",
2193 "summary": "removes files not tracked by Mercurial",
2194 "topic": "purge"
2194 "topic": "purge"
2195 },
2195 },
2196 {
2196 {
2197 "summary": "roll back an interrupted transaction",
2197 "summary": "roll back an interrupted transaction",
2198 "topic": "recover"
2198 "topic": "recover"
2199 },
2199 },
2200 {
2200 {
2201 "summary": "rename files; equivalent of copy + remove",
2201 "summary": "rename files; equivalent of copy + remove",
2202 "topic": "rename"
2202 "topic": "rename"
2203 },
2203 },
2204 {
2204 {
2205 "summary": "redo merges or set/view the merge status of files",
2205 "summary": "redo merges or set/view the merge status of files",
2206 "topic": "resolve"
2206 "topic": "resolve"
2207 },
2207 },
2208 {
2208 {
2209 "summary": "restore files to their checkout state",
2209 "summary": "restore files to their checkout state",
2210 "topic": "revert"
2210 "topic": "revert"
2211 },
2211 },
2212 {
2212 {
2213 "summary": "print the root (top) of the current working directory",
2213 "summary": "print the root (top) of the current working directory",
2214 "topic": "root"
2214 "topic": "root"
2215 },
2215 },
2216 {
2216 {
2217 "summary": "save and set aside changes from the working directory",
2217 "summary": "save and set aside changes from the working directory",
2218 "topic": "shelve"
2218 "topic": "shelve"
2219 },
2219 },
2220 {
2220 {
2221 "summary": "add one or more tags for the current or given revision",
2221 "summary": "add one or more tags for the current or given revision",
2222 "topic": "tag"
2222 "topic": "tag"
2223 },
2223 },
2224 {
2224 {
2225 "summary": "list repository tags",
2225 "summary": "list repository tags",
2226 "topic": "tags"
2226 "topic": "tags"
2227 },
2227 },
2228 {
2228 {
2229 "summary": "apply one or more bundle files",
2229 "summary": "apply one or more bundle files",
2230 "topic": "unbundle"
2230 "topic": "unbundle"
2231 },
2231 },
2232 {
2232 {
2233 "summary": "restore a shelved change to the working directory",
2233 "summary": "restore a shelved change to the working directory",
2234 "topic": "unshelve"
2234 "topic": "unshelve"
2235 },
2235 },
2236 {
2236 {
2237 "summary": "verify the integrity of the repository",
2237 "summary": "verify the integrity of the repository",
2238 "topic": "verify"
2238 "topic": "verify"
2239 },
2239 },
2240 {
2240 {
2241 "summary": "output version and copyright information",
2241 "summary": "output version and copyright information",
2242 "topic": "version"
2242 "topic": "version"
2243 }
2243 }
2244 ],
2244 ],
2245 "topics": [
2245 "topics": [
2246 {
2246 {
2247 "summary": "Bundle File Formats",
2247 "summary": "Bundle File Formats",
2248 "topic": "bundlespec"
2248 "topic": "bundlespec"
2249 },
2249 },
2250 {
2250 {
2251 "summary": "Colorizing Outputs",
2251 "summary": "Colorizing Outputs",
2252 "topic": "color"
2252 "topic": "color"
2253 },
2253 },
2254 {
2254 {
2255 "summary": "Configuration Files",
2255 "summary": "Configuration Files",
2256 "topic": "config"
2256 "topic": "config"
2257 },
2257 },
2258 {
2258 {
2259 "summary": "Date Formats",
2259 "summary": "Date Formats",
2260 "topic": "dates"
2260 "topic": "dates"
2261 },
2261 },
2262 {
2262 {
2263 "summary": "Deprecated Features",
2263 "summary": "Deprecated Features",
2264 "topic": "deprecated"
2264 "topic": "deprecated"
2265 },
2265 },
2266 {
2266 {
2267 "summary": "Diff Formats",
2267 "summary": "Diff Formats",
2268 "topic": "diffs"
2268 "topic": "diffs"
2269 },
2269 },
2270 {
2270 {
2271 "summary": "Environment Variables",
2271 "summary": "Environment Variables",
2272 "topic": "environment"
2272 "topic": "environment"
2273 },
2273 },
2274 {
2274 {
2275 "summary": "Safely rewriting history (EXPERIMENTAL)",
2275 "summary": "Safely rewriting history (EXPERIMENTAL)",
2276 "topic": "evolution"
2276 "topic": "evolution"
2277 },
2277 },
2278 {
2278 {
2279 "summary": "Using Additional Features",
2279 "summary": "Using Additional Features",
2280 "topic": "extensions"
2280 "topic": "extensions"
2281 },
2281 },
2282 {
2282 {
2283 "summary": "Specifying File Sets",
2283 "summary": "Specifying File Sets",
2284 "topic": "filesets"
2284 "topic": "filesets"
2285 },
2285 },
2286 {
2286 {
2287 "summary": "Command-line flags",
2287 "summary": "Command-line flags",
2288 "topic": "flags"
2288 "topic": "flags"
2289 },
2289 },
2290 {
2290 {
2291 "summary": "Glossary",
2291 "summary": "Glossary",
2292 "topic": "glossary"
2292 "topic": "glossary"
2293 },
2293 },
2294 {
2294 {
2295 "summary": "Syntax for Mercurial Ignore Files",
2295 "summary": "Syntax for Mercurial Ignore Files",
2296 "topic": "hgignore"
2296 "topic": "hgignore"
2297 },
2297 },
2298 {
2298 {
2299 "summary": "Configuring hgweb",
2299 "summary": "Configuring hgweb",
2300 "topic": "hgweb"
2300 "topic": "hgweb"
2301 },
2301 },
2302 {
2302 {
2303 "summary": "Technical implementation topics",
2303 "summary": "Technical implementation topics",
2304 "topic": "internals"
2304 "topic": "internals"
2305 },
2305 },
2306 {
2306 {
2307 "summary": "Merge Tools",
2307 "summary": "Merge Tools",
2308 "topic": "merge-tools"
2308 "topic": "merge-tools"
2309 },
2309 },
2310 {
2310 {
2311 "summary": "Pager Support",
2311 "summary": "Pager Support",
2312 "topic": "pager"
2312 "topic": "pager"
2313 },
2313 },
2314 {
2314 {
2315 "summary": "File Name Patterns",
2315 "summary": "File Name Patterns",
2316 "topic": "patterns"
2316 "topic": "patterns"
2317 },
2317 },
2318 {
2318 {
2319 "summary": "Working with Phases",
2319 "summary": "Working with Phases",
2320 "topic": "phases"
2320 "topic": "phases"
2321 },
2321 },
2322 {
2322 {
2323 "summary": "Specifying Revisions",
2323 "summary": "Specifying Revisions",
2324 "topic": "revisions"
2324 "topic": "revisions"
2325 },
2325 },
2326 {
2326 {
2327 "summary": "Rust in Mercurial",
2328 "topic": "rust"
2329 },
2330 {
2327 "summary": "Using Mercurial from scripts and automation",
2331 "summary": "Using Mercurial from scripts and automation",
2328 "topic": "scripting"
2332 "topic": "scripting"
2329 },
2333 },
2330 {
2334 {
2331 "summary": "Subrepositories",
2335 "summary": "Subrepositories",
2332 "topic": "subrepos"
2336 "topic": "subrepos"
2333 },
2337 },
2334 {
2338 {
2335 "summary": "Template Usage",
2339 "summary": "Template Usage",
2336 "topic": "templating"
2340 "topic": "templating"
2337 },
2341 },
2338 {
2342 {
2339 "summary": "URL Paths",
2343 "summary": "URL Paths",
2340 "topic": "urls"
2344 "topic": "urls"
2341 }
2345 }
2342 ]
2346 ]
2343 }
2347 }
2344
2348
2345 help/{topic} shows an individual help topic
2349 help/{topic} shows an individual help topic
2346
2350
2347 $ request json-help/phases
2351 $ request json-help/phases
2348 200 Script output follows
2352 200 Script output follows
2349
2353
2350 {
2354 {
2351 "rawdoc": "Working with Phases\n*", (glob)
2355 "rawdoc": "Working with Phases\n*", (glob)
2352 "topic": "phases"
2356 "topic": "phases"
2353 }
2357 }
2354
2358
2355 Error page shouldn't crash
2359 Error page shouldn't crash
2356
2360
2357 $ request json-changeset/deadbeef
2361 $ request json-changeset/deadbeef
2358 404 Not Found
2362 404 Not Found
2359
2363
2360 {
2364 {
2361 "error": "unknown revision 'deadbeef'"
2365 "error": "unknown revision 'deadbeef'"
2362 }
2366 }
2363 [1]
2367 [1]
2364
2368
2365 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2369 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2366
2370
2367 $ echo foo >> da/foo
2371 $ echo foo >> da/foo
2368 >>> open('msg', 'wb').write(b'\x94\x5c\x0a') and None
2372 >>> open('msg', 'wb').write(b'\x94\x5c\x0a') and None
2369 $ HGENCODING=cp932 hg ci -l msg
2373 $ HGENCODING=cp932 hg ci -l msg
2370
2374
2371 Commit message with null character
2375 Commit message with null character
2372
2376
2373 $ echo foo >> da/foo
2377 $ echo foo >> da/foo
2374 >>> open('msg', 'wb').write(b'commit with null character: \0\n') and None
2378 >>> open('msg', 'wb').write(b'commit with null character: \0\n') and None
2375 $ hg ci -l msg
2379 $ hg ci -l msg
2376 $ rm msg
2380 $ rm msg
2377
2381
2378 Stop and restart with HGENCODING=cp932
2382 Stop and restart with HGENCODING=cp932
2379
2383
2380 $ killdaemons.py
2384 $ killdaemons.py
2381 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2385 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2382 > -A access.log -E error.log
2386 > -A access.log -E error.log
2383 $ cat hg.pid >> $DAEMON_PIDS
2387 $ cat hg.pid >> $DAEMON_PIDS
2384
2388
2385 Test json escape of multibyte characters
2389 Test json escape of multibyte characters
2386
2390
2387 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2391 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2388 "desc": "commit with null character: \u0000",
2392 "desc": "commit with null character: \u0000",
2389 "desc": "\u80fd",
2393 "desc": "\u80fd",
General Comments 0
You need to be logged in to leave comments. Login now