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