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