##// END OF EJS Templates
help: filter extension commands
timeless -
r27387:dfab0afd default
parent child Browse files
Show More
@@ -1,578 +1,580 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 i18n import gettext, _
8 from i18n import gettext, _
9 import itertools, os, textwrap
9 import itertools, os, textwrap
10 import error
10 import error
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
12 import templater
12 import templater
13 import encoding, util, minirst
13 import encoding, util, minirst
14 import cmdutil
14 import cmdutil
15 import hgweb.webcommands as webcommands
15 import hgweb.webcommands as webcommands
16
16
17 _exclkeywords = [
17 _exclkeywords = [
18 "(DEPRECATED)",
18 "(DEPRECATED)",
19 "(EXPERIMENTAL)",
19 "(EXPERIMENTAL)",
20 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
20 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
21 _("(DEPRECATED)"),
21 _("(DEPRECATED)"),
22 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
22 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
23 _("(EXPERIMENTAL)"),
23 _("(EXPERIMENTAL)"),
24 ]
24 ]
25
25
26 def listexts(header, exts, indent=1, showdeprecated=False):
26 def listexts(header, exts, indent=1, showdeprecated=False):
27 '''return a text listing of the given extensions'''
27 '''return a text listing of the given extensions'''
28 rst = []
28 rst = []
29 if exts:
29 if exts:
30 for name, desc in sorted(exts.iteritems()):
30 for name, desc in sorted(exts.iteritems()):
31 if not showdeprecated and any(w in desc for w in _exclkeywords):
31 if not showdeprecated and any(w in desc for w in _exclkeywords):
32 continue
32 continue
33 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
33 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
34 if rst:
34 if rst:
35 rst.insert(0, '\n%s\n\n' % header)
35 rst.insert(0, '\n%s\n\n' % header)
36 return rst
36 return rst
37
37
38 def extshelp(ui):
38 def extshelp(ui):
39 rst = loaddoc('extensions')(ui).splitlines(True)
39 rst = loaddoc('extensions')(ui).splitlines(True)
40 rst.extend(listexts(
40 rst.extend(listexts(
41 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
41 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
42 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
42 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
43 doc = ''.join(rst)
43 doc = ''.join(rst)
44 return doc
44 return doc
45
45
46 def optrst(header, options, verbose):
46 def optrst(header, options, verbose):
47 data = []
47 data = []
48 multioccur = False
48 multioccur = False
49 for option in options:
49 for option in options:
50 if len(option) == 5:
50 if len(option) == 5:
51 shortopt, longopt, default, desc, optlabel = option
51 shortopt, longopt, default, desc, optlabel = option
52 else:
52 else:
53 shortopt, longopt, default, desc = option
53 shortopt, longopt, default, desc = option
54 optlabel = _("VALUE") # default label
54 optlabel = _("VALUE") # default label
55
55
56 if not verbose and any(w in desc for w in _exclkeywords):
56 if not verbose and any(w in desc for w in _exclkeywords):
57 continue
57 continue
58
58
59 so = ''
59 so = ''
60 if shortopt:
60 if shortopt:
61 so = '-' + shortopt
61 so = '-' + shortopt
62 lo = '--' + longopt
62 lo = '--' + longopt
63 if default:
63 if default:
64 desc += _(" (default: %s)") % default
64 desc += _(" (default: %s)") % default
65
65
66 if isinstance(default, list):
66 if isinstance(default, list):
67 lo += " %s [+]" % optlabel
67 lo += " %s [+]" % optlabel
68 multioccur = True
68 multioccur = True
69 elif (default is not None) and not isinstance(default, bool):
69 elif (default is not None) and not isinstance(default, bool):
70 lo += " %s" % optlabel
70 lo += " %s" % optlabel
71
71
72 data.append((so, lo, desc))
72 data.append((so, lo, desc))
73
73
74 if multioccur:
74 if multioccur:
75 header += (_(" ([+] can be repeated)"))
75 header += (_(" ([+] can be repeated)"))
76
76
77 rst = ['\n%s:\n\n' % header]
77 rst = ['\n%s:\n\n' % header]
78 rst.extend(minirst.maketable(data, 1))
78 rst.extend(minirst.maketable(data, 1))
79
79
80 return ''.join(rst)
80 return ''.join(rst)
81
81
82 def indicateomitted(rst, omitted, notomitted=None):
82 def indicateomitted(rst, omitted, notomitted=None):
83 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
83 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
84 if notomitted:
84 if notomitted:
85 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
85 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
86
86
87 def filtercmd(ui, cmd, kw, doc):
87 def filtercmd(ui, cmd, kw, doc):
88 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
88 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
89 return True
89 return True
90 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
90 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
91 return True
91 return True
92 return False
92 return False
93
93
94 def topicmatch(ui, kw):
94 def topicmatch(ui, kw):
95 """Return help topics matching kw.
95 """Return help topics matching kw.
96
96
97 Returns {'section': [(name, summary), ...], ...} where section is
97 Returns {'section': [(name, summary), ...], ...} where section is
98 one of topics, commands, extensions, or extensioncommands.
98 one of topics, commands, extensions, or extensioncommands.
99 """
99 """
100 kw = encoding.lower(kw)
100 kw = encoding.lower(kw)
101 def lowercontains(container):
101 def lowercontains(container):
102 return kw in encoding.lower(container) # translated in helptable
102 return kw in encoding.lower(container) # translated in helptable
103 results = {'topics': [],
103 results = {'topics': [],
104 'commands': [],
104 'commands': [],
105 'extensions': [],
105 'extensions': [],
106 'extensioncommands': [],
106 'extensioncommands': [],
107 }
107 }
108 for names, header, doc in helptable:
108 for names, header, doc in helptable:
109 # Old extensions may use a str as doc.
109 # Old extensions may use a str as doc.
110 if (sum(map(lowercontains, names))
110 if (sum(map(lowercontains, names))
111 or lowercontains(header)
111 or lowercontains(header)
112 or (callable(doc) and lowercontains(doc(ui)))):
112 or (callable(doc) and lowercontains(doc(ui)))):
113 results['topics'].append((names[0], header))
113 results['topics'].append((names[0], header))
114 import commands # avoid cycle
114 import commands # avoid cycle
115 for cmd, entry in commands.table.iteritems():
115 for cmd, entry in commands.table.iteritems():
116 if len(entry) == 3:
116 if len(entry) == 3:
117 summary = entry[2]
117 summary = entry[2]
118 else:
118 else:
119 summary = ''
119 summary = ''
120 # translate docs *before* searching there
120 # translate docs *before* searching there
121 docs = _(getattr(entry[0], '__doc__', None)) or ''
121 docs = _(getattr(entry[0], '__doc__', None)) or ''
122 if kw in cmd or lowercontains(summary) or lowercontains(docs):
122 if kw in cmd or lowercontains(summary) or lowercontains(docs):
123 doclines = docs.splitlines()
123 doclines = docs.splitlines()
124 if doclines:
124 if doclines:
125 summary = doclines[0]
125 summary = doclines[0]
126 cmdname = cmd.partition('|')[0].lstrip('^')
126 cmdname = cmd.partition('|')[0].lstrip('^')
127 if filtercmd(ui, cmdname, kw, docs):
127 if filtercmd(ui, cmdname, kw, docs):
128 continue
128 continue
129 results['commands'].append((cmdname, summary))
129 results['commands'].append((cmdname, summary))
130 for name, docs in itertools.chain(
130 for name, docs in itertools.chain(
131 extensions.enabled(False).iteritems(),
131 extensions.enabled(False).iteritems(),
132 extensions.disabled().iteritems()):
132 extensions.disabled().iteritems()):
133 # extensions.load ignores the UI argument
133 # extensions.load ignores the UI argument
134 mod = extensions.load(None, name, '')
134 mod = extensions.load(None, name, '')
135 name = name.rpartition('.')[-1]
135 name = name.rpartition('.')[-1]
136 if lowercontains(name) or lowercontains(docs):
136 if lowercontains(name) or lowercontains(docs):
137 # extension docs are already translated
137 # extension docs are already translated
138 results['extensions'].append((name, docs.splitlines()[0]))
138 results['extensions'].append((name, docs.splitlines()[0]))
139 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
139 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
140 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
140 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
141 cmdname = cmd.partition('|')[0].lstrip('^')
141 cmdname = cmd.partition('|')[0].lstrip('^')
142 if entry[0].__doc__:
142 if entry[0].__doc__:
143 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
143 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
144 else:
144 else:
145 cmddoc = _('(no help text available)')
145 cmddoc = _('(no help text available)')
146 if filtercmd(ui, cmdname, kw, cmddoc):
147 continue
146 results['extensioncommands'].append((cmdname, cmddoc))
148 results['extensioncommands'].append((cmdname, cmddoc))
147 return results
149 return results
148
150
149 def loaddoc(topic, subdir=None):
151 def loaddoc(topic, subdir=None):
150 """Return a delayed loader for help/topic.txt."""
152 """Return a delayed loader for help/topic.txt."""
151
153
152 def loader(ui):
154 def loader(ui):
153 docdir = os.path.join(util.datapath, 'help')
155 docdir = os.path.join(util.datapath, 'help')
154 if subdir:
156 if subdir:
155 docdir = os.path.join(docdir, subdir)
157 docdir = os.path.join(docdir, subdir)
156 path = os.path.join(docdir, topic + ".txt")
158 path = os.path.join(docdir, topic + ".txt")
157 doc = gettext(util.readfile(path))
159 doc = gettext(util.readfile(path))
158 for rewriter in helphooks.get(topic, []):
160 for rewriter in helphooks.get(topic, []):
159 doc = rewriter(ui, topic, doc)
161 doc = rewriter(ui, topic, doc)
160 return doc
162 return doc
161
163
162 return loader
164 return loader
163
165
164 internalstable = sorted([
166 internalstable = sorted([
165 (['bundles'], _('container for exchange of repository data'),
167 (['bundles'], _('container for exchange of repository data'),
166 loaddoc('bundles', subdir='internals')),
168 loaddoc('bundles', subdir='internals')),
167 (['changegroups'], _('representation of revlog data'),
169 (['changegroups'], _('representation of revlog data'),
168 loaddoc('changegroups', subdir='internals')),
170 loaddoc('changegroups', subdir='internals')),
169 ])
171 ])
170
172
171 def internalshelp(ui):
173 def internalshelp(ui):
172 """Generate the index for the "internals" topic."""
174 """Generate the index for the "internals" topic."""
173 lines = []
175 lines = []
174 for names, header, doc in internalstable:
176 for names, header, doc in internalstable:
175 lines.append(' :%s: %s' % (names[0], header))
177 lines.append(' :%s: %s' % (names[0], header))
176
178
177 return '\n'.join(lines)
179 return '\n'.join(lines)
178
180
179 helptable = sorted([
181 helptable = sorted([
180 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
182 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
181 (["dates"], _("Date Formats"), loaddoc('dates')),
183 (["dates"], _("Date Formats"), loaddoc('dates')),
182 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
184 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
183 (['environment', 'env'], _('Environment Variables'),
185 (['environment', 'env'], _('Environment Variables'),
184 loaddoc('environment')),
186 loaddoc('environment')),
185 (['revisions', 'revs'], _('Specifying Single Revisions'),
187 (['revisions', 'revs'], _('Specifying Single Revisions'),
186 loaddoc('revisions')),
188 loaddoc('revisions')),
187 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
189 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
188 loaddoc('multirevs')),
190 loaddoc('multirevs')),
189 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
191 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
190 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
192 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
191 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
193 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
192 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
194 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
193 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
195 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
194 loaddoc('templates')),
196 loaddoc('templates')),
195 (['urls'], _('URL Paths'), loaddoc('urls')),
197 (['urls'], _('URL Paths'), loaddoc('urls')),
196 (["extensions"], _("Using Additional Features"), extshelp),
198 (["extensions"], _("Using Additional Features"), extshelp),
197 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
199 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
198 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
200 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
199 (["glossary"], _("Glossary"), loaddoc('glossary')),
201 (["glossary"], _("Glossary"), loaddoc('glossary')),
200 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
202 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
201 loaddoc('hgignore')),
203 loaddoc('hgignore')),
202 (["phases"], _("Working with Phases"), loaddoc('phases')),
204 (["phases"], _("Working with Phases"), loaddoc('phases')),
203 (['scripting'], _('Using Mercurial from scripts and automation'),
205 (['scripting'], _('Using Mercurial from scripts and automation'),
204 loaddoc('scripting')),
206 loaddoc('scripting')),
205 (['internals'], _("Technical implementation topics"),
207 (['internals'], _("Technical implementation topics"),
206 internalshelp),
208 internalshelp),
207 ])
209 ])
208
210
209 # Maps topics with sub-topics to a list of their sub-topics.
211 # Maps topics with sub-topics to a list of their sub-topics.
210 subtopics = {
212 subtopics = {
211 'internals': internalstable,
213 'internals': internalstable,
212 }
214 }
213
215
214 # Map topics to lists of callable taking the current topic help and
216 # Map topics to lists of callable taking the current topic help and
215 # returning the updated version
217 # returning the updated version
216 helphooks = {}
218 helphooks = {}
217
219
218 def addtopichook(topic, rewriter):
220 def addtopichook(topic, rewriter):
219 helphooks.setdefault(topic, []).append(rewriter)
221 helphooks.setdefault(topic, []).append(rewriter)
220
222
221 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
223 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
222 """Extract docstring from the items key to function mapping, build a
224 """Extract docstring from the items key to function mapping, build a
223 single documentation block and use it to overwrite the marker in doc.
225 single documentation block and use it to overwrite the marker in doc.
224 """
226 """
225 entries = []
227 entries = []
226 for name in sorted(items):
228 for name in sorted(items):
227 text = (items[name].__doc__ or '').rstrip()
229 text = (items[name].__doc__ or '').rstrip()
228 if (not text
230 if (not text
229 or not ui.verbose and any(w in text for w in _exclkeywords)):
231 or not ui.verbose and any(w in text for w in _exclkeywords)):
230 continue
232 continue
231 text = gettext(text)
233 text = gettext(text)
232 if dedent:
234 if dedent:
233 text = textwrap.dedent(text)
235 text = textwrap.dedent(text)
234 lines = text.splitlines()
236 lines = text.splitlines()
235 doclines = [(lines[0])]
237 doclines = [(lines[0])]
236 for l in lines[1:]:
238 for l in lines[1:]:
237 # Stop once we find some Python doctest
239 # Stop once we find some Python doctest
238 if l.strip().startswith('>>>'):
240 if l.strip().startswith('>>>'):
239 break
241 break
240 if dedent:
242 if dedent:
241 doclines.append(l.rstrip())
243 doclines.append(l.rstrip())
242 else:
244 else:
243 doclines.append(' ' + l.strip())
245 doclines.append(' ' + l.strip())
244 entries.append('\n'.join(doclines))
246 entries.append('\n'.join(doclines))
245 entries = '\n\n'.join(entries)
247 entries = '\n\n'.join(entries)
246 return doc.replace(marker, entries)
248 return doc.replace(marker, entries)
247
249
248 def addtopicsymbols(topic, marker, symbols, dedent=False):
250 def addtopicsymbols(topic, marker, symbols, dedent=False):
249 def add(ui, topic, doc):
251 def add(ui, topic, doc):
250 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
252 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
251 addtopichook(topic, add)
253 addtopichook(topic, add)
252
254
253 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
255 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
254 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
256 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
255 filemerge.internalsdoc)
257 filemerge.internalsdoc)
256 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
258 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
257 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
259 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
258 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
260 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
259 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
261 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
260 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
262 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
261 dedent=True)
263 dedent=True)
262
264
263 def help_(ui, name, unknowncmd=False, full=True, subtopic=None, **opts):
265 def help_(ui, name, unknowncmd=False, full=True, subtopic=None, **opts):
264 '''
266 '''
265 Generate the help for 'name' as unformatted restructured text. If
267 Generate the help for 'name' as unformatted restructured text. If
266 'name' is None, describe the commands available.
268 'name' is None, describe the commands available.
267 '''
269 '''
268
270
269 import commands # avoid cycle
271 import commands # avoid cycle
270
272
271 def helpcmd(name, subtopic=None):
273 def helpcmd(name, subtopic=None):
272 try:
274 try:
273 aliases, entry = cmdutil.findcmd(name, commands.table,
275 aliases, entry = cmdutil.findcmd(name, commands.table,
274 strict=unknowncmd)
276 strict=unknowncmd)
275 except error.AmbiguousCommand as inst:
277 except error.AmbiguousCommand as inst:
276 # py3k fix: except vars can't be used outside the scope of the
278 # py3k fix: except vars can't be used outside the scope of the
277 # except block, nor can be used inside a lambda. python issue4617
279 # except block, nor can be used inside a lambda. python issue4617
278 prefix = inst.args[0]
280 prefix = inst.args[0]
279 select = lambda c: c.lstrip('^').startswith(prefix)
281 select = lambda c: c.lstrip('^').startswith(prefix)
280 rst = helplist(select)
282 rst = helplist(select)
281 return rst
283 return rst
282
284
283 rst = []
285 rst = []
284
286
285 # check if it's an invalid alias and display its error if it is
287 # check if it's an invalid alias and display its error if it is
286 if getattr(entry[0], 'badalias', None):
288 if getattr(entry[0], 'badalias', None):
287 rst.append(entry[0].badalias + '\n')
289 rst.append(entry[0].badalias + '\n')
288 if entry[0].unknowncmd:
290 if entry[0].unknowncmd:
289 try:
291 try:
290 rst.extend(helpextcmd(entry[0].cmdname))
292 rst.extend(helpextcmd(entry[0].cmdname))
291 except error.UnknownCommand:
293 except error.UnknownCommand:
292 pass
294 pass
293 return rst
295 return rst
294
296
295 # synopsis
297 # synopsis
296 if len(entry) > 2:
298 if len(entry) > 2:
297 if entry[2].startswith('hg'):
299 if entry[2].startswith('hg'):
298 rst.append("%s\n" % entry[2])
300 rst.append("%s\n" % entry[2])
299 else:
301 else:
300 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
302 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
301 else:
303 else:
302 rst.append('hg %s\n' % aliases[0])
304 rst.append('hg %s\n' % aliases[0])
303 # aliases
305 # aliases
304 if full and not ui.quiet and len(aliases) > 1:
306 if full and not ui.quiet and len(aliases) > 1:
305 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
307 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
306 rst.append('\n')
308 rst.append('\n')
307
309
308 # description
310 # description
309 doc = gettext(entry[0].__doc__)
311 doc = gettext(entry[0].__doc__)
310 if not doc:
312 if not doc:
311 doc = _("(no help text available)")
313 doc = _("(no help text available)")
312 if util.safehasattr(entry[0], 'definition'): # aliased command
314 if util.safehasattr(entry[0], 'definition'): # aliased command
313 if entry[0].definition.startswith('!'): # shell alias
315 if entry[0].definition.startswith('!'): # shell alias
314 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
316 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
315 else:
317 else:
316 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
318 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
317 doc = doc.splitlines(True)
319 doc = doc.splitlines(True)
318 if ui.quiet or not full:
320 if ui.quiet or not full:
319 rst.append(doc[0])
321 rst.append(doc[0])
320 else:
322 else:
321 rst.extend(doc)
323 rst.extend(doc)
322 rst.append('\n')
324 rst.append('\n')
323
325
324 # check if this command shadows a non-trivial (multi-line)
326 # check if this command shadows a non-trivial (multi-line)
325 # extension help text
327 # extension help text
326 try:
328 try:
327 mod = extensions.find(name)
329 mod = extensions.find(name)
328 doc = gettext(mod.__doc__) or ''
330 doc = gettext(mod.__doc__) or ''
329 if '\n' in doc.strip():
331 if '\n' in doc.strip():
330 msg = _('(use "hg help -e %s" to show help for '
332 msg = _('(use "hg help -e %s" to show help for '
331 'the %s extension)') % (name, name)
333 'the %s extension)') % (name, name)
332 rst.append('\n%s\n' % msg)
334 rst.append('\n%s\n' % msg)
333 except KeyError:
335 except KeyError:
334 pass
336 pass
335
337
336 # options
338 # options
337 if not ui.quiet and entry[1]:
339 if not ui.quiet and entry[1]:
338 rst.append(optrst(_("options"), entry[1], ui.verbose))
340 rst.append(optrst(_("options"), entry[1], ui.verbose))
339
341
340 if ui.verbose:
342 if ui.verbose:
341 rst.append(optrst(_("global options"),
343 rst.append(optrst(_("global options"),
342 commands.globalopts, ui.verbose))
344 commands.globalopts, ui.verbose))
343
345
344 if not ui.verbose:
346 if not ui.verbose:
345 if not full:
347 if not full:
346 rst.append(_('\n(use "hg %s -h" to show more help)\n')
348 rst.append(_('\n(use "hg %s -h" to show more help)\n')
347 % name)
349 % name)
348 elif not ui.quiet:
350 elif not ui.quiet:
349 rst.append(_('\n(some details hidden, use --verbose '
351 rst.append(_('\n(some details hidden, use --verbose '
350 'to show complete help)'))
352 'to show complete help)'))
351
353
352 return rst
354 return rst
353
355
354
356
355 def helplist(select=None, **opts):
357 def helplist(select=None, **opts):
356 # list of commands
358 # list of commands
357 if name == "shortlist":
359 if name == "shortlist":
358 header = _('basic commands:\n\n')
360 header = _('basic commands:\n\n')
359 elif name == "debug":
361 elif name == "debug":
360 header = _('debug commands (internal and unsupported):\n\n')
362 header = _('debug commands (internal and unsupported):\n\n')
361 else:
363 else:
362 header = _('list of commands:\n\n')
364 header = _('list of commands:\n\n')
363
365
364 h = {}
366 h = {}
365 cmds = {}
367 cmds = {}
366 for c, e in commands.table.iteritems():
368 for c, e in commands.table.iteritems():
367 f = c.partition("|")[0]
369 f = c.partition("|")[0]
368 if select and not select(f):
370 if select and not select(f):
369 continue
371 continue
370 if (not select and name != 'shortlist' and
372 if (not select and name != 'shortlist' and
371 e[0].__module__ != commands.__name__):
373 e[0].__module__ != commands.__name__):
372 continue
374 continue
373 if name == "shortlist" and not f.startswith("^"):
375 if name == "shortlist" and not f.startswith("^"):
374 continue
376 continue
375 f = f.lstrip("^")
377 f = f.lstrip("^")
376 doc = e[0].__doc__
378 doc = e[0].__doc__
377 if filtercmd(ui, f, name, doc):
379 if filtercmd(ui, f, name, doc):
378 continue
380 continue
379 doc = gettext(doc)
381 doc = gettext(doc)
380 if not doc:
382 if not doc:
381 doc = _("(no help text available)")
383 doc = _("(no help text available)")
382 h[f] = doc.splitlines()[0].rstrip()
384 h[f] = doc.splitlines()[0].rstrip()
383 cmds[f] = c.lstrip("^")
385 cmds[f] = c.lstrip("^")
384
386
385 rst = []
387 rst = []
386 if not h:
388 if not h:
387 if not ui.quiet:
389 if not ui.quiet:
388 rst.append(_('no commands defined\n'))
390 rst.append(_('no commands defined\n'))
389 return rst
391 return rst
390
392
391 if not ui.quiet:
393 if not ui.quiet:
392 rst.append(header)
394 rst.append(header)
393 fns = sorted(h)
395 fns = sorted(h)
394 for f in fns:
396 for f in fns:
395 if ui.verbose:
397 if ui.verbose:
396 commacmds = cmds[f].replace("|",", ")
398 commacmds = cmds[f].replace("|",", ")
397 rst.append(" :%s: %s\n" % (commacmds, h[f]))
399 rst.append(" :%s: %s\n" % (commacmds, h[f]))
398 else:
400 else:
399 rst.append(' :%s: %s\n' % (f, h[f]))
401 rst.append(' :%s: %s\n' % (f, h[f]))
400
402
401 ex = opts.get
403 ex = opts.get
402 anyopts = (ex('keyword') or not (ex('command') or ex('extension')))
404 anyopts = (ex('keyword') or not (ex('command') or ex('extension')))
403 if not name and anyopts:
405 if not name and anyopts:
404 exts = listexts(_('enabled extensions:'), extensions.enabled())
406 exts = listexts(_('enabled extensions:'), extensions.enabled())
405 if exts:
407 if exts:
406 rst.append('\n')
408 rst.append('\n')
407 rst.extend(exts)
409 rst.extend(exts)
408
410
409 rst.append(_("\nadditional help topics:\n\n"))
411 rst.append(_("\nadditional help topics:\n\n"))
410 topics = []
412 topics = []
411 for names, header, doc in helptable:
413 for names, header, doc in helptable:
412 topics.append((names[0], header))
414 topics.append((names[0], header))
413 for t, desc in topics:
415 for t, desc in topics:
414 rst.append(" :%s: %s\n" % (t, desc))
416 rst.append(" :%s: %s\n" % (t, desc))
415
417
416 if ui.quiet:
418 if ui.quiet:
417 pass
419 pass
418 elif ui.verbose:
420 elif ui.verbose:
419 rst.append('\n%s\n' % optrst(_("global options"),
421 rst.append('\n%s\n' % optrst(_("global options"),
420 commands.globalopts, ui.verbose))
422 commands.globalopts, ui.verbose))
421 if name == 'shortlist':
423 if name == 'shortlist':
422 rst.append(_('\n(use "hg help" for the full list '
424 rst.append(_('\n(use "hg help" for the full list '
423 'of commands)\n'))
425 'of commands)\n'))
424 else:
426 else:
425 if name == 'shortlist':
427 if name == 'shortlist':
426 rst.append(_('\n(use "hg help" for the full list of commands '
428 rst.append(_('\n(use "hg help" for the full list of commands '
427 'or "hg -v" for details)\n'))
429 'or "hg -v" for details)\n'))
428 elif name and not full:
430 elif name and not full:
429 rst.append(_('\n(use "hg help %s" to show the full help '
431 rst.append(_('\n(use "hg help %s" to show the full help '
430 'text)\n') % name)
432 'text)\n') % name)
431 elif name and cmds and name in cmds.keys():
433 elif name and cmds and name in cmds.keys():
432 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
434 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
433 'aliases and global options)\n') % name)
435 'aliases and global options)\n') % name)
434 else:
436 else:
435 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
437 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
436 'and global options)\n')
438 'and global options)\n')
437 % (name and " " + name or ""))
439 % (name and " " + name or ""))
438 return rst
440 return rst
439
441
440 def helptopic(name, subtopic=None):
442 def helptopic(name, subtopic=None):
441 # Look for sub-topic entry first.
443 # Look for sub-topic entry first.
442 header, doc = None, None
444 header, doc = None, None
443 if subtopic and name in subtopics:
445 if subtopic and name in subtopics:
444 for names, header, doc in subtopics[name]:
446 for names, header, doc in subtopics[name]:
445 if subtopic in names:
447 if subtopic in names:
446 break
448 break
447
449
448 if not header:
450 if not header:
449 for names, header, doc in helptable:
451 for names, header, doc in helptable:
450 if name in names:
452 if name in names:
451 break
453 break
452 else:
454 else:
453 raise error.UnknownCommand(name)
455 raise error.UnknownCommand(name)
454
456
455 rst = [minirst.section(header)]
457 rst = [minirst.section(header)]
456
458
457 # description
459 # description
458 if not doc:
460 if not doc:
459 rst.append(" %s\n" % _("(no help text available)"))
461 rst.append(" %s\n" % _("(no help text available)"))
460 if callable(doc):
462 if callable(doc):
461 rst += [" %s\n" % l for l in doc(ui).splitlines()]
463 rst += [" %s\n" % l for l in doc(ui).splitlines()]
462
464
463 if not ui.verbose:
465 if not ui.verbose:
464 omitted = _('(some details hidden, use --verbose'
466 omitted = _('(some details hidden, use --verbose'
465 ' to show complete help)')
467 ' to show complete help)')
466 indicateomitted(rst, omitted)
468 indicateomitted(rst, omitted)
467
469
468 try:
470 try:
469 cmdutil.findcmd(name, commands.table)
471 cmdutil.findcmd(name, commands.table)
470 rst.append(_('\nuse "hg help -c %s" to see help for '
472 rst.append(_('\nuse "hg help -c %s" to see help for '
471 'the %s command\n') % (name, name))
473 'the %s command\n') % (name, name))
472 except error.UnknownCommand:
474 except error.UnknownCommand:
473 pass
475 pass
474 return rst
476 return rst
475
477
476 def helpext(name, subtopic=None):
478 def helpext(name, subtopic=None):
477 try:
479 try:
478 mod = extensions.find(name)
480 mod = extensions.find(name)
479 doc = gettext(mod.__doc__) or _('no help text available')
481 doc = gettext(mod.__doc__) or _('no help text available')
480 except KeyError:
482 except KeyError:
481 mod = None
483 mod = None
482 doc = extensions.disabledext(name)
484 doc = extensions.disabledext(name)
483 if not doc:
485 if not doc:
484 raise error.UnknownCommand(name)
486 raise error.UnknownCommand(name)
485
487
486 if '\n' not in doc:
488 if '\n' not in doc:
487 head, tail = doc, ""
489 head, tail = doc, ""
488 else:
490 else:
489 head, tail = doc.split('\n', 1)
491 head, tail = doc.split('\n', 1)
490 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
492 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
491 if tail:
493 if tail:
492 rst.extend(tail.splitlines(True))
494 rst.extend(tail.splitlines(True))
493 rst.append('\n')
495 rst.append('\n')
494
496
495 if not ui.verbose:
497 if not ui.verbose:
496 omitted = _('(some details hidden, use --verbose'
498 omitted = _('(some details hidden, use --verbose'
497 ' to show complete help)')
499 ' to show complete help)')
498 indicateomitted(rst, omitted)
500 indicateomitted(rst, omitted)
499
501
500 if mod:
502 if mod:
501 try:
503 try:
502 ct = mod.cmdtable
504 ct = mod.cmdtable
503 except AttributeError:
505 except AttributeError:
504 ct = {}
506 ct = {}
505 modcmds = set([c.partition('|')[0] for c in ct])
507 modcmds = set([c.partition('|')[0] for c in ct])
506 rst.extend(helplist(modcmds.__contains__))
508 rst.extend(helplist(modcmds.__contains__))
507 else:
509 else:
508 rst.append(_('(use "hg help extensions" for information on enabling'
510 rst.append(_('(use "hg help extensions" for information on enabling'
509 ' extensions)\n'))
511 ' extensions)\n'))
510 return rst
512 return rst
511
513
512 def helpextcmd(name, subtopic=None):
514 def helpextcmd(name, subtopic=None):
513 cmd, ext, mod = extensions.disabledcmd(ui, name,
515 cmd, ext, mod = extensions.disabledcmd(ui, name,
514 ui.configbool('ui', 'strict'))
516 ui.configbool('ui', 'strict'))
515 doc = gettext(mod.__doc__).splitlines()[0]
517 doc = gettext(mod.__doc__).splitlines()[0]
516
518
517 rst = listexts(_("'%s' is provided by the following "
519 rst = listexts(_("'%s' is provided by the following "
518 "extension:") % cmd, {ext: doc}, indent=4,
520 "extension:") % cmd, {ext: doc}, indent=4,
519 showdeprecated=True)
521 showdeprecated=True)
520 rst.append('\n')
522 rst.append('\n')
521 rst.append(_('(use "hg help extensions" for information on enabling '
523 rst.append(_('(use "hg help extensions" for information on enabling '
522 'extensions)\n'))
524 'extensions)\n'))
523 return rst
525 return rst
524
526
525
527
526 rst = []
528 rst = []
527 kw = opts.get('keyword')
529 kw = opts.get('keyword')
528 if kw or name is None and any(opts[o] for o in opts):
530 if kw or name is None and any(opts[o] for o in opts):
529 matches = topicmatch(ui, name or '')
531 matches = topicmatch(ui, name or '')
530 helpareas = []
532 helpareas = []
531 if opts.get('extension'):
533 if opts.get('extension'):
532 helpareas += [('extensions', _('Extensions'))]
534 helpareas += [('extensions', _('Extensions'))]
533 if opts.get('command'):
535 if opts.get('command'):
534 helpareas += [('commands', _('Commands'))]
536 helpareas += [('commands', _('Commands'))]
535 if not helpareas:
537 if not helpareas:
536 helpareas = [('topics', _('Topics')),
538 helpareas = [('topics', _('Topics')),
537 ('commands', _('Commands')),
539 ('commands', _('Commands')),
538 ('extensions', _('Extensions')),
540 ('extensions', _('Extensions')),
539 ('extensioncommands', _('Extension Commands'))]
541 ('extensioncommands', _('Extension Commands'))]
540 for t, title in helpareas:
542 for t, title in helpareas:
541 if matches[t]:
543 if matches[t]:
542 rst.append('%s:\n\n' % title)
544 rst.append('%s:\n\n' % title)
543 rst.extend(minirst.maketable(sorted(matches[t]), 1))
545 rst.extend(minirst.maketable(sorted(matches[t]), 1))
544 rst.append('\n')
546 rst.append('\n')
545 if not rst:
547 if not rst:
546 msg = _('no matches')
548 msg = _('no matches')
547 hint = _('try "hg help" for a list of topics')
549 hint = _('try "hg help" for a list of topics')
548 raise error.Abort(msg, hint=hint)
550 raise error.Abort(msg, hint=hint)
549 elif name and name != 'shortlist':
551 elif name and name != 'shortlist':
550 queries = []
552 queries = []
551 if unknowncmd:
553 if unknowncmd:
552 queries += [helpextcmd]
554 queries += [helpextcmd]
553 if opts.get('extension'):
555 if opts.get('extension'):
554 queries += [helpext]
556 queries += [helpext]
555 if opts.get('command'):
557 if opts.get('command'):
556 queries += [helpcmd]
558 queries += [helpcmd]
557 if not queries:
559 if not queries:
558 queries = (helptopic, helpcmd, helpext, helpextcmd)
560 queries = (helptopic, helpcmd, helpext, helpextcmd)
559 for f in queries:
561 for f in queries:
560 try:
562 try:
561 rst = f(name, subtopic)
563 rst = f(name, subtopic)
562 break
564 break
563 except error.UnknownCommand:
565 except error.UnknownCommand:
564 pass
566 pass
565 else:
567 else:
566 if unknowncmd:
568 if unknowncmd:
567 raise error.UnknownCommand(name)
569 raise error.UnknownCommand(name)
568 else:
570 else:
569 msg = _('no such help topic: %s') % name
571 msg = _('no such help topic: %s') % name
570 hint = _('try "hg help --keyword %s"') % name
572 hint = _('try "hg help --keyword %s"') % name
571 raise error.Abort(msg, hint=hint)
573 raise error.Abort(msg, hint=hint)
572 else:
574 else:
573 # program name
575 # program name
574 if not ui.quiet:
576 if not ui.quiet:
575 rst = [_("Mercurial Distributed SCM\n"), '\n']
577 rst = [_("Mercurial Distributed SCM\n"), '\n']
576 rst.extend(helplist(None, **opts))
578 rst.extend(helplist(None, **opts))
577
579
578 return ''.join(rst)
580 return ''.join(rst)
@@ -1,2610 +1,2610 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 changegroup file
61 bundle create a changegroup 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 for a pattern in specified files and revisions
72 grep search for a pattern in specified files and revisions
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 changegroup files
98 unbundle apply one or more changegroup 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 config Configuration Files
105 config Configuration Files
106 dates Date Formats
106 dates Date Formats
107 diffs Diff Formats
107 diffs Diff Formats
108 environment Environment Variables
108 environment Environment Variables
109 extensions Using Additional Features
109 extensions Using Additional Features
110 filesets Specifying File Sets
110 filesets Specifying File Sets
111 glossary Glossary
111 glossary Glossary
112 hgignore Syntax for Mercurial Ignore Files
112 hgignore Syntax for Mercurial Ignore Files
113 hgweb Configuring hgweb
113 hgweb Configuring hgweb
114 internals Technical implementation topics
114 internals Technical implementation topics
115 merge-tools Merge Tools
115 merge-tools Merge Tools
116 multirevs Specifying Multiple Revisions
116 multirevs Specifying Multiple Revisions
117 patterns File Name Patterns
117 patterns File Name Patterns
118 phases Working with Phases
118 phases Working with Phases
119 revisions Specifying Single Revisions
119 revisions Specifying Single Revisions
120 revsets Specifying Revision Sets
120 revsets Specifying Revision Sets
121 scripting Using Mercurial from scripts and automation
121 scripting Using Mercurial from scripts and automation
122 subrepos Subrepositories
122 subrepos Subrepositories
123 templating Template Usage
123 templating Template Usage
124 urls URL Paths
124 urls URL Paths
125
125
126 (use "hg help -v" to show built-in aliases and global options)
126 (use "hg help -v" to show built-in aliases and global options)
127
127
128 $ hg -q help
128 $ hg -q help
129 add add the specified files on the next commit
129 add add the specified files on the next commit
130 addremove add all new files, delete all missing files
130 addremove add all new files, delete all missing files
131 annotate show changeset information by line for each file
131 annotate show changeset information by line for each file
132 archive create an unversioned archive of a repository revision
132 archive create an unversioned archive of a repository revision
133 backout reverse effect of earlier changeset
133 backout reverse effect of earlier changeset
134 bisect subdivision search of changesets
134 bisect subdivision search of changesets
135 bookmarks create a new bookmark or list existing bookmarks
135 bookmarks create a new bookmark or list existing bookmarks
136 branch set or show the current branch name
136 branch set or show the current branch name
137 branches list repository named branches
137 branches list repository named branches
138 bundle create a changegroup file
138 bundle create a changegroup file
139 cat output the current or given revision of files
139 cat output the current or given revision of files
140 clone make a copy of an existing repository
140 clone make a copy of an existing repository
141 commit commit the specified files or all outstanding changes
141 commit commit the specified files or all outstanding changes
142 config show combined config settings from all hgrc files
142 config show combined config settings from all hgrc files
143 copy mark files as copied for the next commit
143 copy mark files as copied for the next commit
144 diff diff repository (or selected files)
144 diff diff repository (or selected files)
145 export dump the header and diffs for one or more changesets
145 export dump the header and diffs for one or more changesets
146 files list tracked files
146 files list tracked files
147 forget forget the specified files on the next commit
147 forget forget the specified files on the next commit
148 graft copy changes from other branches onto the current branch
148 graft copy changes from other branches onto the current branch
149 grep search for a pattern in specified files and revisions
149 grep search for a pattern in specified files and revisions
150 heads show branch heads
150 heads show branch heads
151 help show help for a given topic or a help overview
151 help show help for a given topic or a help overview
152 identify identify the working directory or specified revision
152 identify identify the working directory or specified revision
153 import import an ordered set of patches
153 import import an ordered set of patches
154 incoming show new changesets found in source
154 incoming show new changesets found in source
155 init create a new repository in the given directory
155 init create a new repository in the given directory
156 log show revision history of entire repository or files
156 log show revision history of entire repository or files
157 manifest output the current or given revision of the project manifest
157 manifest output the current or given revision of the project manifest
158 merge merge another revision into working directory
158 merge merge another revision into working directory
159 outgoing show changesets not found in the destination
159 outgoing show changesets not found in the destination
160 paths show aliases for remote repositories
160 paths show aliases for remote repositories
161 phase set or show the current phase name
161 phase set or show the current phase name
162 pull pull changes from the specified source
162 pull pull changes from the specified source
163 push push changes to the specified destination
163 push push changes to the specified destination
164 recover roll back an interrupted transaction
164 recover roll back an interrupted transaction
165 remove remove the specified files on the next commit
165 remove remove the specified files on the next commit
166 rename rename files; equivalent of copy + remove
166 rename rename files; equivalent of copy + remove
167 resolve redo merges or set/view the merge status of files
167 resolve redo merges or set/view the merge status of files
168 revert restore files to their checkout state
168 revert restore files to their checkout state
169 root print the root (top) of the current working directory
169 root print the root (top) of the current working directory
170 serve start stand-alone webserver
170 serve start stand-alone webserver
171 status show changed files in the working directory
171 status show changed files in the working directory
172 summary summarize working directory state
172 summary summarize working directory state
173 tag add one or more tags for the current or given revision
173 tag add one or more tags for the current or given revision
174 tags list repository tags
174 tags list repository tags
175 unbundle apply one or more changegroup files
175 unbundle apply one or more changegroup files
176 update update working directory (or switch revisions)
176 update update working directory (or switch revisions)
177 verify verify the integrity of the repository
177 verify verify the integrity of the repository
178 version output version and copyright information
178 version output version and copyright information
179
179
180 additional help topics:
180 additional help topics:
181
181
182 config Configuration Files
182 config Configuration Files
183 dates Date Formats
183 dates Date Formats
184 diffs Diff Formats
184 diffs Diff Formats
185 environment Environment Variables
185 environment Environment Variables
186 extensions Using Additional Features
186 extensions Using Additional Features
187 filesets Specifying File Sets
187 filesets Specifying File Sets
188 glossary Glossary
188 glossary Glossary
189 hgignore Syntax for Mercurial Ignore Files
189 hgignore Syntax for Mercurial Ignore Files
190 hgweb Configuring hgweb
190 hgweb Configuring hgweb
191 internals Technical implementation topics
191 internals Technical implementation topics
192 merge-tools Merge Tools
192 merge-tools Merge Tools
193 multirevs Specifying Multiple Revisions
193 multirevs Specifying Multiple Revisions
194 patterns File Name Patterns
194 patterns File Name Patterns
195 phases Working with Phases
195 phases Working with Phases
196 revisions Specifying Single Revisions
196 revisions Specifying Single Revisions
197 revsets Specifying Revision Sets
197 revsets Specifying Revision Sets
198 scripting Using Mercurial from scripts and automation
198 scripting Using Mercurial from scripts and automation
199 subrepos Subrepositories
199 subrepos Subrepositories
200 templating Template Usage
200 templating Template Usage
201 urls URL Paths
201 urls URL Paths
202
202
203 Test extension help:
203 Test extension help:
204 $ hg help extensions --config extensions.rebase= --config extensions.children=
204 $ hg help extensions --config extensions.rebase= --config extensions.children=
205 Using Additional Features
205 Using Additional Features
206 """""""""""""""""""""""""
206 """""""""""""""""""""""""
207
207
208 Mercurial has the ability to add new features through the use of
208 Mercurial has the ability to add new features through the use of
209 extensions. Extensions may add new commands, add options to existing
209 extensions. Extensions may add new commands, add options to existing
210 commands, change the default behavior of commands, or implement hooks.
210 commands, change the default behavior of commands, or implement hooks.
211
211
212 To enable the "foo" extension, either shipped with Mercurial or in the
212 To enable the "foo" extension, either shipped with Mercurial or in the
213 Python search path, create an entry for it in your configuration file,
213 Python search path, create an entry for it in your configuration file,
214 like this:
214 like this:
215
215
216 [extensions]
216 [extensions]
217 foo =
217 foo =
218
218
219 You may also specify the full path to an extension:
219 You may also specify the full path to an extension:
220
220
221 [extensions]
221 [extensions]
222 myfeature = ~/.hgext/myfeature.py
222 myfeature = ~/.hgext/myfeature.py
223
223
224 See "hg help config" for more information on configuration files.
224 See "hg help config" for more information on configuration files.
225
225
226 Extensions are not loaded by default for a variety of reasons: they can
226 Extensions are not loaded by default for a variety of reasons: they can
227 increase startup overhead; they may be meant for advanced usage only; they
227 increase startup overhead; they may be meant for advanced usage only; they
228 may provide potentially dangerous abilities (such as letting you destroy
228 may provide potentially dangerous abilities (such as letting you destroy
229 or modify history); they might not be ready for prime time; or they may
229 or modify history); they might not be ready for prime time; or they may
230 alter some usual behaviors of stock Mercurial. It is thus up to the user
230 alter some usual behaviors of stock Mercurial. It is thus up to the user
231 to activate extensions as needed.
231 to activate extensions as needed.
232
232
233 To explicitly disable an extension enabled in a configuration file of
233 To explicitly disable an extension enabled in a configuration file of
234 broader scope, prepend its path with !:
234 broader scope, prepend its path with !:
235
235
236 [extensions]
236 [extensions]
237 # disabling extension bar residing in /path/to/extension/bar.py
237 # disabling extension bar residing in /path/to/extension/bar.py
238 bar = !/path/to/extension/bar.py
238 bar = !/path/to/extension/bar.py
239 # ditto, but no path was supplied for extension baz
239 # ditto, but no path was supplied for extension baz
240 baz = !
240 baz = !
241
241
242 enabled extensions:
242 enabled extensions:
243
243
244 children command to display child changesets (DEPRECATED)
244 children command to display child changesets (DEPRECATED)
245 rebase command to move sets of revisions to a different ancestor
245 rebase command to move sets of revisions to a different ancestor
246
246
247 disabled extensions:
247 disabled extensions:
248
248
249 acl hooks for controlling repository access
249 acl hooks for controlling repository access
250 blackbox log repository events to a blackbox for debugging
250 blackbox log repository events to a blackbox for debugging
251 bugzilla hooks for integrating with the Bugzilla bug tracker
251 bugzilla hooks for integrating with the Bugzilla bug tracker
252 censor erase file content at a given revision
252 censor erase file content at a given revision
253 churn command to display statistics about repository history
253 churn command to display statistics about repository history
254 clonebundles advertise pre-generated bundles to seed clones
254 clonebundles advertise pre-generated bundles to seed clones
255 (experimental)
255 (experimental)
256 color colorize output from some commands
256 color colorize output from some commands
257 convert import revisions from foreign VCS repositories into
257 convert import revisions from foreign VCS repositories into
258 Mercurial
258 Mercurial
259 eol automatically manage newlines in repository files
259 eol automatically manage newlines in repository files
260 extdiff command to allow external programs to compare revisions
260 extdiff command to allow external programs to compare revisions
261 factotum http authentication with factotum
261 factotum http authentication with factotum
262 gpg commands to sign and verify changesets
262 gpg commands to sign and verify changesets
263 hgcia hooks for integrating with the CIA.vc notification service
263 hgcia hooks for integrating with the CIA.vc notification service
264 hgk browse the repository in a graphical way
264 hgk browse the repository in a graphical way
265 highlight syntax highlighting for hgweb (requires Pygments)
265 highlight syntax highlighting for hgweb (requires Pygments)
266 histedit interactive history editing
266 histedit interactive history editing
267 keyword expand keywords in tracked files
267 keyword expand keywords in tracked files
268 largefiles track large binary files
268 largefiles track large binary files
269 mq manage a stack of patches
269 mq manage a stack of patches
270 notify hooks for sending email push notifications
270 notify hooks for sending email push notifications
271 pager browse command output with an external pager
271 pager browse command output with an external pager
272 patchbomb command to send changesets as (a series of) patch emails
272 patchbomb command to send changesets as (a series of) patch emails
273 purge command to delete untracked files from the working
273 purge command to delete untracked files from the working
274 directory
274 directory
275 record commands to interactively select changes for
275 record commands to interactively select changes for
276 commit/qrefresh
276 commit/qrefresh
277 relink recreates hardlinks between repository clones
277 relink recreates hardlinks between repository clones
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 extension keywords appear in help templates
286 Verify that extension keywords appear in help templates
287
287
288 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
288 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
289
289
290 Test short command list with verbose option
290 Test short command list with verbose option
291
291
292 $ hg -v help shortlist
292 $ hg -v help shortlist
293 Mercurial Distributed SCM
293 Mercurial Distributed SCM
294
294
295 basic commands:
295 basic commands:
296
296
297 add add the specified files on the next commit
297 add add the specified files on the next commit
298 annotate, blame
298 annotate, blame
299 show changeset information by line for each file
299 show changeset information by line for each file
300 clone make a copy of an existing repository
300 clone make a copy of an existing repository
301 commit, ci commit the specified files or all outstanding changes
301 commit, ci commit the specified files or all outstanding changes
302 diff diff repository (or selected files)
302 diff diff repository (or selected files)
303 export dump the header and diffs for one or more changesets
303 export dump the header and diffs for one or more changesets
304 forget forget the specified files on the next commit
304 forget forget the specified files on the next commit
305 init create a new repository in the given directory
305 init create a new repository in the given directory
306 log, history show revision history of entire repository or files
306 log, history show revision history of entire repository or files
307 merge merge another revision into working directory
307 merge merge another revision into working directory
308 pull pull changes from the specified source
308 pull pull changes from the specified source
309 push push changes to the specified destination
309 push push changes to the specified destination
310 remove, rm remove the specified files on the next commit
310 remove, rm remove the specified files on the next commit
311 serve start stand-alone webserver
311 serve start stand-alone webserver
312 status, st show changed files in the working directory
312 status, st show changed files in the working directory
313 summary, sum summarize working directory state
313 summary, sum summarize working directory state
314 update, up, checkout, co
314 update, up, checkout, co
315 update working directory (or switch revisions)
315 update working directory (or switch revisions)
316
316
317 global options ([+] can be repeated):
317 global options ([+] can be repeated):
318
318
319 -R --repository REPO repository root directory or name of overlay bundle
319 -R --repository REPO repository root directory or name of overlay bundle
320 file
320 file
321 --cwd DIR change working directory
321 --cwd DIR change working directory
322 -y --noninteractive do not prompt, automatically pick the first choice for
322 -y --noninteractive do not prompt, automatically pick the first choice for
323 all prompts
323 all prompts
324 -q --quiet suppress output
324 -q --quiet suppress output
325 -v --verbose enable additional output
325 -v --verbose enable additional output
326 --config CONFIG [+] set/override config option (use 'section.name=value')
326 --config CONFIG [+] set/override config option (use 'section.name=value')
327 --debug enable debugging output
327 --debug enable debugging output
328 --debugger start debugger
328 --debugger start debugger
329 --encoding ENCODE set the charset encoding (default: ascii)
329 --encoding ENCODE set the charset encoding (default: ascii)
330 --encodingmode MODE set the charset encoding mode (default: strict)
330 --encodingmode MODE set the charset encoding mode (default: strict)
331 --traceback always print a traceback on exception
331 --traceback always print a traceback on exception
332 --time time how long the command takes
332 --time time how long the command takes
333 --profile print command execution profile
333 --profile print command execution profile
334 --version output version information and exit
334 --version output version information and exit
335 -h --help display help and exit
335 -h --help display help and exit
336 --hidden consider hidden changesets
336 --hidden consider hidden changesets
337
337
338 (use "hg help" for the full list of commands)
338 (use "hg help" for the full list of commands)
339
339
340 $ hg add -h
340 $ hg add -h
341 hg add [OPTION]... [FILE]...
341 hg add [OPTION]... [FILE]...
342
342
343 add the specified files on the next commit
343 add the specified files on the next commit
344
344
345 Schedule files to be version controlled and added to the repository.
345 Schedule files to be version controlled and added to the repository.
346
346
347 The files will be added to the repository at the next commit. To undo an
347 The files will be added to the repository at the next commit. To undo an
348 add before that, see "hg forget".
348 add before that, see "hg forget".
349
349
350 If no names are given, add all files to the repository.
350 If no names are given, add all files to the repository.
351
351
352 Returns 0 if all files are successfully added.
352 Returns 0 if all files are successfully added.
353
353
354 options ([+] can be repeated):
354 options ([+] can be repeated):
355
355
356 -I --include PATTERN [+] include names matching the given patterns
356 -I --include PATTERN [+] include names matching the given patterns
357 -X --exclude PATTERN [+] exclude names matching the given patterns
357 -X --exclude PATTERN [+] exclude names matching the given patterns
358 -S --subrepos recurse into subrepositories
358 -S --subrepos recurse into subrepositories
359 -n --dry-run do not perform actions, just print output
359 -n --dry-run do not perform actions, just print output
360
360
361 (some details hidden, use --verbose to show complete help)
361 (some details hidden, use --verbose to show complete help)
362
362
363 Verbose help for add
363 Verbose help for add
364
364
365 $ hg add -hv
365 $ hg add -hv
366 hg add [OPTION]... [FILE]...
366 hg add [OPTION]... [FILE]...
367
367
368 add the specified files on the next commit
368 add the specified files on the next commit
369
369
370 Schedule files to be version controlled and added to the repository.
370 Schedule files to be version controlled and added to the repository.
371
371
372 The files will be added to the repository at the next commit. To undo an
372 The files will be added to the repository at the next commit. To undo an
373 add before that, see "hg forget".
373 add before that, see "hg forget".
374
374
375 If no names are given, add all files to the repository.
375 If no names are given, add all files to the repository.
376
376
377 Examples:
377 Examples:
378
378
379 - New (unknown) files are added automatically by "hg add":
379 - New (unknown) files are added automatically by "hg add":
380
380
381 $ ls
381 $ ls
382 foo.c
382 foo.c
383 $ hg status
383 $ hg status
384 ? foo.c
384 ? foo.c
385 $ hg add
385 $ hg add
386 adding foo.c
386 adding foo.c
387 $ hg status
387 $ hg status
388 A foo.c
388 A foo.c
389
389
390 - Specific files to be added can be specified:
390 - Specific files to be added can be specified:
391
391
392 $ ls
392 $ ls
393 bar.c foo.c
393 bar.c foo.c
394 $ hg status
394 $ hg status
395 ? bar.c
395 ? bar.c
396 ? foo.c
396 ? foo.c
397 $ hg add bar.c
397 $ hg add bar.c
398 $ hg status
398 $ hg status
399 A bar.c
399 A bar.c
400 ? foo.c
400 ? foo.c
401
401
402 Returns 0 if all files are successfully added.
402 Returns 0 if all files are successfully added.
403
403
404 options ([+] can be repeated):
404 options ([+] can be repeated):
405
405
406 -I --include PATTERN [+] include names matching the given patterns
406 -I --include PATTERN [+] include names matching the given patterns
407 -X --exclude PATTERN [+] exclude names matching the given patterns
407 -X --exclude PATTERN [+] exclude names matching the given patterns
408 -S --subrepos recurse into subrepositories
408 -S --subrepos recurse into subrepositories
409 -n --dry-run do not perform actions, just print output
409 -n --dry-run do not perform actions, just print output
410
410
411 global options ([+] can be repeated):
411 global options ([+] can be repeated):
412
412
413 -R --repository REPO repository root directory or name of overlay bundle
413 -R --repository REPO repository root directory or name of overlay bundle
414 file
414 file
415 --cwd DIR change working directory
415 --cwd DIR change working directory
416 -y --noninteractive do not prompt, automatically pick the first choice for
416 -y --noninteractive do not prompt, automatically pick the first choice for
417 all prompts
417 all prompts
418 -q --quiet suppress output
418 -q --quiet suppress output
419 -v --verbose enable additional output
419 -v --verbose enable additional output
420 --config CONFIG [+] set/override config option (use 'section.name=value')
420 --config CONFIG [+] set/override config option (use 'section.name=value')
421 --debug enable debugging output
421 --debug enable debugging output
422 --debugger start debugger
422 --debugger start debugger
423 --encoding ENCODE set the charset encoding (default: ascii)
423 --encoding ENCODE set the charset encoding (default: ascii)
424 --encodingmode MODE set the charset encoding mode (default: strict)
424 --encodingmode MODE set the charset encoding mode (default: strict)
425 --traceback always print a traceback on exception
425 --traceback always print a traceback on exception
426 --time time how long the command takes
426 --time time how long the command takes
427 --profile print command execution profile
427 --profile print command execution profile
428 --version output version information and exit
428 --version output version information and exit
429 -h --help display help and exit
429 -h --help display help and exit
430 --hidden consider hidden changesets
430 --hidden consider hidden changesets
431
431
432 Test help option with version option
432 Test help option with version option
433
433
434 $ hg add -h --version
434 $ hg add -h --version
435 Mercurial Distributed SCM (version *) (glob)
435 Mercurial Distributed SCM (version *) (glob)
436 (see https://mercurial-scm.org for more information)
436 (see https://mercurial-scm.org for more information)
437
437
438 Copyright (C) 2005-2015 Matt Mackall and others
438 Copyright (C) 2005-2015 Matt Mackall and others
439 This is free software; see the source for copying conditions. There is NO
439 This is free software; see the source for copying conditions. There is NO
440 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
440 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
441
441
442 $ hg add --skjdfks
442 $ hg add --skjdfks
443 hg add: option --skjdfks not recognized
443 hg add: option --skjdfks not recognized
444 hg add [OPTION]... [FILE]...
444 hg add [OPTION]... [FILE]...
445
445
446 add the specified files on the next commit
446 add the specified files on the next commit
447
447
448 options ([+] can be repeated):
448 options ([+] can be repeated):
449
449
450 -I --include PATTERN [+] include names matching the given patterns
450 -I --include PATTERN [+] include names matching the given patterns
451 -X --exclude PATTERN [+] exclude names matching the given patterns
451 -X --exclude PATTERN [+] exclude names matching the given patterns
452 -S --subrepos recurse into subrepositories
452 -S --subrepos recurse into subrepositories
453 -n --dry-run do not perform actions, just print output
453 -n --dry-run do not perform actions, just print output
454
454
455 (use "hg add -h" to show more help)
455 (use "hg add -h" to show more help)
456 [255]
456 [255]
457
457
458 Test ambiguous command help
458 Test ambiguous command help
459
459
460 $ hg help ad
460 $ hg help ad
461 list of commands:
461 list of commands:
462
462
463 add add the specified files on the next commit
463 add add the specified files on the next commit
464 addremove add all new files, delete all missing files
464 addremove add all new files, delete all missing files
465
465
466 (use "hg help -v ad" to show built-in aliases and global options)
466 (use "hg help -v ad" to show built-in aliases and global options)
467
467
468 Test command without options
468 Test command without options
469
469
470 $ hg help verify
470 $ hg help verify
471 hg verify
471 hg verify
472
472
473 verify the integrity of the repository
473 verify the integrity of the repository
474
474
475 Verify the integrity of the current repository.
475 Verify the integrity of the current repository.
476
476
477 This will perform an extensive check of the repository's integrity,
477 This will perform an extensive check of the repository's integrity,
478 validating the hashes and checksums of each entry in the changelog,
478 validating the hashes and checksums of each entry in the changelog,
479 manifest, and tracked files, as well as the integrity of their crosslinks
479 manifest, and tracked files, as well as the integrity of their crosslinks
480 and indices.
480 and indices.
481
481
482 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
482 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
483 information about recovery from corruption of the repository.
483 information about recovery from corruption of the repository.
484
484
485 Returns 0 on success, 1 if errors are encountered.
485 Returns 0 on success, 1 if errors are encountered.
486
486
487 (some details hidden, use --verbose to show complete help)
487 (some details hidden, use --verbose to show complete help)
488
488
489 $ hg help diff
489 $ hg help diff
490 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
490 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
491
491
492 diff repository (or selected files)
492 diff repository (or selected files)
493
493
494 Show differences between revisions for the specified files.
494 Show differences between revisions for the specified files.
495
495
496 Differences between files are shown using the unified diff format.
496 Differences between files are shown using the unified diff format.
497
497
498 Note:
498 Note:
499 diff may generate unexpected results for merges, as it will default to
499 diff may generate unexpected results for merges, as it will default to
500 comparing against the working directory's first parent changeset if no
500 comparing against the working directory's first parent changeset if no
501 revisions are specified.
501 revisions are specified.
502
502
503 When two revision arguments are given, then changes are shown between
503 When two revision arguments are given, then changes are shown between
504 those revisions. If only one revision is specified then that revision is
504 those revisions. If only one revision is specified then that revision is
505 compared to the working directory, and, when no revisions are specified,
505 compared to the working directory, and, when no revisions are specified,
506 the working directory files are compared to its parent.
506 the working directory files are compared to its parent.
507
507
508 Alternatively you can specify -c/--change with a revision to see the
508 Alternatively you can specify -c/--change with a revision to see the
509 changes in that changeset relative to its first parent.
509 changes in that changeset relative to its first parent.
510
510
511 Without the -a/--text option, diff will avoid generating diffs of files it
511 Without the -a/--text option, diff will avoid generating diffs of files it
512 detects as binary. With -a, diff will generate a diff anyway, probably
512 detects as binary. With -a, diff will generate a diff anyway, probably
513 with undesirable results.
513 with undesirable results.
514
514
515 Use the -g/--git option to generate diffs in the git extended diff format.
515 Use the -g/--git option to generate diffs in the git extended diff format.
516 For more information, read "hg help diffs".
516 For more information, read "hg help diffs".
517
517
518 Returns 0 on success.
518 Returns 0 on success.
519
519
520 options ([+] can be repeated):
520 options ([+] can be repeated):
521
521
522 -r --rev REV [+] revision
522 -r --rev REV [+] revision
523 -c --change REV change made by revision
523 -c --change REV change made by revision
524 -a --text treat all files as text
524 -a --text treat all files as text
525 -g --git use git extended diff format
525 -g --git use git extended diff format
526 --nodates omit dates from diff headers
526 --nodates omit dates from diff headers
527 --noprefix omit a/ and b/ prefixes from filenames
527 --noprefix omit a/ and b/ prefixes from filenames
528 -p --show-function show which function each change is in
528 -p --show-function show which function each change is in
529 --reverse produce a diff that undoes the changes
529 --reverse produce a diff that undoes the changes
530 -w --ignore-all-space ignore white space when comparing lines
530 -w --ignore-all-space ignore white space when comparing lines
531 -b --ignore-space-change ignore changes in the amount of white space
531 -b --ignore-space-change ignore changes in the amount of white space
532 -B --ignore-blank-lines ignore changes whose lines are all blank
532 -B --ignore-blank-lines ignore changes whose lines are all blank
533 -U --unified NUM number of lines of context to show
533 -U --unified NUM number of lines of context to show
534 --stat output diffstat-style summary of changes
534 --stat output diffstat-style summary of changes
535 --root DIR produce diffs relative to subdirectory
535 --root DIR produce diffs relative to subdirectory
536 -I --include PATTERN [+] include names matching the given patterns
536 -I --include PATTERN [+] include names matching the given patterns
537 -X --exclude PATTERN [+] exclude names matching the given patterns
537 -X --exclude PATTERN [+] exclude names matching the given patterns
538 -S --subrepos recurse into subrepositories
538 -S --subrepos recurse into subrepositories
539
539
540 (some details hidden, use --verbose to show complete help)
540 (some details hidden, use --verbose to show complete help)
541
541
542 $ hg help status
542 $ hg help status
543 hg status [OPTION]... [FILE]...
543 hg status [OPTION]... [FILE]...
544
544
545 aliases: st
545 aliases: st
546
546
547 show changed files in the working directory
547 show changed files in the working directory
548
548
549 Show status of files in the repository. If names are given, only files
549 Show status of files in the repository. If names are given, only files
550 that match are shown. Files that are clean or ignored or the source of a
550 that match are shown. Files that are clean or ignored or the source of a
551 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
551 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
552 -C/--copies or -A/--all are given. Unless options described with "show
552 -C/--copies or -A/--all are given. Unless options described with "show
553 only ..." are given, the options -mardu are used.
553 only ..." are given, the options -mardu are used.
554
554
555 Option -q/--quiet hides untracked (unknown and ignored) files unless
555 Option -q/--quiet hides untracked (unknown and ignored) files unless
556 explicitly requested with -u/--unknown or -i/--ignored.
556 explicitly requested with -u/--unknown or -i/--ignored.
557
557
558 Note:
558 Note:
559 status may appear to disagree with diff if permissions have changed or
559 status may appear to disagree with diff if permissions have changed or
560 a merge has occurred. The standard diff format does not report
560 a merge has occurred. The standard diff format does not report
561 permission changes and diff only reports changes relative to one merge
561 permission changes and diff only reports changes relative to one merge
562 parent.
562 parent.
563
563
564 If one revision is given, it is used as the base revision. If two
564 If one revision is given, it is used as the base revision. If two
565 revisions are given, the differences between them are shown. The --change
565 revisions are given, the differences between them are shown. The --change
566 option can also be used as a shortcut to list the changed files of a
566 option can also be used as a shortcut to list the changed files of a
567 revision from its first parent.
567 revision from its first parent.
568
568
569 The codes used to show the status of files are:
569 The codes used to show the status of files are:
570
570
571 M = modified
571 M = modified
572 A = added
572 A = added
573 R = removed
573 R = removed
574 C = clean
574 C = clean
575 ! = missing (deleted by non-hg command, but still tracked)
575 ! = missing (deleted by non-hg command, but still tracked)
576 ? = not tracked
576 ? = not tracked
577 I = ignored
577 I = ignored
578 = origin of the previous file (with --copies)
578 = origin of the previous file (with --copies)
579
579
580 Returns 0 on success.
580 Returns 0 on success.
581
581
582 options ([+] can be repeated):
582 options ([+] can be repeated):
583
583
584 -A --all show status of all files
584 -A --all show status of all files
585 -m --modified show only modified files
585 -m --modified show only modified files
586 -a --added show only added files
586 -a --added show only added files
587 -r --removed show only removed files
587 -r --removed show only removed files
588 -d --deleted show only deleted (but tracked) files
588 -d --deleted show only deleted (but tracked) files
589 -c --clean show only files without changes
589 -c --clean show only files without changes
590 -u --unknown show only unknown (not tracked) files
590 -u --unknown show only unknown (not tracked) files
591 -i --ignored show only ignored files
591 -i --ignored show only ignored files
592 -n --no-status hide status prefix
592 -n --no-status hide status prefix
593 -C --copies show source of copied files
593 -C --copies show source of copied files
594 -0 --print0 end filenames with NUL, for use with xargs
594 -0 --print0 end filenames with NUL, for use with xargs
595 --rev REV [+] show difference from revision
595 --rev REV [+] show difference from revision
596 --change REV list the changed files of a revision
596 --change REV list the changed files of a revision
597 -I --include PATTERN [+] include names matching the given patterns
597 -I --include PATTERN [+] include names matching the given patterns
598 -X --exclude PATTERN [+] exclude names matching the given patterns
598 -X --exclude PATTERN [+] exclude names matching the given patterns
599 -S --subrepos recurse into subrepositories
599 -S --subrepos recurse into subrepositories
600
600
601 (some details hidden, use --verbose to show complete help)
601 (some details hidden, use --verbose to show complete help)
602
602
603 $ hg -q help status
603 $ hg -q help status
604 hg status [OPTION]... [FILE]...
604 hg status [OPTION]... [FILE]...
605
605
606 show changed files in the working directory
606 show changed files in the working directory
607
607
608 $ hg help foo
608 $ hg help foo
609 abort: no such help topic: foo
609 abort: no such help topic: foo
610 (try "hg help --keyword foo")
610 (try "hg help --keyword foo")
611 [255]
611 [255]
612
612
613 $ hg skjdfks
613 $ hg skjdfks
614 hg: unknown command 'skjdfks'
614 hg: unknown command 'skjdfks'
615 Mercurial Distributed SCM
615 Mercurial Distributed SCM
616
616
617 basic commands:
617 basic commands:
618
618
619 add add the specified files on the next commit
619 add add the specified files on the next commit
620 annotate show changeset information by line for each file
620 annotate show changeset information by line for each file
621 clone make a copy of an existing repository
621 clone make a copy of an existing repository
622 commit commit the specified files or all outstanding changes
622 commit commit the specified files or all outstanding changes
623 diff diff repository (or selected files)
623 diff diff repository (or selected files)
624 export dump the header and diffs for one or more changesets
624 export dump the header and diffs for one or more changesets
625 forget forget the specified files on the next commit
625 forget forget the specified files on the next commit
626 init create a new repository in the given directory
626 init create a new repository in the given directory
627 log show revision history of entire repository or files
627 log show revision history of entire repository or files
628 merge merge another revision into working directory
628 merge merge another revision into working directory
629 pull pull changes from the specified source
629 pull pull changes from the specified source
630 push push changes to the specified destination
630 push push changes to the specified destination
631 remove remove the specified files on the next commit
631 remove remove the specified files on the next commit
632 serve start stand-alone webserver
632 serve start stand-alone webserver
633 status show changed files in the working directory
633 status show changed files in the working directory
634 summary summarize working directory state
634 summary summarize working directory state
635 update update working directory (or switch revisions)
635 update update working directory (or switch revisions)
636
636
637 (use "hg help" for the full list of commands or "hg -v" for details)
637 (use "hg help" for the full list of commands or "hg -v" for details)
638 [255]
638 [255]
639
639
640
640
641 Make sure that we don't run afoul of the help system thinking that
641 Make sure that we don't run afoul of the help system thinking that
642 this is a section and erroring out weirdly.
642 this is a section and erroring out weirdly.
643
643
644 $ hg .log
644 $ hg .log
645 hg: unknown command '.log'
645 hg: unknown command '.log'
646 (did you mean one of log?)
646 (did you mean one of log?)
647 [255]
647 [255]
648
648
649 $ hg log.
649 $ hg log.
650 hg: unknown command 'log.'
650 hg: unknown command 'log.'
651 (did you mean one of log?)
651 (did you mean one of log?)
652 [255]
652 [255]
653 $ hg pu.lh
653 $ hg pu.lh
654 hg: unknown command 'pu.lh'
654 hg: unknown command 'pu.lh'
655 (did you mean one of pull, push?)
655 (did you mean one of pull, push?)
656 [255]
656 [255]
657
657
658 $ cat > helpext.py <<EOF
658 $ cat > helpext.py <<EOF
659 > import os
659 > import os
660 > from mercurial import cmdutil, commands
660 > from mercurial import cmdutil, commands
661 >
661 >
662 > cmdtable = {}
662 > cmdtable = {}
663 > command = cmdutil.command(cmdtable)
663 > command = cmdutil.command(cmdtable)
664 >
664 >
665 > @command('nohelp',
665 > @command('nohelp',
666 > [('', 'longdesc', 3, 'x'*90),
666 > [('', 'longdesc', 3, 'x'*90),
667 > ('n', '', None, 'normal desc'),
667 > ('n', '', None, 'normal desc'),
668 > ('', 'newline', '', 'line1\nline2')],
668 > ('', 'newline', '', 'line1\nline2')],
669 > 'hg nohelp',
669 > 'hg nohelp',
670 > norepo=True)
670 > norepo=True)
671 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
671 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
672 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
672 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
673 > def nohelp(ui, *args, **kwargs):
673 > def nohelp(ui, *args, **kwargs):
674 > pass
674 > pass
675 >
675 >
676 > EOF
676 > EOF
677 $ echo '[extensions]' >> $HGRCPATH
677 $ echo '[extensions]' >> $HGRCPATH
678 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
678 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
679
679
680 Test command with no help text
680 Test command with no help text
681
681
682 $ hg help nohelp
682 $ hg help nohelp
683 hg nohelp
683 hg nohelp
684
684
685 (no help text available)
685 (no help text available)
686
686
687 options:
687 options:
688
688
689 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
689 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
690 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
690 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
691 -n -- normal desc
691 -n -- normal desc
692 --newline VALUE line1 line2
692 --newline VALUE line1 line2
693
693
694 (some details hidden, use --verbose to show complete help)
694 (some details hidden, use --verbose to show complete help)
695
695
696 $ hg help -k nohelp
696 $ hg help -k nohelp
697 Commands:
697 Commands:
698
698
699 nohelp hg nohelp
699 nohelp hg nohelp
700
700
701 Extension Commands:
701 Extension Commands:
702
702
703 nohelp (no help text available)
703 nohelp (no help text available)
704
704
705 Test that default list of commands omits extension commands
705 Test that default list of commands omits extension commands
706
706
707 $ hg help
707 $ hg help
708 Mercurial Distributed SCM
708 Mercurial Distributed SCM
709
709
710 list of commands:
710 list of commands:
711
711
712 add add the specified files on the next commit
712 add add the specified files on the next commit
713 addremove add all new files, delete all missing files
713 addremove add all new files, delete all missing files
714 annotate show changeset information by line for each file
714 annotate show changeset information by line for each file
715 archive create an unversioned archive of a repository revision
715 archive create an unversioned archive of a repository revision
716 backout reverse effect of earlier changeset
716 backout reverse effect of earlier changeset
717 bisect subdivision search of changesets
717 bisect subdivision search of changesets
718 bookmarks create a new bookmark or list existing bookmarks
718 bookmarks create a new bookmark or list existing bookmarks
719 branch set or show the current branch name
719 branch set or show the current branch name
720 branches list repository named branches
720 branches list repository named branches
721 bundle create a changegroup file
721 bundle create a changegroup file
722 cat output the current or given revision of files
722 cat output the current or given revision of files
723 clone make a copy of an existing repository
723 clone make a copy of an existing repository
724 commit commit the specified files or all outstanding changes
724 commit commit the specified files or all outstanding changes
725 config show combined config settings from all hgrc files
725 config show combined config settings from all hgrc files
726 copy mark files as copied for the next commit
726 copy mark files as copied for the next commit
727 diff diff repository (or selected files)
727 diff diff repository (or selected files)
728 export dump the header and diffs for one or more changesets
728 export dump the header and diffs for one or more changesets
729 files list tracked files
729 files list tracked files
730 forget forget the specified files on the next commit
730 forget forget the specified files on the next commit
731 graft copy changes from other branches onto the current branch
731 graft copy changes from other branches onto the current branch
732 grep search for a pattern in specified files and revisions
732 grep search for a pattern in specified files and revisions
733 heads show branch heads
733 heads show branch heads
734 help show help for a given topic or a help overview
734 help show help for a given topic or a help overview
735 identify identify the working directory or specified revision
735 identify identify the working directory or specified revision
736 import import an ordered set of patches
736 import import an ordered set of patches
737 incoming show new changesets found in source
737 incoming show new changesets found in source
738 init create a new repository in the given directory
738 init create a new repository in the given directory
739 log show revision history of entire repository or files
739 log show revision history of entire repository or files
740 manifest output the current or given revision of the project manifest
740 manifest output the current or given revision of the project manifest
741 merge merge another revision into working directory
741 merge merge another revision into working directory
742 outgoing show changesets not found in the destination
742 outgoing show changesets not found in the destination
743 paths show aliases for remote repositories
743 paths show aliases for remote repositories
744 phase set or show the current phase name
744 phase set or show the current phase name
745 pull pull changes from the specified source
745 pull pull changes from the specified source
746 push push changes to the specified destination
746 push push changes to the specified destination
747 recover roll back an interrupted transaction
747 recover roll back an interrupted transaction
748 remove remove the specified files on the next commit
748 remove remove the specified files on the next commit
749 rename rename files; equivalent of copy + remove
749 rename rename files; equivalent of copy + remove
750 resolve redo merges or set/view the merge status of files
750 resolve redo merges or set/view the merge status of files
751 revert restore files to their checkout state
751 revert restore files to their checkout state
752 root print the root (top) of the current working directory
752 root print the root (top) of the current working directory
753 serve start stand-alone webserver
753 serve start stand-alone webserver
754 status show changed files in the working directory
754 status show changed files in the working directory
755 summary summarize working directory state
755 summary summarize working directory state
756 tag add one or more tags for the current or given revision
756 tag add one or more tags for the current or given revision
757 tags list repository tags
757 tags list repository tags
758 unbundle apply one or more changegroup files
758 unbundle apply one or more changegroup files
759 update update working directory (or switch revisions)
759 update update working directory (or switch revisions)
760 verify verify the integrity of the repository
760 verify verify the integrity of the repository
761 version output version and copyright information
761 version output version and copyright information
762
762
763 enabled extensions:
763 enabled extensions:
764
764
765 helpext (no help text available)
765 helpext (no help text available)
766
766
767 additional help topics:
767 additional help topics:
768
768
769 config Configuration Files
769 config Configuration Files
770 dates Date Formats
770 dates Date Formats
771 diffs Diff Formats
771 diffs Diff Formats
772 environment Environment Variables
772 environment Environment Variables
773 extensions Using Additional Features
773 extensions Using Additional Features
774 filesets Specifying File Sets
774 filesets Specifying File Sets
775 glossary Glossary
775 glossary Glossary
776 hgignore Syntax for Mercurial Ignore Files
776 hgignore Syntax for Mercurial Ignore Files
777 hgweb Configuring hgweb
777 hgweb Configuring hgweb
778 internals Technical implementation topics
778 internals Technical implementation topics
779 merge-tools Merge Tools
779 merge-tools Merge Tools
780 multirevs Specifying Multiple Revisions
780 multirevs Specifying Multiple Revisions
781 patterns File Name Patterns
781 patterns File Name Patterns
782 phases Working with Phases
782 phases Working with Phases
783 revisions Specifying Single Revisions
783 revisions Specifying Single Revisions
784 revsets Specifying Revision Sets
784 revsets Specifying Revision Sets
785 scripting Using Mercurial from scripts and automation
785 scripting Using Mercurial from scripts and automation
786 subrepos Subrepositories
786 subrepos Subrepositories
787 templating Template Usage
787 templating Template Usage
788 urls URL Paths
788 urls URL Paths
789
789
790 (use "hg help -v" to show built-in aliases and global options)
790 (use "hg help -v" to show built-in aliases and global options)
791
791
792
792
793 Test list of internal help commands
793 Test list of internal help commands
794
794
795 $ hg help debug
795 $ hg help debug
796 debug commands (internal and unsupported):
796 debug commands (internal and unsupported):
797
797
798 debugancestor
798 debugancestor
799 find the ancestor revision of two revisions in a given index
799 find the ancestor revision of two revisions in a given index
800 debugapplystreamclonebundle
800 debugapplystreamclonebundle
801 apply a stream clone bundle file
801 apply a stream clone bundle file
802 debugbuilddag
802 debugbuilddag
803 builds a repo with a given DAG from scratch in the current
803 builds a repo with a given DAG from scratch in the current
804 empty repo
804 empty repo
805 debugbundle lists the contents of a bundle
805 debugbundle lists the contents of a bundle
806 debugcheckstate
806 debugcheckstate
807 validate the correctness of the current dirstate
807 validate the correctness of the current dirstate
808 debugcommands
808 debugcommands
809 list all available commands and options
809 list all available commands and options
810 debugcomplete
810 debugcomplete
811 returns the completion list associated with the given command
811 returns the completion list associated with the given command
812 debugcreatestreamclonebundle
812 debugcreatestreamclonebundle
813 create a stream clone bundle file
813 create a stream clone bundle file
814 debugdag format the changelog or an index DAG as a concise textual
814 debugdag format the changelog or an index DAG as a concise textual
815 description
815 description
816 debugdata dump the contents of a data file revision
816 debugdata dump the contents of a data file revision
817 debugdate parse and display a date
817 debugdate parse and display a date
818 debugdeltachain
818 debugdeltachain
819 dump information about delta chains in a revlog
819 dump information about delta chains in a revlog
820 debugdirstate
820 debugdirstate
821 show the contents of the current dirstate
821 show the contents of the current dirstate
822 debugdiscovery
822 debugdiscovery
823 runs the changeset discovery protocol in isolation
823 runs the changeset discovery protocol in isolation
824 debugextensions
824 debugextensions
825 show information about active extensions
825 show information about active extensions
826 debugfileset parse and apply a fileset specification
826 debugfileset parse and apply a fileset specification
827 debugfsinfo show information detected about current filesystem
827 debugfsinfo show information detected about current filesystem
828 debuggetbundle
828 debuggetbundle
829 retrieves a bundle from a repo
829 retrieves a bundle from a repo
830 debugignore display the combined ignore pattern
830 debugignore display the combined ignore pattern
831 debugindex dump the contents of an index file
831 debugindex dump the contents of an index file
832 debugindexdot
832 debugindexdot
833 dump an index DAG as a graphviz dot file
833 dump an index DAG as a graphviz dot file
834 debuginstall test Mercurial installation
834 debuginstall test Mercurial installation
835 debugknown test whether node ids are known to a repo
835 debugknown test whether node ids are known to a repo
836 debuglocks show or modify state of locks
836 debuglocks show or modify state of locks
837 debugmergestate
837 debugmergestate
838 print merge state
838 print merge state
839 debugnamecomplete
839 debugnamecomplete
840 complete "names" - tags, open branch names, bookmark names
840 complete "names" - tags, open branch names, bookmark names
841 debugobsolete
841 debugobsolete
842 create arbitrary obsolete marker
842 create arbitrary obsolete marker
843 debugoptDEP (no help text available)
843 debugoptDEP (no help text available)
844 debugoptEXP (no help text available)
844 debugoptEXP (no help text available)
845 debugpathcomplete
845 debugpathcomplete
846 complete part or all of a tracked path
846 complete part or all of a tracked path
847 debugpushkey access the pushkey key/value protocol
847 debugpushkey access the pushkey key/value protocol
848 debugpvec (no help text available)
848 debugpvec (no help text available)
849 debugrebuilddirstate
849 debugrebuilddirstate
850 rebuild the dirstate as it would look like for the given
850 rebuild the dirstate as it would look like for the given
851 revision
851 revision
852 debugrebuildfncache
852 debugrebuildfncache
853 rebuild the fncache file
853 rebuild the fncache file
854 debugrename dump rename information
854 debugrename dump rename information
855 debugrevlog show data and statistics about a revlog
855 debugrevlog show data and statistics about a revlog
856 debugrevspec parse and apply a revision specification
856 debugrevspec parse and apply a revision specification
857 debugsetparents
857 debugsetparents
858 manually set the parents of the current working directory
858 manually set the parents of the current working directory
859 debugsub (no help text available)
859 debugsub (no help text available)
860 debugsuccessorssets
860 debugsuccessorssets
861 show set of successors for revision
861 show set of successors for revision
862 debugwalk show how files match on given patterns
862 debugwalk show how files match on given patterns
863 debugwireargs
863 debugwireargs
864 (no help text available)
864 (no help text available)
865
865
866 (use "hg help -v debug" to show built-in aliases and global options)
866 (use "hg help -v debug" to show built-in aliases and global options)
867
867
868 internals topic renders index of available sub-topics
868 internals topic renders index of available sub-topics
869
869
870 $ hg help internals
870 $ hg help internals
871 Technical implementation topics
871 Technical implementation topics
872 """""""""""""""""""""""""""""""
872 """""""""""""""""""""""""""""""
873
873
874 bundles container for exchange of repository data
874 bundles container for exchange of repository data
875 changegroups representation of revlog data
875 changegroups representation of revlog data
876
876
877 sub-topics can be accessed
877 sub-topics can be accessed
878
878
879 $ hg help internals.changegroups
879 $ hg help internals.changegroups
880 Changegroups
880 Changegroups
881 ============
881 ============
882
882
883 Changegroups are representations of repository revlog data, specifically
883 Changegroups are representations of repository revlog data, specifically
884 the changelog, manifest, and filelogs.
884 the changelog, manifest, and filelogs.
885
885
886 There are 2 versions of changegroups: "1" and "2". From a high-level, they
886 There are 2 versions of changegroups: "1" and "2". From a high-level, they
887 are almost exactly the same, with the only difference being a header on
887 are almost exactly the same, with the only difference being a header on
888 entries in the changeset segment.
888 entries in the changeset segment.
889
889
890 Changegroups consists of 3 logical segments:
890 Changegroups consists of 3 logical segments:
891
891
892 +---------------------------------+
892 +---------------------------------+
893 | | | |
893 | | | |
894 | changeset | manifest | filelogs |
894 | changeset | manifest | filelogs |
895 | | | |
895 | | | |
896 +---------------------------------+
896 +---------------------------------+
897
897
898 The principle building block of each segment is a *chunk*. A *chunk* is a
898 The principle building block of each segment is a *chunk*. A *chunk* is a
899 framed piece of data:
899 framed piece of data:
900
900
901 +---------------------------------------+
901 +---------------------------------------+
902 | | |
902 | | |
903 | length | data |
903 | length | data |
904 | (32 bits) | <length> bytes |
904 | (32 bits) | <length> bytes |
905 | | |
905 | | |
906 +---------------------------------------+
906 +---------------------------------------+
907
907
908 Each chunk starts with a 32-bit big-endian signed integer indicating the
908 Each chunk starts with a 32-bit big-endian signed integer indicating the
909 length of the raw data that follows.
909 length of the raw data that follows.
910
910
911 There is a special case chunk that has 0 length ("0x00000000"). We call
911 There is a special case chunk that has 0 length ("0x00000000"). We call
912 this an *empty chunk*.
912 this an *empty chunk*.
913
913
914 Delta Groups
914 Delta Groups
915 ------------
915 ------------
916
916
917 A *delta group* expresses the content of a revlog as a series of deltas,
917 A *delta group* expresses the content of a revlog as a series of deltas,
918 or patches against previous revisions.
918 or patches against previous revisions.
919
919
920 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
920 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
921 to signal the end of the delta group:
921 to signal the end of the delta group:
922
922
923 +------------------------------------------------------------------------+
923 +------------------------------------------------------------------------+
924 | | | | | |
924 | | | | | |
925 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
925 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
926 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) |
926 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) |
927 | | | | | |
927 | | | | | |
928 +------------------------------------------------------------+-----------+
928 +------------------------------------------------------------+-----------+
929
929
930 Each *chunk*'s data consists of the following:
930 Each *chunk*'s data consists of the following:
931
931
932 +-----------------------------------------+
932 +-----------------------------------------+
933 | | | |
933 | | | |
934 | delta header | mdiff header | delta |
934 | delta header | mdiff header | delta |
935 | (various) | (12 bytes) | (various) |
935 | (various) | (12 bytes) | (various) |
936 | | | |
936 | | | |
937 +-----------------------------------------+
937 +-----------------------------------------+
938
938
939 The *length* field is the byte length of the remaining 3 logical pieces of
939 The *length* field is the byte length of the remaining 3 logical pieces of
940 data. The *delta* is a diff from an existing entry in the changelog.
940 data. The *delta* is a diff from an existing entry in the changelog.
941
941
942 The *delta header* is different between versions "1" and "2" of the
942 The *delta header* is different between versions "1" and "2" of the
943 changegroup format.
943 changegroup format.
944
944
945 Version 1:
945 Version 1:
946
946
947 +------------------------------------------------------+
947 +------------------------------------------------------+
948 | | | | |
948 | | | | |
949 | node | p1 node | p2 node | link node |
949 | node | p1 node | p2 node | link node |
950 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
950 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
951 | | | | |
951 | | | | |
952 +------------------------------------------------------+
952 +------------------------------------------------------+
953
953
954 Version 2:
954 Version 2:
955
955
956 +------------------------------------------------------------------+
956 +------------------------------------------------------------------+
957 | | | | | |
957 | | | | | |
958 | node | p1 node | p2 node | base node | link node |
958 | node | p1 node | p2 node | base node | link node |
959 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
959 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
960 | | | | | |
960 | | | | | |
961 +------------------------------------------------------------------+
961 +------------------------------------------------------------------+
962
962
963 The *mdiff header* consists of 3 32-bit big-endian signed integers
963 The *mdiff header* consists of 3 32-bit big-endian signed integers
964 describing offsets at which to apply the following delta content:
964 describing offsets at which to apply the following delta content:
965
965
966 +-------------------------------------+
966 +-------------------------------------+
967 | | | |
967 | | | |
968 | offset | old length | new length |
968 | offset | old length | new length |
969 | (32 bits) | (32 bits) | (32 bits) |
969 | (32 bits) | (32 bits) | (32 bits) |
970 | | | |
970 | | | |
971 +-------------------------------------+
971 +-------------------------------------+
972
972
973 In version 1, the delta is always applied against the previous node from
973 In version 1, the delta is always applied against the previous node from
974 the changegroup or the first parent if this is the first entry in the
974 the changegroup or the first parent if this is the first entry in the
975 changegroup.
975 changegroup.
976
976
977 In version 2, the delta base node is encoded in the entry in the
977 In version 2, the delta base node is encoded in the entry in the
978 changegroup. This allows the delta to be expressed against any parent,
978 changegroup. This allows the delta to be expressed against any parent,
979 which can result in smaller deltas and more efficient encoding of data.
979 which can result in smaller deltas and more efficient encoding of data.
980
980
981 Changeset Segment
981 Changeset Segment
982 -----------------
982 -----------------
983
983
984 The *changeset segment* consists of a single *delta group* holding
984 The *changeset segment* consists of a single *delta group* holding
985 changelog data. It is followed by an *empty chunk* to denote the boundary
985 changelog data. It is followed by an *empty chunk* to denote the boundary
986 to the *manifests segment*.
986 to the *manifests segment*.
987
987
988 Manifest Segment
988 Manifest Segment
989 ----------------
989 ----------------
990
990
991 The *manifest segment* consists of a single *delta group* holding manifest
991 The *manifest segment* consists of a single *delta group* holding manifest
992 data. It is followed by an *empty chunk* to denote the boundary to the
992 data. It is followed by an *empty chunk* to denote the boundary to the
993 *filelogs segment*.
993 *filelogs segment*.
994
994
995 Filelogs Segment
995 Filelogs Segment
996 ----------------
996 ----------------
997
997
998 The *filelogs* segment consists of multiple sub-segments, each
998 The *filelogs* segment consists of multiple sub-segments, each
999 corresponding to an individual file whose data is being described:
999 corresponding to an individual file whose data is being described:
1000
1000
1001 +--------------------------------------+
1001 +--------------------------------------+
1002 | | | | |
1002 | | | | |
1003 | filelog0 | filelog1 | filelog2 | ... |
1003 | filelog0 | filelog1 | filelog2 | ... |
1004 | | | | |
1004 | | | | |
1005 +--------------------------------------+
1005 +--------------------------------------+
1006
1006
1007 The final filelog sub-segment is followed by an *empty chunk* to denote
1007 The final filelog sub-segment is followed by an *empty chunk* to denote
1008 the end of the segment and the overall changegroup.
1008 the end of the segment and the overall changegroup.
1009
1009
1010 Each filelog sub-segment consists of the following:
1010 Each filelog sub-segment consists of the following:
1011
1011
1012 +------------------------------------------+
1012 +------------------------------------------+
1013 | | | |
1013 | | | |
1014 | filename size | filename | delta group |
1014 | filename size | filename | delta group |
1015 | (32 bits) | (various) | (various) |
1015 | (32 bits) | (various) | (various) |
1016 | | | |
1016 | | | |
1017 +------------------------------------------+
1017 +------------------------------------------+
1018
1018
1019 That is, a *chunk* consisting of the filename (not terminated or padded)
1019 That is, a *chunk* consisting of the filename (not terminated or padded)
1020 followed by N chunks constituting the *delta group* for this file.
1020 followed by N chunks constituting the *delta group* for this file.
1021
1021
1022 Test list of commands with command with no help text
1022 Test list of commands with command with no help text
1023
1023
1024 $ hg help helpext
1024 $ hg help helpext
1025 helpext extension - no help text available
1025 helpext extension - no help text available
1026
1026
1027 list of commands:
1027 list of commands:
1028
1028
1029 nohelp (no help text available)
1029 nohelp (no help text available)
1030
1030
1031 (use "hg help -v helpext" to show built-in aliases and global options)
1031 (use "hg help -v helpext" to show built-in aliases and global options)
1032
1032
1033
1033
1034 test deprecated and experimental options are hidden in command help
1034 test deprecated and experimental options are hidden in command help
1035 $ hg help debugoptDEP
1035 $ hg help debugoptDEP
1036 hg debugoptDEP
1036 hg debugoptDEP
1037
1037
1038 (no help text available)
1038 (no help text available)
1039
1039
1040 options:
1040 options:
1041
1041
1042 (some details hidden, use --verbose to show complete help)
1042 (some details hidden, use --verbose to show complete help)
1043
1043
1044 $ hg help debugoptEXP
1044 $ hg help debugoptEXP
1045 hg debugoptEXP
1045 hg debugoptEXP
1046
1046
1047 (no help text available)
1047 (no help text available)
1048
1048
1049 options:
1049 options:
1050
1050
1051 (some details hidden, use --verbose to show complete help)
1051 (some details hidden, use --verbose to show complete help)
1052
1052
1053 test deprecated and experimental options is shown with -v
1053 test deprecated and experimental options is shown with -v
1054 $ hg help -v debugoptDEP | grep dopt
1054 $ hg help -v debugoptDEP | grep dopt
1055 --dopt option is (DEPRECATED)
1055 --dopt option is (DEPRECATED)
1056 $ hg help -v debugoptEXP | grep eopt
1056 $ hg help -v debugoptEXP | grep eopt
1057 --eopt option is (EXPERIMENTAL)
1057 --eopt option is (EXPERIMENTAL)
1058
1058
1059 #if gettext
1059 #if gettext
1060 test deprecated option is hidden with translation with untranslated description
1060 test deprecated option is hidden with translation with untranslated description
1061 (use many globy for not failing on changed transaction)
1061 (use many globy for not failing on changed transaction)
1062 $ LANGUAGE=sv hg help debugoptDEP
1062 $ LANGUAGE=sv hg help debugoptDEP
1063 hg debugoptDEP
1063 hg debugoptDEP
1064
1064
1065 (*) (glob)
1065 (*) (glob)
1066
1066
1067 options:
1067 options:
1068
1068
1069 (some details hidden, use --verbose to show complete help)
1069 (some details hidden, use --verbose to show complete help)
1070 #endif
1070 #endif
1071
1071
1072 Test commands that collide with topics (issue4240)
1072 Test commands that collide with topics (issue4240)
1073
1073
1074 $ hg config -hq
1074 $ hg config -hq
1075 hg config [-u] [NAME]...
1075 hg config [-u] [NAME]...
1076
1076
1077 show combined config settings from all hgrc files
1077 show combined config settings from all hgrc files
1078 $ hg showconfig -hq
1078 $ hg showconfig -hq
1079 hg config [-u] [NAME]...
1079 hg config [-u] [NAME]...
1080
1080
1081 show combined config settings from all hgrc files
1081 show combined config settings from all hgrc files
1082
1082
1083 Test a help topic
1083 Test a help topic
1084
1084
1085 $ hg help revs
1085 $ hg help revs
1086 Specifying Single Revisions
1086 Specifying Single Revisions
1087 """""""""""""""""""""""""""
1087 """""""""""""""""""""""""""
1088
1088
1089 Mercurial supports several ways to specify individual revisions.
1089 Mercurial supports several ways to specify individual revisions.
1090
1090
1091 A plain integer is treated as a revision number. Negative integers are
1091 A plain integer is treated as a revision number. Negative integers are
1092 treated as sequential offsets from the tip, with -1 denoting the tip, -2
1092 treated as sequential offsets from the tip, with -1 denoting the tip, -2
1093 denoting the revision prior to the tip, and so forth.
1093 denoting the revision prior to the tip, and so forth.
1094
1094
1095 A 40-digit hexadecimal string is treated as a unique revision identifier.
1095 A 40-digit hexadecimal string is treated as a unique revision identifier.
1096
1096
1097 A hexadecimal string less than 40 characters long is treated as a unique
1097 A hexadecimal string less than 40 characters long is treated as a unique
1098 revision identifier and is referred to as a short-form identifier. A
1098 revision identifier and is referred to as a short-form identifier. A
1099 short-form identifier is only valid if it is the prefix of exactly one
1099 short-form identifier is only valid if it is the prefix of exactly one
1100 full-length identifier.
1100 full-length identifier.
1101
1101
1102 Any other string is treated as a bookmark, tag, or branch name. A bookmark
1102 Any other string is treated as a bookmark, tag, or branch name. A bookmark
1103 is a movable pointer to a revision. A tag is a permanent name associated
1103 is a movable pointer to a revision. A tag is a permanent name associated
1104 with a revision. A branch name denotes the tipmost open branch head of
1104 with a revision. A branch name denotes the tipmost open branch head of
1105 that branch - or if they are all closed, the tipmost closed head of the
1105 that branch - or if they are all closed, the tipmost closed head of the
1106 branch. Bookmark, tag, and branch names must not contain the ":"
1106 branch. Bookmark, tag, and branch names must not contain the ":"
1107 character.
1107 character.
1108
1108
1109 The reserved name "tip" always identifies the most recent revision.
1109 The reserved name "tip" always identifies the most recent revision.
1110
1110
1111 The reserved name "null" indicates the null revision. This is the revision
1111 The reserved name "null" indicates the null revision. This is the revision
1112 of an empty repository, and the parent of revision 0.
1112 of an empty repository, and the parent of revision 0.
1113
1113
1114 The reserved name "." indicates the working directory parent. If no
1114 The reserved name "." indicates the working directory parent. If no
1115 working directory is checked out, it is equivalent to null. If an
1115 working directory is checked out, it is equivalent to null. If an
1116 uncommitted merge is in progress, "." is the revision of the first parent.
1116 uncommitted merge is in progress, "." is the revision of the first parent.
1117
1117
1118 Test repeated config section name
1118 Test repeated config section name
1119
1119
1120 $ hg help config.host
1120 $ hg help config.host
1121 "http_proxy.host"
1121 "http_proxy.host"
1122 Host name and (optional) port of the proxy server, for example
1122 Host name and (optional) port of the proxy server, for example
1123 "myproxy:8000".
1123 "myproxy:8000".
1124
1124
1125 "smtp.host"
1125 "smtp.host"
1126 Host name of mail server, e.g. "mail.example.com".
1126 Host name of mail server, e.g. "mail.example.com".
1127
1127
1128 Unrelated trailing paragraphs shouldn't be included
1128 Unrelated trailing paragraphs shouldn't be included
1129
1129
1130 $ hg help config.extramsg | grep '^$'
1130 $ hg help config.extramsg | grep '^$'
1131
1131
1132
1132
1133 Test capitalized section name
1133 Test capitalized section name
1134
1134
1135 $ hg help scripting.HGPLAIN > /dev/null
1135 $ hg help scripting.HGPLAIN > /dev/null
1136
1136
1137 Help subsection:
1137 Help subsection:
1138
1138
1139 $ hg help config.charsets |grep "Email example:" > /dev/null
1139 $ hg help config.charsets |grep "Email example:" > /dev/null
1140 [1]
1140 [1]
1141
1141
1142 Show nested definitions
1142 Show nested definitions
1143 ("profiling.type"[break]"ls"[break]"stat"[break])
1143 ("profiling.type"[break]"ls"[break]"stat"[break])
1144
1144
1145 $ hg help config.type | egrep '^$'|wc -l
1145 $ hg help config.type | egrep '^$'|wc -l
1146 \s*3 (re)
1146 \s*3 (re)
1147
1147
1148 Last item in help config.*:
1148 Last item in help config.*:
1149
1149
1150 $ hg help config.`hg help config|grep '^ "'| \
1150 $ hg help config.`hg help config|grep '^ "'| \
1151 > tail -1|sed 's![ "]*!!g'`| \
1151 > tail -1|sed 's![ "]*!!g'`| \
1152 > grep "hg help -c config" > /dev/null
1152 > grep "hg help -c config" > /dev/null
1153 [1]
1153 [1]
1154
1154
1155 note to use help -c for general hg help config:
1155 note to use help -c for general hg help config:
1156
1156
1157 $ hg help config |grep "hg help -c config" > /dev/null
1157 $ hg help config |grep "hg help -c config" > /dev/null
1158
1158
1159 Test templating help
1159 Test templating help
1160
1160
1161 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1161 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1162 desc String. The text of the changeset description.
1162 desc String. The text of the changeset description.
1163 diffstat String. Statistics of changes with the following format:
1163 diffstat String. Statistics of changes with the following format:
1164 firstline Any text. Returns the first line of text.
1164 firstline Any text. Returns the first line of text.
1165 nonempty Any text. Returns '(none)' if the string is empty.
1165 nonempty Any text. Returns '(none)' if the string is empty.
1166
1166
1167 Test deprecated items
1167 Test deprecated items
1168
1168
1169 $ hg help -v templating | grep currentbookmark
1169 $ hg help -v templating | grep currentbookmark
1170 currentbookmark
1170 currentbookmark
1171 $ hg help templating | (grep currentbookmark || true)
1171 $ hg help templating | (grep currentbookmark || true)
1172
1172
1173 Test help hooks
1173 Test help hooks
1174
1174
1175 $ cat > helphook1.py <<EOF
1175 $ cat > helphook1.py <<EOF
1176 > from mercurial import help
1176 > from mercurial import help
1177 >
1177 >
1178 > def rewrite(ui, topic, doc):
1178 > def rewrite(ui, topic, doc):
1179 > return doc + '\nhelphook1\n'
1179 > return doc + '\nhelphook1\n'
1180 >
1180 >
1181 > def extsetup(ui):
1181 > def extsetup(ui):
1182 > help.addtopichook('revsets', rewrite)
1182 > help.addtopichook('revsets', rewrite)
1183 > EOF
1183 > EOF
1184 $ cat > helphook2.py <<EOF
1184 $ cat > helphook2.py <<EOF
1185 > from mercurial import help
1185 > from mercurial import help
1186 >
1186 >
1187 > def rewrite(ui, topic, doc):
1187 > def rewrite(ui, topic, doc):
1188 > return doc + '\nhelphook2\n'
1188 > return doc + '\nhelphook2\n'
1189 >
1189 >
1190 > def extsetup(ui):
1190 > def extsetup(ui):
1191 > help.addtopichook('revsets', rewrite)
1191 > help.addtopichook('revsets', rewrite)
1192 > EOF
1192 > EOF
1193 $ echo '[extensions]' >> $HGRCPATH
1193 $ echo '[extensions]' >> $HGRCPATH
1194 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1194 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1195 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1195 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1196 $ hg help revsets | grep helphook
1196 $ hg help revsets | grep helphook
1197 helphook1
1197 helphook1
1198 helphook2
1198 helphook2
1199
1199
1200 help -c should only show debug --debug
1200 help -c should only show debug --debug
1201
1201
1202 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1202 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1203 [1]
1203 [1]
1204
1204
1205 help -c should only show deprecated for -v
1205 help -c should only show deprecated for -v
1206
1206
1207 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1207 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1208 [1]
1208 [1]
1209
1209
1210 Test -e / -c / -k combinations
1210 Test -e / -c / -k combinations
1211
1211
1212 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1212 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1213 Commands:
1213 Commands:
1214 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1214 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1215 Extensions:
1215 Extensions:
1216 $ hg help -k|egrep '^[A-Z].*:'
1216 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1217 Topics:
1217 Topics:
1218 Commands:
1218 Commands:
1219 Extensions:
1219 Extensions:
1220 Extension Commands:
1220 Extension Commands:
1221 $ hg help -c schemes
1221 $ hg help -c schemes
1222 abort: no such help topic: schemes
1222 abort: no such help topic: schemes
1223 (try "hg help --keyword schemes")
1223 (try "hg help --keyword schemes")
1224 [255]
1224 [255]
1225 $ hg help -e schemes |head -1
1225 $ hg help -e schemes |head -1
1226 schemes extension - extend schemes with shortcuts to repository swarms
1226 schemes extension - extend schemes with shortcuts to repository swarms
1227 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1227 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1228 Commands:
1228 Commands:
1229 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1229 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1230 Extensions:
1230 Extensions:
1231 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1231 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1232 Extensions:
1232 Extensions:
1233 Commands:
1233 Commands:
1234 $ hg help -c commit > /dev/null
1234 $ hg help -c commit > /dev/null
1235 $ hg help -e -c commit > /dev/null
1235 $ hg help -e -c commit > /dev/null
1236 $ hg help -e commit > /dev/null
1236 $ hg help -e commit > /dev/null
1237 abort: no such help topic: commit
1237 abort: no such help topic: commit
1238 (try "hg help --keyword commit")
1238 (try "hg help --keyword commit")
1239 [255]
1239 [255]
1240
1240
1241 Test keyword search help
1241 Test keyword search help
1242
1242
1243 $ cat > prefixedname.py <<EOF
1243 $ cat > prefixedname.py <<EOF
1244 > '''matched against word "clone"
1244 > '''matched against word "clone"
1245 > '''
1245 > '''
1246 > EOF
1246 > EOF
1247 $ echo '[extensions]' >> $HGRCPATH
1247 $ echo '[extensions]' >> $HGRCPATH
1248 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1248 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1249 $ hg help -k clone
1249 $ hg help -k clone
1250 Topics:
1250 Topics:
1251
1251
1252 config Configuration Files
1252 config Configuration Files
1253 extensions Using Additional Features
1253 extensions Using Additional Features
1254 glossary Glossary
1254 glossary Glossary
1255 phases Working with Phases
1255 phases Working with Phases
1256 subrepos Subrepositories
1256 subrepos Subrepositories
1257 urls URL Paths
1257 urls URL Paths
1258
1258
1259 Commands:
1259 Commands:
1260
1260
1261 bookmarks create a new bookmark or list existing bookmarks
1261 bookmarks create a new bookmark or list existing bookmarks
1262 clone make a copy of an existing repository
1262 clone make a copy of an existing repository
1263 paths show aliases for remote repositories
1263 paths show aliases for remote repositories
1264 update update working directory (or switch revisions)
1264 update update working directory (or switch revisions)
1265
1265
1266 Extensions:
1266 Extensions:
1267
1267
1268 clonebundles advertise pre-generated bundles to seed clones (experimental)
1268 clonebundles advertise pre-generated bundles to seed clones (experimental)
1269 prefixedname matched against word "clone"
1269 prefixedname matched against word "clone"
1270 relink recreates hardlinks between repository clones
1270 relink recreates hardlinks between repository clones
1271
1271
1272 Extension Commands:
1272 Extension Commands:
1273
1273
1274 qclone clone main and patch repository at same time
1274 qclone clone main and patch repository at same time
1275
1275
1276 Test unfound topic
1276 Test unfound topic
1277
1277
1278 $ hg help nonexistingtopicthatwillneverexisteverever
1278 $ hg help nonexistingtopicthatwillneverexisteverever
1279 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1279 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1280 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
1280 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
1281 [255]
1281 [255]
1282
1282
1283 Test unfound keyword
1283 Test unfound keyword
1284
1284
1285 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1285 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1286 abort: no matches
1286 abort: no matches
1287 (try "hg help" for a list of topics)
1287 (try "hg help" for a list of topics)
1288 [255]
1288 [255]
1289
1289
1290 Test omit indicating for help
1290 Test omit indicating for help
1291
1291
1292 $ cat > addverboseitems.py <<EOF
1292 $ cat > addverboseitems.py <<EOF
1293 > '''extension to test omit indicating.
1293 > '''extension to test omit indicating.
1294 >
1294 >
1295 > This paragraph is never omitted (for extension)
1295 > This paragraph is never omitted (for extension)
1296 >
1296 >
1297 > .. container:: verbose
1297 > .. container:: verbose
1298 >
1298 >
1299 > This paragraph is omitted,
1299 > This paragraph is omitted,
1300 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1300 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1301 >
1301 >
1302 > This paragraph is never omitted, too (for extension)
1302 > This paragraph is never omitted, too (for extension)
1303 > '''
1303 > '''
1304 >
1304 >
1305 > from mercurial import help, commands
1305 > from mercurial import help, commands
1306 > testtopic = """This paragraph is never omitted (for topic).
1306 > testtopic = """This paragraph is never omitted (for topic).
1307 >
1307 >
1308 > .. container:: verbose
1308 > .. container:: verbose
1309 >
1309 >
1310 > This paragraph is omitted,
1310 > This paragraph is omitted,
1311 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1311 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1312 >
1312 >
1313 > This paragraph is never omitted, too (for topic)
1313 > This paragraph is never omitted, too (for topic)
1314 > """
1314 > """
1315 > def extsetup(ui):
1315 > def extsetup(ui):
1316 > help.helptable.append((["topic-containing-verbose"],
1316 > help.helptable.append((["topic-containing-verbose"],
1317 > "This is the topic to test omit indicating.",
1317 > "This is the topic to test omit indicating.",
1318 > lambda ui: testtopic))
1318 > lambda ui: testtopic))
1319 > EOF
1319 > EOF
1320 $ echo '[extensions]' >> $HGRCPATH
1320 $ echo '[extensions]' >> $HGRCPATH
1321 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1321 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1322 $ hg help addverboseitems
1322 $ hg help addverboseitems
1323 addverboseitems extension - extension to test omit indicating.
1323 addverboseitems extension - extension to test omit indicating.
1324
1324
1325 This paragraph is never omitted (for extension)
1325 This paragraph is never omitted (for extension)
1326
1326
1327 This paragraph is never omitted, too (for extension)
1327 This paragraph is never omitted, too (for extension)
1328
1328
1329 (some details hidden, use --verbose to show complete help)
1329 (some details hidden, use --verbose to show complete help)
1330
1330
1331 no commands defined
1331 no commands defined
1332 $ hg help -v addverboseitems
1332 $ hg help -v addverboseitems
1333 addverboseitems extension - extension to test omit indicating.
1333 addverboseitems extension - extension to test omit indicating.
1334
1334
1335 This paragraph is never omitted (for extension)
1335 This paragraph is never omitted (for extension)
1336
1336
1337 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1337 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1338 extension)
1338 extension)
1339
1339
1340 This paragraph is never omitted, too (for extension)
1340 This paragraph is never omitted, too (for extension)
1341
1341
1342 no commands defined
1342 no commands defined
1343 $ hg help topic-containing-verbose
1343 $ hg help topic-containing-verbose
1344 This is the topic to test omit indicating.
1344 This is the topic to test omit indicating.
1345 """"""""""""""""""""""""""""""""""""""""""
1345 """"""""""""""""""""""""""""""""""""""""""
1346
1346
1347 This paragraph is never omitted (for topic).
1347 This paragraph is never omitted (for topic).
1348
1348
1349 This paragraph is never omitted, too (for topic)
1349 This paragraph is never omitted, too (for topic)
1350
1350
1351 (some details hidden, use --verbose to show complete help)
1351 (some details hidden, use --verbose to show complete help)
1352 $ hg help -v topic-containing-verbose
1352 $ hg help -v topic-containing-verbose
1353 This is the topic to test omit indicating.
1353 This is the topic to test omit indicating.
1354 """"""""""""""""""""""""""""""""""""""""""
1354 """"""""""""""""""""""""""""""""""""""""""
1355
1355
1356 This paragraph is never omitted (for topic).
1356 This paragraph is never omitted (for topic).
1357
1357
1358 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1358 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1359 topic)
1359 topic)
1360
1360
1361 This paragraph is never omitted, too (for topic)
1361 This paragraph is never omitted, too (for topic)
1362
1362
1363 Test section lookup
1363 Test section lookup
1364
1364
1365 $ hg help revset.merge
1365 $ hg help revset.merge
1366 "merge()"
1366 "merge()"
1367 Changeset is a merge changeset.
1367 Changeset is a merge changeset.
1368
1368
1369 $ hg help glossary.dag
1369 $ hg help glossary.dag
1370 DAG
1370 DAG
1371 The repository of changesets of a distributed version control system
1371 The repository of changesets of a distributed version control system
1372 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1372 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1373 of nodes and edges, where nodes correspond to changesets and edges
1373 of nodes and edges, where nodes correspond to changesets and edges
1374 imply a parent -> child relation. This graph can be visualized by
1374 imply a parent -> child relation. This graph can be visualized by
1375 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1375 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1376 limited by the requirement for children to have at most two parents.
1376 limited by the requirement for children to have at most two parents.
1377
1377
1378
1378
1379 $ hg help hgrc.paths
1379 $ hg help hgrc.paths
1380 "paths"
1380 "paths"
1381 -------
1381 -------
1382
1382
1383 Assigns symbolic names and behavior to repositories.
1383 Assigns symbolic names and behavior to repositories.
1384
1384
1385 Options are symbolic names defining the URL or directory that is the
1385 Options are symbolic names defining the URL or directory that is the
1386 location of the repository. Example:
1386 location of the repository. Example:
1387
1387
1388 [paths]
1388 [paths]
1389 my_server = https://example.com/my_repo
1389 my_server = https://example.com/my_repo
1390 local_path = /home/me/repo
1390 local_path = /home/me/repo
1391
1391
1392 These symbolic names can be used from the command line. To pull from
1392 These symbolic names can be used from the command line. To pull from
1393 "my_server": "hg pull my_server". To push to "local_path": "hg push
1393 "my_server": "hg pull my_server". To push to "local_path": "hg push
1394 local_path".
1394 local_path".
1395
1395
1396 Options containing colons (":") denote sub-options that can influence
1396 Options containing colons (":") denote sub-options that can influence
1397 behavior for that specific path. Example:
1397 behavior for that specific path. Example:
1398
1398
1399 [paths]
1399 [paths]
1400 my_server = https://example.com/my_path
1400 my_server = https://example.com/my_path
1401 my_server:pushurl = ssh://example.com/my_path
1401 my_server:pushurl = ssh://example.com/my_path
1402
1402
1403 The following sub-options can be defined:
1403 The following sub-options can be defined:
1404
1404
1405 "pushurl"
1405 "pushurl"
1406 The URL to use for push operations. If not defined, the location
1406 The URL to use for push operations. If not defined, the location
1407 defined by the path's main entry is used.
1407 defined by the path's main entry is used.
1408
1408
1409 The following special named paths exist:
1409 The following special named paths exist:
1410
1410
1411 "default"
1411 "default"
1412 The URL or directory to use when no source or remote is specified.
1412 The URL or directory to use when no source or remote is specified.
1413
1413
1414 "hg clone" will automatically define this path to the location the
1414 "hg clone" will automatically define this path to the location the
1415 repository was cloned from.
1415 repository was cloned from.
1416
1416
1417 "default-push"
1417 "default-push"
1418 (deprecated) The URL or directory for the default "hg push" location.
1418 (deprecated) The URL or directory for the default "hg push" location.
1419 "default:pushurl" should be used instead.
1419 "default:pushurl" should be used instead.
1420
1420
1421 $ hg help glossary.mcguffin
1421 $ hg help glossary.mcguffin
1422 abort: help section not found
1422 abort: help section not found
1423 [255]
1423 [255]
1424
1424
1425 $ hg help glossary.mc.guffin
1425 $ hg help glossary.mc.guffin
1426 abort: help section not found
1426 abort: help section not found
1427 [255]
1427 [255]
1428
1428
1429 $ hg help template.files
1429 $ hg help template.files
1430 files List of strings. All files modified, added, or removed by
1430 files List of strings. All files modified, added, or removed by
1431 this changeset.
1431 this changeset.
1432
1432
1433 Test dynamic list of merge tools only shows up once
1433 Test dynamic list of merge tools only shows up once
1434 $ hg help merge-tools
1434 $ hg help merge-tools
1435 Merge Tools
1435 Merge Tools
1436 """""""""""
1436 """""""""""
1437
1437
1438 To merge files Mercurial uses merge tools.
1438 To merge files Mercurial uses merge tools.
1439
1439
1440 A merge tool combines two different versions of a file into a merged file.
1440 A merge tool combines two different versions of a file into a merged file.
1441 Merge tools are given the two files and the greatest common ancestor of
1441 Merge tools are given the two files and the greatest common ancestor of
1442 the two file versions, so they can determine the changes made on both
1442 the two file versions, so they can determine the changes made on both
1443 branches.
1443 branches.
1444
1444
1445 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1445 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1446 backout" and in several extensions.
1446 backout" and in several extensions.
1447
1447
1448 Usually, the merge tool tries to automatically reconcile the files by
1448 Usually, the merge tool tries to automatically reconcile the files by
1449 combining all non-overlapping changes that occurred separately in the two
1449 combining all non-overlapping changes that occurred separately in the two
1450 different evolutions of the same initial base file. Furthermore, some
1450 different evolutions of the same initial base file. Furthermore, some
1451 interactive merge programs make it easier to manually resolve conflicting
1451 interactive merge programs make it easier to manually resolve conflicting
1452 merges, either in a graphical way, or by inserting some conflict markers.
1452 merges, either in a graphical way, or by inserting some conflict markers.
1453 Mercurial does not include any interactive merge programs but relies on
1453 Mercurial does not include any interactive merge programs but relies on
1454 external tools for that.
1454 external tools for that.
1455
1455
1456 Available merge tools
1456 Available merge tools
1457 =====================
1457 =====================
1458
1458
1459 External merge tools and their properties are configured in the merge-
1459 External merge tools and their properties are configured in the merge-
1460 tools configuration section - see hgrc(5) - but they can often just be
1460 tools configuration section - see hgrc(5) - but they can often just be
1461 named by their executable.
1461 named by their executable.
1462
1462
1463 A merge tool is generally usable if its executable can be found on the
1463 A merge tool is generally usable if its executable can be found on the
1464 system and if it can handle the merge. The executable is found if it is an
1464 system and if it can handle the merge. The executable is found if it is an
1465 absolute or relative executable path or the name of an application in the
1465 absolute or relative executable path or the name of an application in the
1466 executable search path. The tool is assumed to be able to handle the merge
1466 executable search path. The tool is assumed to be able to handle the merge
1467 if it can handle symlinks if the file is a symlink, if it can handle
1467 if it can handle symlinks if the file is a symlink, if it can handle
1468 binary files if the file is binary, and if a GUI is available if the tool
1468 binary files if the file is binary, and if a GUI is available if the tool
1469 requires a GUI.
1469 requires a GUI.
1470
1470
1471 There are some internal merge tools which can be used. The internal merge
1471 There are some internal merge tools which can be used. The internal merge
1472 tools are:
1472 tools are:
1473
1473
1474 ":dump"
1474 ":dump"
1475 Creates three versions of the files to merge, containing the contents of
1475 Creates three versions of the files to merge, containing the contents of
1476 local, other and base. These files can then be used to perform a merge
1476 local, other and base. These files can then be used to perform a merge
1477 manually. If the file to be merged is named "a.txt", these files will
1477 manually. If the file to be merged is named "a.txt", these files will
1478 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1478 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1479 they will be placed in the same directory as "a.txt".
1479 they will be placed in the same directory as "a.txt".
1480
1480
1481 ":fail"
1481 ":fail"
1482 Rather than attempting to merge files that were modified on both
1482 Rather than attempting to merge files that were modified on both
1483 branches, it marks them as unresolved. The resolve command must be used
1483 branches, it marks them as unresolved. The resolve command must be used
1484 to resolve these conflicts.
1484 to resolve these conflicts.
1485
1485
1486 ":local"
1486 ":local"
1487 Uses the local version of files as the merged version.
1487 Uses the local version of files as the merged version.
1488
1488
1489 ":merge"
1489 ":merge"
1490 Uses the internal non-interactive simple merge algorithm for merging
1490 Uses the internal non-interactive simple merge algorithm for merging
1491 files. It will fail if there are any conflicts and leave markers in the
1491 files. It will fail if there are any conflicts and leave markers in the
1492 partially merged file. Markers will have two sections, one for each side
1492 partially merged file. Markers will have two sections, one for each side
1493 of merge.
1493 of merge.
1494
1494
1495 ":merge-local"
1495 ":merge-local"
1496 Like :merge, but resolve all conflicts non-interactively in favor of the
1496 Like :merge, but resolve all conflicts non-interactively in favor of the
1497 local changes.
1497 local changes.
1498
1498
1499 ":merge-other"
1499 ":merge-other"
1500 Like :merge, but resolve all conflicts non-interactively in favor of the
1500 Like :merge, but resolve all conflicts non-interactively in favor of the
1501 other changes.
1501 other changes.
1502
1502
1503 ":merge3"
1503 ":merge3"
1504 Uses the internal non-interactive simple merge algorithm for merging
1504 Uses the internal non-interactive simple merge algorithm for merging
1505 files. It will fail if there are any conflicts and leave markers in the
1505 files. It will fail if there are any conflicts and leave markers in the
1506 partially merged file. Marker will have three sections, one from each
1506 partially merged file. Marker will have three sections, one from each
1507 side of the merge and one for the base content.
1507 side of the merge and one for the base content.
1508
1508
1509 ":other"
1509 ":other"
1510 Uses the other version of files as the merged version.
1510 Uses the other version of files as the merged version.
1511
1511
1512 ":prompt"
1512 ":prompt"
1513 Asks the user which of the local or the other version to keep as the
1513 Asks the user which of the local or the other version to keep as the
1514 merged version.
1514 merged version.
1515
1515
1516 ":tagmerge"
1516 ":tagmerge"
1517 Uses the internal tag merge algorithm (experimental).
1517 Uses the internal tag merge algorithm (experimental).
1518
1518
1519 ":union"
1519 ":union"
1520 Uses the internal non-interactive simple merge algorithm for merging
1520 Uses the internal non-interactive simple merge algorithm for merging
1521 files. It will use both left and right sides for conflict regions. No
1521 files. It will use both left and right sides for conflict regions. No
1522 markers are inserted.
1522 markers are inserted.
1523
1523
1524 Internal tools are always available and do not require a GUI but will by
1524 Internal tools are always available and do not require a GUI but will by
1525 default not handle symlinks or binary files.
1525 default not handle symlinks or binary files.
1526
1526
1527 Choosing a merge tool
1527 Choosing a merge tool
1528 =====================
1528 =====================
1529
1529
1530 Mercurial uses these rules when deciding which merge tool to use:
1530 Mercurial uses these rules when deciding which merge tool to use:
1531
1531
1532 1. If a tool has been specified with the --tool option to merge or
1532 1. If a tool has been specified with the --tool option to merge or
1533 resolve, it is used. If it is the name of a tool in the merge-tools
1533 resolve, it is used. If it is the name of a tool in the merge-tools
1534 configuration, its configuration is used. Otherwise the specified tool
1534 configuration, its configuration is used. Otherwise the specified tool
1535 must be executable by the shell.
1535 must be executable by the shell.
1536 2. If the "HGMERGE" environment variable is present, its value is used and
1536 2. If the "HGMERGE" environment variable is present, its value is used and
1537 must be executable by the shell.
1537 must be executable by the shell.
1538 3. If the filename of the file to be merged matches any of the patterns in
1538 3. If the filename of the file to be merged matches any of the patterns in
1539 the merge-patterns configuration section, the first usable merge tool
1539 the merge-patterns configuration section, the first usable merge tool
1540 corresponding to a matching pattern is used. Here, binary capabilities
1540 corresponding to a matching pattern is used. Here, binary capabilities
1541 of the merge tool are not considered.
1541 of the merge tool are not considered.
1542 4. If ui.merge is set it will be considered next. If the value is not the
1542 4. If ui.merge is set it will be considered next. If the value is not the
1543 name of a configured tool, the specified value is used and must be
1543 name of a configured tool, the specified value is used and must be
1544 executable by the shell. Otherwise the named tool is used if it is
1544 executable by the shell. Otherwise the named tool is used if it is
1545 usable.
1545 usable.
1546 5. If any usable merge tools are present in the merge-tools configuration
1546 5. If any usable merge tools are present in the merge-tools configuration
1547 section, the one with the highest priority is used.
1547 section, the one with the highest priority is used.
1548 6. If a program named "hgmerge" can be found on the system, it is used -
1548 6. If a program named "hgmerge" can be found on the system, it is used -
1549 but it will by default not be used for symlinks and binary files.
1549 but it will by default not be used for symlinks and binary files.
1550 7. If the file to be merged is not binary and is not a symlink, then
1550 7. If the file to be merged is not binary and is not a symlink, then
1551 internal ":merge" is used.
1551 internal ":merge" is used.
1552 8. The merge of the file fails and must be resolved before commit.
1552 8. The merge of the file fails and must be resolved before commit.
1553
1553
1554 Note:
1554 Note:
1555 After selecting a merge program, Mercurial will by default attempt to
1555 After selecting a merge program, Mercurial will by default attempt to
1556 merge the files using a simple merge algorithm first. Only if it
1556 merge the files using a simple merge algorithm first. Only if it
1557 doesn't succeed because of conflicting changes Mercurial will actually
1557 doesn't succeed because of conflicting changes Mercurial will actually
1558 execute the merge program. Whether to use the simple merge algorithm
1558 execute the merge program. Whether to use the simple merge algorithm
1559 first can be controlled by the premerge setting of the merge tool.
1559 first can be controlled by the premerge setting of the merge tool.
1560 Premerge is enabled by default unless the file is binary or a symlink.
1560 Premerge is enabled by default unless the file is binary or a symlink.
1561
1561
1562 See the merge-tools and ui sections of hgrc(5) for details on the
1562 See the merge-tools and ui sections of hgrc(5) for details on the
1563 configuration of merge tools.
1563 configuration of merge tools.
1564
1564
1565 Test usage of section marks in help documents
1565 Test usage of section marks in help documents
1566
1566
1567 $ cd "$TESTDIR"/../doc
1567 $ cd "$TESTDIR"/../doc
1568 $ python check-seclevel.py
1568 $ python check-seclevel.py
1569 $ cd $TESTTMP
1569 $ cd $TESTTMP
1570
1570
1571 #if serve
1571 #if serve
1572
1572
1573 Test the help pages in hgweb.
1573 Test the help pages in hgweb.
1574
1574
1575 Dish up an empty repo; serve it cold.
1575 Dish up an empty repo; serve it cold.
1576
1576
1577 $ hg init "$TESTTMP/test"
1577 $ hg init "$TESTTMP/test"
1578 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1578 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1579 $ cat hg.pid >> $DAEMON_PIDS
1579 $ cat hg.pid >> $DAEMON_PIDS
1580
1580
1581 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1581 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1582 200 Script output follows
1582 200 Script output follows
1583
1583
1584 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1584 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1585 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1585 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1586 <head>
1586 <head>
1587 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1587 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1588 <meta name="robots" content="index, nofollow" />
1588 <meta name="robots" content="index, nofollow" />
1589 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1589 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1590 <script type="text/javascript" src="/static/mercurial.js"></script>
1590 <script type="text/javascript" src="/static/mercurial.js"></script>
1591
1591
1592 <title>Help: Index</title>
1592 <title>Help: Index</title>
1593 </head>
1593 </head>
1594 <body>
1594 <body>
1595
1595
1596 <div class="container">
1596 <div class="container">
1597 <div class="menu">
1597 <div class="menu">
1598 <div class="logo">
1598 <div class="logo">
1599 <a href="https://mercurial-scm.org/">
1599 <a href="https://mercurial-scm.org/">
1600 <img src="/static/hglogo.png" alt="mercurial" /></a>
1600 <img src="/static/hglogo.png" alt="mercurial" /></a>
1601 </div>
1601 </div>
1602 <ul>
1602 <ul>
1603 <li><a href="/shortlog">log</a></li>
1603 <li><a href="/shortlog">log</a></li>
1604 <li><a href="/graph">graph</a></li>
1604 <li><a href="/graph">graph</a></li>
1605 <li><a href="/tags">tags</a></li>
1605 <li><a href="/tags">tags</a></li>
1606 <li><a href="/bookmarks">bookmarks</a></li>
1606 <li><a href="/bookmarks">bookmarks</a></li>
1607 <li><a href="/branches">branches</a></li>
1607 <li><a href="/branches">branches</a></li>
1608 </ul>
1608 </ul>
1609 <ul>
1609 <ul>
1610 <li class="active">help</li>
1610 <li class="active">help</li>
1611 </ul>
1611 </ul>
1612 </div>
1612 </div>
1613
1613
1614 <div class="main">
1614 <div class="main">
1615 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1615 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1616 <form class="search" action="/log">
1616 <form class="search" action="/log">
1617
1617
1618 <p><input name="rev" id="search1" type="text" size="30" /></p>
1618 <p><input name="rev" id="search1" type="text" size="30" /></p>
1619 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1619 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1620 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1620 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1621 </form>
1621 </form>
1622 <table class="bigtable">
1622 <table class="bigtable">
1623 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1623 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1624
1624
1625 <tr><td>
1625 <tr><td>
1626 <a href="/help/config">
1626 <a href="/help/config">
1627 config
1627 config
1628 </a>
1628 </a>
1629 </td><td>
1629 </td><td>
1630 Configuration Files
1630 Configuration Files
1631 </td></tr>
1631 </td></tr>
1632 <tr><td>
1632 <tr><td>
1633 <a href="/help/dates">
1633 <a href="/help/dates">
1634 dates
1634 dates
1635 </a>
1635 </a>
1636 </td><td>
1636 </td><td>
1637 Date Formats
1637 Date Formats
1638 </td></tr>
1638 </td></tr>
1639 <tr><td>
1639 <tr><td>
1640 <a href="/help/diffs">
1640 <a href="/help/diffs">
1641 diffs
1641 diffs
1642 </a>
1642 </a>
1643 </td><td>
1643 </td><td>
1644 Diff Formats
1644 Diff Formats
1645 </td></tr>
1645 </td></tr>
1646 <tr><td>
1646 <tr><td>
1647 <a href="/help/environment">
1647 <a href="/help/environment">
1648 environment
1648 environment
1649 </a>
1649 </a>
1650 </td><td>
1650 </td><td>
1651 Environment Variables
1651 Environment Variables
1652 </td></tr>
1652 </td></tr>
1653 <tr><td>
1653 <tr><td>
1654 <a href="/help/extensions">
1654 <a href="/help/extensions">
1655 extensions
1655 extensions
1656 </a>
1656 </a>
1657 </td><td>
1657 </td><td>
1658 Using Additional Features
1658 Using Additional Features
1659 </td></tr>
1659 </td></tr>
1660 <tr><td>
1660 <tr><td>
1661 <a href="/help/filesets">
1661 <a href="/help/filesets">
1662 filesets
1662 filesets
1663 </a>
1663 </a>
1664 </td><td>
1664 </td><td>
1665 Specifying File Sets
1665 Specifying File Sets
1666 </td></tr>
1666 </td></tr>
1667 <tr><td>
1667 <tr><td>
1668 <a href="/help/glossary">
1668 <a href="/help/glossary">
1669 glossary
1669 glossary
1670 </a>
1670 </a>
1671 </td><td>
1671 </td><td>
1672 Glossary
1672 Glossary
1673 </td></tr>
1673 </td></tr>
1674 <tr><td>
1674 <tr><td>
1675 <a href="/help/hgignore">
1675 <a href="/help/hgignore">
1676 hgignore
1676 hgignore
1677 </a>
1677 </a>
1678 </td><td>
1678 </td><td>
1679 Syntax for Mercurial Ignore Files
1679 Syntax for Mercurial Ignore Files
1680 </td></tr>
1680 </td></tr>
1681 <tr><td>
1681 <tr><td>
1682 <a href="/help/hgweb">
1682 <a href="/help/hgweb">
1683 hgweb
1683 hgweb
1684 </a>
1684 </a>
1685 </td><td>
1685 </td><td>
1686 Configuring hgweb
1686 Configuring hgweb
1687 </td></tr>
1687 </td></tr>
1688 <tr><td>
1688 <tr><td>
1689 <a href="/help/internals">
1689 <a href="/help/internals">
1690 internals
1690 internals
1691 </a>
1691 </a>
1692 </td><td>
1692 </td><td>
1693 Technical implementation topics
1693 Technical implementation topics
1694 </td></tr>
1694 </td></tr>
1695 <tr><td>
1695 <tr><td>
1696 <a href="/help/merge-tools">
1696 <a href="/help/merge-tools">
1697 merge-tools
1697 merge-tools
1698 </a>
1698 </a>
1699 </td><td>
1699 </td><td>
1700 Merge Tools
1700 Merge Tools
1701 </td></tr>
1701 </td></tr>
1702 <tr><td>
1702 <tr><td>
1703 <a href="/help/multirevs">
1703 <a href="/help/multirevs">
1704 multirevs
1704 multirevs
1705 </a>
1705 </a>
1706 </td><td>
1706 </td><td>
1707 Specifying Multiple Revisions
1707 Specifying Multiple Revisions
1708 </td></tr>
1708 </td></tr>
1709 <tr><td>
1709 <tr><td>
1710 <a href="/help/patterns">
1710 <a href="/help/patterns">
1711 patterns
1711 patterns
1712 </a>
1712 </a>
1713 </td><td>
1713 </td><td>
1714 File Name Patterns
1714 File Name Patterns
1715 </td></tr>
1715 </td></tr>
1716 <tr><td>
1716 <tr><td>
1717 <a href="/help/phases">
1717 <a href="/help/phases">
1718 phases
1718 phases
1719 </a>
1719 </a>
1720 </td><td>
1720 </td><td>
1721 Working with Phases
1721 Working with Phases
1722 </td></tr>
1722 </td></tr>
1723 <tr><td>
1723 <tr><td>
1724 <a href="/help/revisions">
1724 <a href="/help/revisions">
1725 revisions
1725 revisions
1726 </a>
1726 </a>
1727 </td><td>
1727 </td><td>
1728 Specifying Single Revisions
1728 Specifying Single Revisions
1729 </td></tr>
1729 </td></tr>
1730 <tr><td>
1730 <tr><td>
1731 <a href="/help/revsets">
1731 <a href="/help/revsets">
1732 revsets
1732 revsets
1733 </a>
1733 </a>
1734 </td><td>
1734 </td><td>
1735 Specifying Revision Sets
1735 Specifying Revision Sets
1736 </td></tr>
1736 </td></tr>
1737 <tr><td>
1737 <tr><td>
1738 <a href="/help/scripting">
1738 <a href="/help/scripting">
1739 scripting
1739 scripting
1740 </a>
1740 </a>
1741 </td><td>
1741 </td><td>
1742 Using Mercurial from scripts and automation
1742 Using Mercurial from scripts and automation
1743 </td></tr>
1743 </td></tr>
1744 <tr><td>
1744 <tr><td>
1745 <a href="/help/subrepos">
1745 <a href="/help/subrepos">
1746 subrepos
1746 subrepos
1747 </a>
1747 </a>
1748 </td><td>
1748 </td><td>
1749 Subrepositories
1749 Subrepositories
1750 </td></tr>
1750 </td></tr>
1751 <tr><td>
1751 <tr><td>
1752 <a href="/help/templating">
1752 <a href="/help/templating">
1753 templating
1753 templating
1754 </a>
1754 </a>
1755 </td><td>
1755 </td><td>
1756 Template Usage
1756 Template Usage
1757 </td></tr>
1757 </td></tr>
1758 <tr><td>
1758 <tr><td>
1759 <a href="/help/urls">
1759 <a href="/help/urls">
1760 urls
1760 urls
1761 </a>
1761 </a>
1762 </td><td>
1762 </td><td>
1763 URL Paths
1763 URL Paths
1764 </td></tr>
1764 </td></tr>
1765 <tr><td>
1765 <tr><td>
1766 <a href="/help/topic-containing-verbose">
1766 <a href="/help/topic-containing-verbose">
1767 topic-containing-verbose
1767 topic-containing-verbose
1768 </a>
1768 </a>
1769 </td><td>
1769 </td><td>
1770 This is the topic to test omit indicating.
1770 This is the topic to test omit indicating.
1771 </td></tr>
1771 </td></tr>
1772
1772
1773 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1773 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1774
1774
1775 <tr><td>
1775 <tr><td>
1776 <a href="/help/add">
1776 <a href="/help/add">
1777 add
1777 add
1778 </a>
1778 </a>
1779 </td><td>
1779 </td><td>
1780 add the specified files on the next commit
1780 add the specified files on the next commit
1781 </td></tr>
1781 </td></tr>
1782 <tr><td>
1782 <tr><td>
1783 <a href="/help/annotate">
1783 <a href="/help/annotate">
1784 annotate
1784 annotate
1785 </a>
1785 </a>
1786 </td><td>
1786 </td><td>
1787 show changeset information by line for each file
1787 show changeset information by line for each file
1788 </td></tr>
1788 </td></tr>
1789 <tr><td>
1789 <tr><td>
1790 <a href="/help/clone">
1790 <a href="/help/clone">
1791 clone
1791 clone
1792 </a>
1792 </a>
1793 </td><td>
1793 </td><td>
1794 make a copy of an existing repository
1794 make a copy of an existing repository
1795 </td></tr>
1795 </td></tr>
1796 <tr><td>
1796 <tr><td>
1797 <a href="/help/commit">
1797 <a href="/help/commit">
1798 commit
1798 commit
1799 </a>
1799 </a>
1800 </td><td>
1800 </td><td>
1801 commit the specified files or all outstanding changes
1801 commit the specified files or all outstanding changes
1802 </td></tr>
1802 </td></tr>
1803 <tr><td>
1803 <tr><td>
1804 <a href="/help/diff">
1804 <a href="/help/diff">
1805 diff
1805 diff
1806 </a>
1806 </a>
1807 </td><td>
1807 </td><td>
1808 diff repository (or selected files)
1808 diff repository (or selected files)
1809 </td></tr>
1809 </td></tr>
1810 <tr><td>
1810 <tr><td>
1811 <a href="/help/export">
1811 <a href="/help/export">
1812 export
1812 export
1813 </a>
1813 </a>
1814 </td><td>
1814 </td><td>
1815 dump the header and diffs for one or more changesets
1815 dump the header and diffs for one or more changesets
1816 </td></tr>
1816 </td></tr>
1817 <tr><td>
1817 <tr><td>
1818 <a href="/help/forget">
1818 <a href="/help/forget">
1819 forget
1819 forget
1820 </a>
1820 </a>
1821 </td><td>
1821 </td><td>
1822 forget the specified files on the next commit
1822 forget the specified files on the next commit
1823 </td></tr>
1823 </td></tr>
1824 <tr><td>
1824 <tr><td>
1825 <a href="/help/init">
1825 <a href="/help/init">
1826 init
1826 init
1827 </a>
1827 </a>
1828 </td><td>
1828 </td><td>
1829 create a new repository in the given directory
1829 create a new repository in the given directory
1830 </td></tr>
1830 </td></tr>
1831 <tr><td>
1831 <tr><td>
1832 <a href="/help/log">
1832 <a href="/help/log">
1833 log
1833 log
1834 </a>
1834 </a>
1835 </td><td>
1835 </td><td>
1836 show revision history of entire repository or files
1836 show revision history of entire repository or files
1837 </td></tr>
1837 </td></tr>
1838 <tr><td>
1838 <tr><td>
1839 <a href="/help/merge">
1839 <a href="/help/merge">
1840 merge
1840 merge
1841 </a>
1841 </a>
1842 </td><td>
1842 </td><td>
1843 merge another revision into working directory
1843 merge another revision into working directory
1844 </td></tr>
1844 </td></tr>
1845 <tr><td>
1845 <tr><td>
1846 <a href="/help/pull">
1846 <a href="/help/pull">
1847 pull
1847 pull
1848 </a>
1848 </a>
1849 </td><td>
1849 </td><td>
1850 pull changes from the specified source
1850 pull changes from the specified source
1851 </td></tr>
1851 </td></tr>
1852 <tr><td>
1852 <tr><td>
1853 <a href="/help/push">
1853 <a href="/help/push">
1854 push
1854 push
1855 </a>
1855 </a>
1856 </td><td>
1856 </td><td>
1857 push changes to the specified destination
1857 push changes to the specified destination
1858 </td></tr>
1858 </td></tr>
1859 <tr><td>
1859 <tr><td>
1860 <a href="/help/remove">
1860 <a href="/help/remove">
1861 remove
1861 remove
1862 </a>
1862 </a>
1863 </td><td>
1863 </td><td>
1864 remove the specified files on the next commit
1864 remove the specified files on the next commit
1865 </td></tr>
1865 </td></tr>
1866 <tr><td>
1866 <tr><td>
1867 <a href="/help/serve">
1867 <a href="/help/serve">
1868 serve
1868 serve
1869 </a>
1869 </a>
1870 </td><td>
1870 </td><td>
1871 start stand-alone webserver
1871 start stand-alone webserver
1872 </td></tr>
1872 </td></tr>
1873 <tr><td>
1873 <tr><td>
1874 <a href="/help/status">
1874 <a href="/help/status">
1875 status
1875 status
1876 </a>
1876 </a>
1877 </td><td>
1877 </td><td>
1878 show changed files in the working directory
1878 show changed files in the working directory
1879 </td></tr>
1879 </td></tr>
1880 <tr><td>
1880 <tr><td>
1881 <a href="/help/summary">
1881 <a href="/help/summary">
1882 summary
1882 summary
1883 </a>
1883 </a>
1884 </td><td>
1884 </td><td>
1885 summarize working directory state
1885 summarize working directory state
1886 </td></tr>
1886 </td></tr>
1887 <tr><td>
1887 <tr><td>
1888 <a href="/help/update">
1888 <a href="/help/update">
1889 update
1889 update
1890 </a>
1890 </a>
1891 </td><td>
1891 </td><td>
1892 update working directory (or switch revisions)
1892 update working directory (or switch revisions)
1893 </td></tr>
1893 </td></tr>
1894
1894
1895 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1895 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1896
1896
1897 <tr><td>
1897 <tr><td>
1898 <a href="/help/addremove">
1898 <a href="/help/addremove">
1899 addremove
1899 addremove
1900 </a>
1900 </a>
1901 </td><td>
1901 </td><td>
1902 add all new files, delete all missing files
1902 add all new files, delete all missing files
1903 </td></tr>
1903 </td></tr>
1904 <tr><td>
1904 <tr><td>
1905 <a href="/help/archive">
1905 <a href="/help/archive">
1906 archive
1906 archive
1907 </a>
1907 </a>
1908 </td><td>
1908 </td><td>
1909 create an unversioned archive of a repository revision
1909 create an unversioned archive of a repository revision
1910 </td></tr>
1910 </td></tr>
1911 <tr><td>
1911 <tr><td>
1912 <a href="/help/backout">
1912 <a href="/help/backout">
1913 backout
1913 backout
1914 </a>
1914 </a>
1915 </td><td>
1915 </td><td>
1916 reverse effect of earlier changeset
1916 reverse effect of earlier changeset
1917 </td></tr>
1917 </td></tr>
1918 <tr><td>
1918 <tr><td>
1919 <a href="/help/bisect">
1919 <a href="/help/bisect">
1920 bisect
1920 bisect
1921 </a>
1921 </a>
1922 </td><td>
1922 </td><td>
1923 subdivision search of changesets
1923 subdivision search of changesets
1924 </td></tr>
1924 </td></tr>
1925 <tr><td>
1925 <tr><td>
1926 <a href="/help/bookmarks">
1926 <a href="/help/bookmarks">
1927 bookmarks
1927 bookmarks
1928 </a>
1928 </a>
1929 </td><td>
1929 </td><td>
1930 create a new bookmark or list existing bookmarks
1930 create a new bookmark or list existing bookmarks
1931 </td></tr>
1931 </td></tr>
1932 <tr><td>
1932 <tr><td>
1933 <a href="/help/branch">
1933 <a href="/help/branch">
1934 branch
1934 branch
1935 </a>
1935 </a>
1936 </td><td>
1936 </td><td>
1937 set or show the current branch name
1937 set or show the current branch name
1938 </td></tr>
1938 </td></tr>
1939 <tr><td>
1939 <tr><td>
1940 <a href="/help/branches">
1940 <a href="/help/branches">
1941 branches
1941 branches
1942 </a>
1942 </a>
1943 </td><td>
1943 </td><td>
1944 list repository named branches
1944 list repository named branches
1945 </td></tr>
1945 </td></tr>
1946 <tr><td>
1946 <tr><td>
1947 <a href="/help/bundle">
1947 <a href="/help/bundle">
1948 bundle
1948 bundle
1949 </a>
1949 </a>
1950 </td><td>
1950 </td><td>
1951 create a changegroup file
1951 create a changegroup file
1952 </td></tr>
1952 </td></tr>
1953 <tr><td>
1953 <tr><td>
1954 <a href="/help/cat">
1954 <a href="/help/cat">
1955 cat
1955 cat
1956 </a>
1956 </a>
1957 </td><td>
1957 </td><td>
1958 output the current or given revision of files
1958 output the current or given revision of files
1959 </td></tr>
1959 </td></tr>
1960 <tr><td>
1960 <tr><td>
1961 <a href="/help/config">
1961 <a href="/help/config">
1962 config
1962 config
1963 </a>
1963 </a>
1964 </td><td>
1964 </td><td>
1965 show combined config settings from all hgrc files
1965 show combined config settings from all hgrc files
1966 </td></tr>
1966 </td></tr>
1967 <tr><td>
1967 <tr><td>
1968 <a href="/help/copy">
1968 <a href="/help/copy">
1969 copy
1969 copy
1970 </a>
1970 </a>
1971 </td><td>
1971 </td><td>
1972 mark files as copied for the next commit
1972 mark files as copied for the next commit
1973 </td></tr>
1973 </td></tr>
1974 <tr><td>
1974 <tr><td>
1975 <a href="/help/files">
1975 <a href="/help/files">
1976 files
1976 files
1977 </a>
1977 </a>
1978 </td><td>
1978 </td><td>
1979 list tracked files
1979 list tracked files
1980 </td></tr>
1980 </td></tr>
1981 <tr><td>
1981 <tr><td>
1982 <a href="/help/graft">
1982 <a href="/help/graft">
1983 graft
1983 graft
1984 </a>
1984 </a>
1985 </td><td>
1985 </td><td>
1986 copy changes from other branches onto the current branch
1986 copy changes from other branches onto the current branch
1987 </td></tr>
1987 </td></tr>
1988 <tr><td>
1988 <tr><td>
1989 <a href="/help/grep">
1989 <a href="/help/grep">
1990 grep
1990 grep
1991 </a>
1991 </a>
1992 </td><td>
1992 </td><td>
1993 search for a pattern in specified files and revisions
1993 search for a pattern in specified files and revisions
1994 </td></tr>
1994 </td></tr>
1995 <tr><td>
1995 <tr><td>
1996 <a href="/help/heads">
1996 <a href="/help/heads">
1997 heads
1997 heads
1998 </a>
1998 </a>
1999 </td><td>
1999 </td><td>
2000 show branch heads
2000 show branch heads
2001 </td></tr>
2001 </td></tr>
2002 <tr><td>
2002 <tr><td>
2003 <a href="/help/help">
2003 <a href="/help/help">
2004 help
2004 help
2005 </a>
2005 </a>
2006 </td><td>
2006 </td><td>
2007 show help for a given topic or a help overview
2007 show help for a given topic or a help overview
2008 </td></tr>
2008 </td></tr>
2009 <tr><td>
2009 <tr><td>
2010 <a href="/help/identify">
2010 <a href="/help/identify">
2011 identify
2011 identify
2012 </a>
2012 </a>
2013 </td><td>
2013 </td><td>
2014 identify the working directory or specified revision
2014 identify the working directory or specified revision
2015 </td></tr>
2015 </td></tr>
2016 <tr><td>
2016 <tr><td>
2017 <a href="/help/import">
2017 <a href="/help/import">
2018 import
2018 import
2019 </a>
2019 </a>
2020 </td><td>
2020 </td><td>
2021 import an ordered set of patches
2021 import an ordered set of patches
2022 </td></tr>
2022 </td></tr>
2023 <tr><td>
2023 <tr><td>
2024 <a href="/help/incoming">
2024 <a href="/help/incoming">
2025 incoming
2025 incoming
2026 </a>
2026 </a>
2027 </td><td>
2027 </td><td>
2028 show new changesets found in source
2028 show new changesets found in source
2029 </td></tr>
2029 </td></tr>
2030 <tr><td>
2030 <tr><td>
2031 <a href="/help/manifest">
2031 <a href="/help/manifest">
2032 manifest
2032 manifest
2033 </a>
2033 </a>
2034 </td><td>
2034 </td><td>
2035 output the current or given revision of the project manifest
2035 output the current or given revision of the project manifest
2036 </td></tr>
2036 </td></tr>
2037 <tr><td>
2037 <tr><td>
2038 <a href="/help/nohelp">
2038 <a href="/help/nohelp">
2039 nohelp
2039 nohelp
2040 </a>
2040 </a>
2041 </td><td>
2041 </td><td>
2042 (no help text available)
2042 (no help text available)
2043 </td></tr>
2043 </td></tr>
2044 <tr><td>
2044 <tr><td>
2045 <a href="/help/outgoing">
2045 <a href="/help/outgoing">
2046 outgoing
2046 outgoing
2047 </a>
2047 </a>
2048 </td><td>
2048 </td><td>
2049 show changesets not found in the destination
2049 show changesets not found in the destination
2050 </td></tr>
2050 </td></tr>
2051 <tr><td>
2051 <tr><td>
2052 <a href="/help/paths">
2052 <a href="/help/paths">
2053 paths
2053 paths
2054 </a>
2054 </a>
2055 </td><td>
2055 </td><td>
2056 show aliases for remote repositories
2056 show aliases for remote repositories
2057 </td></tr>
2057 </td></tr>
2058 <tr><td>
2058 <tr><td>
2059 <a href="/help/phase">
2059 <a href="/help/phase">
2060 phase
2060 phase
2061 </a>
2061 </a>
2062 </td><td>
2062 </td><td>
2063 set or show the current phase name
2063 set or show the current phase name
2064 </td></tr>
2064 </td></tr>
2065 <tr><td>
2065 <tr><td>
2066 <a href="/help/recover">
2066 <a href="/help/recover">
2067 recover
2067 recover
2068 </a>
2068 </a>
2069 </td><td>
2069 </td><td>
2070 roll back an interrupted transaction
2070 roll back an interrupted transaction
2071 </td></tr>
2071 </td></tr>
2072 <tr><td>
2072 <tr><td>
2073 <a href="/help/rename">
2073 <a href="/help/rename">
2074 rename
2074 rename
2075 </a>
2075 </a>
2076 </td><td>
2076 </td><td>
2077 rename files; equivalent of copy + remove
2077 rename files; equivalent of copy + remove
2078 </td></tr>
2078 </td></tr>
2079 <tr><td>
2079 <tr><td>
2080 <a href="/help/resolve">
2080 <a href="/help/resolve">
2081 resolve
2081 resolve
2082 </a>
2082 </a>
2083 </td><td>
2083 </td><td>
2084 redo merges or set/view the merge status of files
2084 redo merges or set/view the merge status of files
2085 </td></tr>
2085 </td></tr>
2086 <tr><td>
2086 <tr><td>
2087 <a href="/help/revert">
2087 <a href="/help/revert">
2088 revert
2088 revert
2089 </a>
2089 </a>
2090 </td><td>
2090 </td><td>
2091 restore files to their checkout state
2091 restore files to their checkout state
2092 </td></tr>
2092 </td></tr>
2093 <tr><td>
2093 <tr><td>
2094 <a href="/help/root">
2094 <a href="/help/root">
2095 root
2095 root
2096 </a>
2096 </a>
2097 </td><td>
2097 </td><td>
2098 print the root (top) of the current working directory
2098 print the root (top) of the current working directory
2099 </td></tr>
2099 </td></tr>
2100 <tr><td>
2100 <tr><td>
2101 <a href="/help/tag">
2101 <a href="/help/tag">
2102 tag
2102 tag
2103 </a>
2103 </a>
2104 </td><td>
2104 </td><td>
2105 add one or more tags for the current or given revision
2105 add one or more tags for the current or given revision
2106 </td></tr>
2106 </td></tr>
2107 <tr><td>
2107 <tr><td>
2108 <a href="/help/tags">
2108 <a href="/help/tags">
2109 tags
2109 tags
2110 </a>
2110 </a>
2111 </td><td>
2111 </td><td>
2112 list repository tags
2112 list repository tags
2113 </td></tr>
2113 </td></tr>
2114 <tr><td>
2114 <tr><td>
2115 <a href="/help/unbundle">
2115 <a href="/help/unbundle">
2116 unbundle
2116 unbundle
2117 </a>
2117 </a>
2118 </td><td>
2118 </td><td>
2119 apply one or more changegroup files
2119 apply one or more changegroup files
2120 </td></tr>
2120 </td></tr>
2121 <tr><td>
2121 <tr><td>
2122 <a href="/help/verify">
2122 <a href="/help/verify">
2123 verify
2123 verify
2124 </a>
2124 </a>
2125 </td><td>
2125 </td><td>
2126 verify the integrity of the repository
2126 verify the integrity of the repository
2127 </td></tr>
2127 </td></tr>
2128 <tr><td>
2128 <tr><td>
2129 <a href="/help/version">
2129 <a href="/help/version">
2130 version
2130 version
2131 </a>
2131 </a>
2132 </td><td>
2132 </td><td>
2133 output version and copyright information
2133 output version and copyright information
2134 </td></tr>
2134 </td></tr>
2135 </table>
2135 </table>
2136 </div>
2136 </div>
2137 </div>
2137 </div>
2138
2138
2139 <script type="text/javascript">process_dates()</script>
2139 <script type="text/javascript">process_dates()</script>
2140
2140
2141
2141
2142 </body>
2142 </body>
2143 </html>
2143 </html>
2144
2144
2145
2145
2146 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
2146 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
2147 200 Script output follows
2147 200 Script output follows
2148
2148
2149 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2149 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2150 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2150 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2151 <head>
2151 <head>
2152 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2152 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2153 <meta name="robots" content="index, nofollow" />
2153 <meta name="robots" content="index, nofollow" />
2154 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2154 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2155 <script type="text/javascript" src="/static/mercurial.js"></script>
2155 <script type="text/javascript" src="/static/mercurial.js"></script>
2156
2156
2157 <title>Help: add</title>
2157 <title>Help: add</title>
2158 </head>
2158 </head>
2159 <body>
2159 <body>
2160
2160
2161 <div class="container">
2161 <div class="container">
2162 <div class="menu">
2162 <div class="menu">
2163 <div class="logo">
2163 <div class="logo">
2164 <a href="https://mercurial-scm.org/">
2164 <a href="https://mercurial-scm.org/">
2165 <img src="/static/hglogo.png" alt="mercurial" /></a>
2165 <img src="/static/hglogo.png" alt="mercurial" /></a>
2166 </div>
2166 </div>
2167 <ul>
2167 <ul>
2168 <li><a href="/shortlog">log</a></li>
2168 <li><a href="/shortlog">log</a></li>
2169 <li><a href="/graph">graph</a></li>
2169 <li><a href="/graph">graph</a></li>
2170 <li><a href="/tags">tags</a></li>
2170 <li><a href="/tags">tags</a></li>
2171 <li><a href="/bookmarks">bookmarks</a></li>
2171 <li><a href="/bookmarks">bookmarks</a></li>
2172 <li><a href="/branches">branches</a></li>
2172 <li><a href="/branches">branches</a></li>
2173 </ul>
2173 </ul>
2174 <ul>
2174 <ul>
2175 <li class="active"><a href="/help">help</a></li>
2175 <li class="active"><a href="/help">help</a></li>
2176 </ul>
2176 </ul>
2177 </div>
2177 </div>
2178
2178
2179 <div class="main">
2179 <div class="main">
2180 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2180 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2181 <h3>Help: add</h3>
2181 <h3>Help: add</h3>
2182
2182
2183 <form class="search" action="/log">
2183 <form class="search" action="/log">
2184
2184
2185 <p><input name="rev" id="search1" type="text" size="30" /></p>
2185 <p><input name="rev" id="search1" type="text" size="30" /></p>
2186 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2186 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2187 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2187 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2188 </form>
2188 </form>
2189 <div id="doc">
2189 <div id="doc">
2190 <p>
2190 <p>
2191 hg add [OPTION]... [FILE]...
2191 hg add [OPTION]... [FILE]...
2192 </p>
2192 </p>
2193 <p>
2193 <p>
2194 add the specified files on the next commit
2194 add the specified files on the next commit
2195 </p>
2195 </p>
2196 <p>
2196 <p>
2197 Schedule files to be version controlled and added to the
2197 Schedule files to be version controlled and added to the
2198 repository.
2198 repository.
2199 </p>
2199 </p>
2200 <p>
2200 <p>
2201 The files will be added to the repository at the next commit. To
2201 The files will be added to the repository at the next commit. To
2202 undo an add before that, see &quot;hg forget&quot;.
2202 undo an add before that, see &quot;hg forget&quot;.
2203 </p>
2203 </p>
2204 <p>
2204 <p>
2205 If no names are given, add all files to the repository.
2205 If no names are given, add all files to the repository.
2206 </p>
2206 </p>
2207 <p>
2207 <p>
2208 Examples:
2208 Examples:
2209 </p>
2209 </p>
2210 <ul>
2210 <ul>
2211 <li> New (unknown) files are added automatically by &quot;hg add&quot;:
2211 <li> New (unknown) files are added automatically by &quot;hg add&quot;:
2212 <pre>
2212 <pre>
2213 \$ ls (re)
2213 \$ ls (re)
2214 foo.c
2214 foo.c
2215 \$ hg status (re)
2215 \$ hg status (re)
2216 ? foo.c
2216 ? foo.c
2217 \$ hg add (re)
2217 \$ hg add (re)
2218 adding foo.c
2218 adding foo.c
2219 \$ hg status (re)
2219 \$ hg status (re)
2220 A foo.c
2220 A foo.c
2221 </pre>
2221 </pre>
2222 <li> Specific files to be added can be specified:
2222 <li> Specific files to be added can be specified:
2223 <pre>
2223 <pre>
2224 \$ ls (re)
2224 \$ ls (re)
2225 bar.c foo.c
2225 bar.c foo.c
2226 \$ hg status (re)
2226 \$ hg status (re)
2227 ? bar.c
2227 ? bar.c
2228 ? foo.c
2228 ? foo.c
2229 \$ hg add bar.c (re)
2229 \$ hg add bar.c (re)
2230 \$ hg status (re)
2230 \$ hg status (re)
2231 A bar.c
2231 A bar.c
2232 ? foo.c
2232 ? foo.c
2233 </pre>
2233 </pre>
2234 </ul>
2234 </ul>
2235 <p>
2235 <p>
2236 Returns 0 if all files are successfully added.
2236 Returns 0 if all files are successfully added.
2237 </p>
2237 </p>
2238 <p>
2238 <p>
2239 options ([+] can be repeated):
2239 options ([+] can be repeated):
2240 </p>
2240 </p>
2241 <table>
2241 <table>
2242 <tr><td>-I</td>
2242 <tr><td>-I</td>
2243 <td>--include PATTERN [+]</td>
2243 <td>--include PATTERN [+]</td>
2244 <td>include names matching the given patterns</td></tr>
2244 <td>include names matching the given patterns</td></tr>
2245 <tr><td>-X</td>
2245 <tr><td>-X</td>
2246 <td>--exclude PATTERN [+]</td>
2246 <td>--exclude PATTERN [+]</td>
2247 <td>exclude names matching the given patterns</td></tr>
2247 <td>exclude names matching the given patterns</td></tr>
2248 <tr><td>-S</td>
2248 <tr><td>-S</td>
2249 <td>--subrepos</td>
2249 <td>--subrepos</td>
2250 <td>recurse into subrepositories</td></tr>
2250 <td>recurse into subrepositories</td></tr>
2251 <tr><td>-n</td>
2251 <tr><td>-n</td>
2252 <td>--dry-run</td>
2252 <td>--dry-run</td>
2253 <td>do not perform actions, just print output</td></tr>
2253 <td>do not perform actions, just print output</td></tr>
2254 </table>
2254 </table>
2255 <p>
2255 <p>
2256 global options ([+] can be repeated):
2256 global options ([+] can be repeated):
2257 </p>
2257 </p>
2258 <table>
2258 <table>
2259 <tr><td>-R</td>
2259 <tr><td>-R</td>
2260 <td>--repository REPO</td>
2260 <td>--repository REPO</td>
2261 <td>repository root directory or name of overlay bundle file</td></tr>
2261 <td>repository root directory or name of overlay bundle file</td></tr>
2262 <tr><td></td>
2262 <tr><td></td>
2263 <td>--cwd DIR</td>
2263 <td>--cwd DIR</td>
2264 <td>change working directory</td></tr>
2264 <td>change working directory</td></tr>
2265 <tr><td>-y</td>
2265 <tr><td>-y</td>
2266 <td>--noninteractive</td>
2266 <td>--noninteractive</td>
2267 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2267 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2268 <tr><td>-q</td>
2268 <tr><td>-q</td>
2269 <td>--quiet</td>
2269 <td>--quiet</td>
2270 <td>suppress output</td></tr>
2270 <td>suppress output</td></tr>
2271 <tr><td>-v</td>
2271 <tr><td>-v</td>
2272 <td>--verbose</td>
2272 <td>--verbose</td>
2273 <td>enable additional output</td></tr>
2273 <td>enable additional output</td></tr>
2274 <tr><td></td>
2274 <tr><td></td>
2275 <td>--config CONFIG [+]</td>
2275 <td>--config CONFIG [+]</td>
2276 <td>set/override config option (use 'section.name=value')</td></tr>
2276 <td>set/override config option (use 'section.name=value')</td></tr>
2277 <tr><td></td>
2277 <tr><td></td>
2278 <td>--debug</td>
2278 <td>--debug</td>
2279 <td>enable debugging output</td></tr>
2279 <td>enable debugging output</td></tr>
2280 <tr><td></td>
2280 <tr><td></td>
2281 <td>--debugger</td>
2281 <td>--debugger</td>
2282 <td>start debugger</td></tr>
2282 <td>start debugger</td></tr>
2283 <tr><td></td>
2283 <tr><td></td>
2284 <td>--encoding ENCODE</td>
2284 <td>--encoding ENCODE</td>
2285 <td>set the charset encoding (default: ascii)</td></tr>
2285 <td>set the charset encoding (default: ascii)</td></tr>
2286 <tr><td></td>
2286 <tr><td></td>
2287 <td>--encodingmode MODE</td>
2287 <td>--encodingmode MODE</td>
2288 <td>set the charset encoding mode (default: strict)</td></tr>
2288 <td>set the charset encoding mode (default: strict)</td></tr>
2289 <tr><td></td>
2289 <tr><td></td>
2290 <td>--traceback</td>
2290 <td>--traceback</td>
2291 <td>always print a traceback on exception</td></tr>
2291 <td>always print a traceback on exception</td></tr>
2292 <tr><td></td>
2292 <tr><td></td>
2293 <td>--time</td>
2293 <td>--time</td>
2294 <td>time how long the command takes</td></tr>
2294 <td>time how long the command takes</td></tr>
2295 <tr><td></td>
2295 <tr><td></td>
2296 <td>--profile</td>
2296 <td>--profile</td>
2297 <td>print command execution profile</td></tr>
2297 <td>print command execution profile</td></tr>
2298 <tr><td></td>
2298 <tr><td></td>
2299 <td>--version</td>
2299 <td>--version</td>
2300 <td>output version information and exit</td></tr>
2300 <td>output version information and exit</td></tr>
2301 <tr><td>-h</td>
2301 <tr><td>-h</td>
2302 <td>--help</td>
2302 <td>--help</td>
2303 <td>display help and exit</td></tr>
2303 <td>display help and exit</td></tr>
2304 <tr><td></td>
2304 <tr><td></td>
2305 <td>--hidden</td>
2305 <td>--hidden</td>
2306 <td>consider hidden changesets</td></tr>
2306 <td>consider hidden changesets</td></tr>
2307 </table>
2307 </table>
2308
2308
2309 </div>
2309 </div>
2310 </div>
2310 </div>
2311 </div>
2311 </div>
2312
2312
2313 <script type="text/javascript">process_dates()</script>
2313 <script type="text/javascript">process_dates()</script>
2314
2314
2315
2315
2316 </body>
2316 </body>
2317 </html>
2317 </html>
2318
2318
2319
2319
2320 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
2320 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
2321 200 Script output follows
2321 200 Script output follows
2322
2322
2323 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2323 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2324 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2324 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2325 <head>
2325 <head>
2326 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2326 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2327 <meta name="robots" content="index, nofollow" />
2327 <meta name="robots" content="index, nofollow" />
2328 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2328 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2329 <script type="text/javascript" src="/static/mercurial.js"></script>
2329 <script type="text/javascript" src="/static/mercurial.js"></script>
2330
2330
2331 <title>Help: remove</title>
2331 <title>Help: remove</title>
2332 </head>
2332 </head>
2333 <body>
2333 <body>
2334
2334
2335 <div class="container">
2335 <div class="container">
2336 <div class="menu">
2336 <div class="menu">
2337 <div class="logo">
2337 <div class="logo">
2338 <a href="https://mercurial-scm.org/">
2338 <a href="https://mercurial-scm.org/">
2339 <img src="/static/hglogo.png" alt="mercurial" /></a>
2339 <img src="/static/hglogo.png" alt="mercurial" /></a>
2340 </div>
2340 </div>
2341 <ul>
2341 <ul>
2342 <li><a href="/shortlog">log</a></li>
2342 <li><a href="/shortlog">log</a></li>
2343 <li><a href="/graph">graph</a></li>
2343 <li><a href="/graph">graph</a></li>
2344 <li><a href="/tags">tags</a></li>
2344 <li><a href="/tags">tags</a></li>
2345 <li><a href="/bookmarks">bookmarks</a></li>
2345 <li><a href="/bookmarks">bookmarks</a></li>
2346 <li><a href="/branches">branches</a></li>
2346 <li><a href="/branches">branches</a></li>
2347 </ul>
2347 </ul>
2348 <ul>
2348 <ul>
2349 <li class="active"><a href="/help">help</a></li>
2349 <li class="active"><a href="/help">help</a></li>
2350 </ul>
2350 </ul>
2351 </div>
2351 </div>
2352
2352
2353 <div class="main">
2353 <div class="main">
2354 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2354 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2355 <h3>Help: remove</h3>
2355 <h3>Help: remove</h3>
2356
2356
2357 <form class="search" action="/log">
2357 <form class="search" action="/log">
2358
2358
2359 <p><input name="rev" id="search1" type="text" size="30" /></p>
2359 <p><input name="rev" id="search1" type="text" size="30" /></p>
2360 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2360 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2361 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2361 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2362 </form>
2362 </form>
2363 <div id="doc">
2363 <div id="doc">
2364 <p>
2364 <p>
2365 hg remove [OPTION]... FILE...
2365 hg remove [OPTION]... FILE...
2366 </p>
2366 </p>
2367 <p>
2367 <p>
2368 aliases: rm
2368 aliases: rm
2369 </p>
2369 </p>
2370 <p>
2370 <p>
2371 remove the specified files on the next commit
2371 remove the specified files on the next commit
2372 </p>
2372 </p>
2373 <p>
2373 <p>
2374 Schedule the indicated files for removal from the current branch.
2374 Schedule the indicated files for removal from the current branch.
2375 </p>
2375 </p>
2376 <p>
2376 <p>
2377 This command schedules the files to be removed at the next commit.
2377 This command schedules the files to be removed at the next commit.
2378 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2378 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2379 files, see &quot;hg forget&quot;.
2379 files, see &quot;hg forget&quot;.
2380 </p>
2380 </p>
2381 <p>
2381 <p>
2382 -A/--after can be used to remove only files that have already
2382 -A/--after can be used to remove only files that have already
2383 been deleted, -f/--force can be used to force deletion, and -Af
2383 been deleted, -f/--force can be used to force deletion, and -Af
2384 can be used to remove files from the next revision without
2384 can be used to remove files from the next revision without
2385 deleting them from the working directory.
2385 deleting them from the working directory.
2386 </p>
2386 </p>
2387 <p>
2387 <p>
2388 The following table details the behavior of remove for different
2388 The following table details the behavior of remove for different
2389 file states (columns) and option combinations (rows). The file
2389 file states (columns) and option combinations (rows). The file
2390 states are Added [A], Clean [C], Modified [M] and Missing [!]
2390 states are Added [A], Clean [C], Modified [M] and Missing [!]
2391 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2391 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2392 (from branch) and Delete (from disk):
2392 (from branch) and Delete (from disk):
2393 </p>
2393 </p>
2394 <table>
2394 <table>
2395 <tr><td>opt/state</td>
2395 <tr><td>opt/state</td>
2396 <td>A</td>
2396 <td>A</td>
2397 <td>C</td>
2397 <td>C</td>
2398 <td>M</td>
2398 <td>M</td>
2399 <td>!</td></tr>
2399 <td>!</td></tr>
2400 <tr><td>none</td>
2400 <tr><td>none</td>
2401 <td>W</td>
2401 <td>W</td>
2402 <td>RD</td>
2402 <td>RD</td>
2403 <td>W</td>
2403 <td>W</td>
2404 <td>R</td></tr>
2404 <td>R</td></tr>
2405 <tr><td>-f</td>
2405 <tr><td>-f</td>
2406 <td>R</td>
2406 <td>R</td>
2407 <td>RD</td>
2407 <td>RD</td>
2408 <td>RD</td>
2408 <td>RD</td>
2409 <td>R</td></tr>
2409 <td>R</td></tr>
2410 <tr><td>-A</td>
2410 <tr><td>-A</td>
2411 <td>W</td>
2411 <td>W</td>
2412 <td>W</td>
2412 <td>W</td>
2413 <td>W</td>
2413 <td>W</td>
2414 <td>R</td></tr>
2414 <td>R</td></tr>
2415 <tr><td>-Af</td>
2415 <tr><td>-Af</td>
2416 <td>R</td>
2416 <td>R</td>
2417 <td>R</td>
2417 <td>R</td>
2418 <td>R</td>
2418 <td>R</td>
2419 <td>R</td></tr>
2419 <td>R</td></tr>
2420 </table>
2420 </table>
2421 <p>
2421 <p>
2422 Note that remove never deletes files in Added [A] state from the
2422 Note that remove never deletes files in Added [A] state from the
2423 working directory, not even if option --force is specified.
2423 working directory, not even if option --force is specified.
2424 </p>
2424 </p>
2425 <p>
2425 <p>
2426 Returns 0 on success, 1 if any warnings encountered.
2426 Returns 0 on success, 1 if any warnings encountered.
2427 </p>
2427 </p>
2428 <p>
2428 <p>
2429 options ([+] can be repeated):
2429 options ([+] can be repeated):
2430 </p>
2430 </p>
2431 <table>
2431 <table>
2432 <tr><td>-A</td>
2432 <tr><td>-A</td>
2433 <td>--after</td>
2433 <td>--after</td>
2434 <td>record delete for missing files</td></tr>
2434 <td>record delete for missing files</td></tr>
2435 <tr><td>-f</td>
2435 <tr><td>-f</td>
2436 <td>--force</td>
2436 <td>--force</td>
2437 <td>remove (and delete) file even if added or modified</td></tr>
2437 <td>remove (and delete) file even if added or modified</td></tr>
2438 <tr><td>-S</td>
2438 <tr><td>-S</td>
2439 <td>--subrepos</td>
2439 <td>--subrepos</td>
2440 <td>recurse into subrepositories</td></tr>
2440 <td>recurse into subrepositories</td></tr>
2441 <tr><td>-I</td>
2441 <tr><td>-I</td>
2442 <td>--include PATTERN [+]</td>
2442 <td>--include PATTERN [+]</td>
2443 <td>include names matching the given patterns</td></tr>
2443 <td>include names matching the given patterns</td></tr>
2444 <tr><td>-X</td>
2444 <tr><td>-X</td>
2445 <td>--exclude PATTERN [+]</td>
2445 <td>--exclude PATTERN [+]</td>
2446 <td>exclude names matching the given patterns</td></tr>
2446 <td>exclude names matching the given patterns</td></tr>
2447 </table>
2447 </table>
2448 <p>
2448 <p>
2449 global options ([+] can be repeated):
2449 global options ([+] can be repeated):
2450 </p>
2450 </p>
2451 <table>
2451 <table>
2452 <tr><td>-R</td>
2452 <tr><td>-R</td>
2453 <td>--repository REPO</td>
2453 <td>--repository REPO</td>
2454 <td>repository root directory or name of overlay bundle file</td></tr>
2454 <td>repository root directory or name of overlay bundle file</td></tr>
2455 <tr><td></td>
2455 <tr><td></td>
2456 <td>--cwd DIR</td>
2456 <td>--cwd DIR</td>
2457 <td>change working directory</td></tr>
2457 <td>change working directory</td></tr>
2458 <tr><td>-y</td>
2458 <tr><td>-y</td>
2459 <td>--noninteractive</td>
2459 <td>--noninteractive</td>
2460 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2460 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2461 <tr><td>-q</td>
2461 <tr><td>-q</td>
2462 <td>--quiet</td>
2462 <td>--quiet</td>
2463 <td>suppress output</td></tr>
2463 <td>suppress output</td></tr>
2464 <tr><td>-v</td>
2464 <tr><td>-v</td>
2465 <td>--verbose</td>
2465 <td>--verbose</td>
2466 <td>enable additional output</td></tr>
2466 <td>enable additional output</td></tr>
2467 <tr><td></td>
2467 <tr><td></td>
2468 <td>--config CONFIG [+]</td>
2468 <td>--config CONFIG [+]</td>
2469 <td>set/override config option (use 'section.name=value')</td></tr>
2469 <td>set/override config option (use 'section.name=value')</td></tr>
2470 <tr><td></td>
2470 <tr><td></td>
2471 <td>--debug</td>
2471 <td>--debug</td>
2472 <td>enable debugging output</td></tr>
2472 <td>enable debugging output</td></tr>
2473 <tr><td></td>
2473 <tr><td></td>
2474 <td>--debugger</td>
2474 <td>--debugger</td>
2475 <td>start debugger</td></tr>
2475 <td>start debugger</td></tr>
2476 <tr><td></td>
2476 <tr><td></td>
2477 <td>--encoding ENCODE</td>
2477 <td>--encoding ENCODE</td>
2478 <td>set the charset encoding (default: ascii)</td></tr>
2478 <td>set the charset encoding (default: ascii)</td></tr>
2479 <tr><td></td>
2479 <tr><td></td>
2480 <td>--encodingmode MODE</td>
2480 <td>--encodingmode MODE</td>
2481 <td>set the charset encoding mode (default: strict)</td></tr>
2481 <td>set the charset encoding mode (default: strict)</td></tr>
2482 <tr><td></td>
2482 <tr><td></td>
2483 <td>--traceback</td>
2483 <td>--traceback</td>
2484 <td>always print a traceback on exception</td></tr>
2484 <td>always print a traceback on exception</td></tr>
2485 <tr><td></td>
2485 <tr><td></td>
2486 <td>--time</td>
2486 <td>--time</td>
2487 <td>time how long the command takes</td></tr>
2487 <td>time how long the command takes</td></tr>
2488 <tr><td></td>
2488 <tr><td></td>
2489 <td>--profile</td>
2489 <td>--profile</td>
2490 <td>print command execution profile</td></tr>
2490 <td>print command execution profile</td></tr>
2491 <tr><td></td>
2491 <tr><td></td>
2492 <td>--version</td>
2492 <td>--version</td>
2493 <td>output version information and exit</td></tr>
2493 <td>output version information and exit</td></tr>
2494 <tr><td>-h</td>
2494 <tr><td>-h</td>
2495 <td>--help</td>
2495 <td>--help</td>
2496 <td>display help and exit</td></tr>
2496 <td>display help and exit</td></tr>
2497 <tr><td></td>
2497 <tr><td></td>
2498 <td>--hidden</td>
2498 <td>--hidden</td>
2499 <td>consider hidden changesets</td></tr>
2499 <td>consider hidden changesets</td></tr>
2500 </table>
2500 </table>
2501
2501
2502 </div>
2502 </div>
2503 </div>
2503 </div>
2504 </div>
2504 </div>
2505
2505
2506 <script type="text/javascript">process_dates()</script>
2506 <script type="text/javascript">process_dates()</script>
2507
2507
2508
2508
2509 </body>
2509 </body>
2510 </html>
2510 </html>
2511
2511
2512
2512
2513 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2513 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2514 200 Script output follows
2514 200 Script output follows
2515
2515
2516 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2516 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2517 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2517 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2518 <head>
2518 <head>
2519 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2519 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2520 <meta name="robots" content="index, nofollow" />
2520 <meta name="robots" content="index, nofollow" />
2521 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2521 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2522 <script type="text/javascript" src="/static/mercurial.js"></script>
2522 <script type="text/javascript" src="/static/mercurial.js"></script>
2523
2523
2524 <title>Help: revisions</title>
2524 <title>Help: revisions</title>
2525 </head>
2525 </head>
2526 <body>
2526 <body>
2527
2527
2528 <div class="container">
2528 <div class="container">
2529 <div class="menu">
2529 <div class="menu">
2530 <div class="logo">
2530 <div class="logo">
2531 <a href="https://mercurial-scm.org/">
2531 <a href="https://mercurial-scm.org/">
2532 <img src="/static/hglogo.png" alt="mercurial" /></a>
2532 <img src="/static/hglogo.png" alt="mercurial" /></a>
2533 </div>
2533 </div>
2534 <ul>
2534 <ul>
2535 <li><a href="/shortlog">log</a></li>
2535 <li><a href="/shortlog">log</a></li>
2536 <li><a href="/graph">graph</a></li>
2536 <li><a href="/graph">graph</a></li>
2537 <li><a href="/tags">tags</a></li>
2537 <li><a href="/tags">tags</a></li>
2538 <li><a href="/bookmarks">bookmarks</a></li>
2538 <li><a href="/bookmarks">bookmarks</a></li>
2539 <li><a href="/branches">branches</a></li>
2539 <li><a href="/branches">branches</a></li>
2540 </ul>
2540 </ul>
2541 <ul>
2541 <ul>
2542 <li class="active"><a href="/help">help</a></li>
2542 <li class="active"><a href="/help">help</a></li>
2543 </ul>
2543 </ul>
2544 </div>
2544 </div>
2545
2545
2546 <div class="main">
2546 <div class="main">
2547 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2547 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2548 <h3>Help: revisions</h3>
2548 <h3>Help: revisions</h3>
2549
2549
2550 <form class="search" action="/log">
2550 <form class="search" action="/log">
2551
2551
2552 <p><input name="rev" id="search1" type="text" size="30" /></p>
2552 <p><input name="rev" id="search1" type="text" size="30" /></p>
2553 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2553 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2554 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2554 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2555 </form>
2555 </form>
2556 <div id="doc">
2556 <div id="doc">
2557 <h1>Specifying Single Revisions</h1>
2557 <h1>Specifying Single Revisions</h1>
2558 <p>
2558 <p>
2559 Mercurial supports several ways to specify individual revisions.
2559 Mercurial supports several ways to specify individual revisions.
2560 </p>
2560 </p>
2561 <p>
2561 <p>
2562 A plain integer is treated as a revision number. Negative integers are
2562 A plain integer is treated as a revision number. Negative integers are
2563 treated as sequential offsets from the tip, with -1 denoting the tip,
2563 treated as sequential offsets from the tip, with -1 denoting the tip,
2564 -2 denoting the revision prior to the tip, and so forth.
2564 -2 denoting the revision prior to the tip, and so forth.
2565 </p>
2565 </p>
2566 <p>
2566 <p>
2567 A 40-digit hexadecimal string is treated as a unique revision
2567 A 40-digit hexadecimal string is treated as a unique revision
2568 identifier.
2568 identifier.
2569 </p>
2569 </p>
2570 <p>
2570 <p>
2571 A hexadecimal string less than 40 characters long is treated as a
2571 A hexadecimal string less than 40 characters long is treated as a
2572 unique revision identifier and is referred to as a short-form
2572 unique revision identifier and is referred to as a short-form
2573 identifier. A short-form identifier is only valid if it is the prefix
2573 identifier. A short-form identifier is only valid if it is the prefix
2574 of exactly one full-length identifier.
2574 of exactly one full-length identifier.
2575 </p>
2575 </p>
2576 <p>
2576 <p>
2577 Any other string is treated as a bookmark, tag, or branch name. A
2577 Any other string is treated as a bookmark, tag, or branch name. A
2578 bookmark is a movable pointer to a revision. A tag is a permanent name
2578 bookmark is a movable pointer to a revision. A tag is a permanent name
2579 associated with a revision. A branch name denotes the tipmost open branch head
2579 associated with a revision. A branch name denotes the tipmost open branch head
2580 of that branch - or if they are all closed, the tipmost closed head of the
2580 of that branch - or if they are all closed, the tipmost closed head of the
2581 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2581 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2582 </p>
2582 </p>
2583 <p>
2583 <p>
2584 The reserved name &quot;tip&quot; always identifies the most recent revision.
2584 The reserved name &quot;tip&quot; always identifies the most recent revision.
2585 </p>
2585 </p>
2586 <p>
2586 <p>
2587 The reserved name &quot;null&quot; indicates the null revision. This is the
2587 The reserved name &quot;null&quot; indicates the null revision. This is the
2588 revision of an empty repository, and the parent of revision 0.
2588 revision of an empty repository, and the parent of revision 0.
2589 </p>
2589 </p>
2590 <p>
2590 <p>
2591 The reserved name &quot;.&quot; indicates the working directory parent. If no
2591 The reserved name &quot;.&quot; indicates the working directory parent. If no
2592 working directory is checked out, it is equivalent to null. If an
2592 working directory is checked out, it is equivalent to null. If an
2593 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2593 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2594 parent.
2594 parent.
2595 </p>
2595 </p>
2596
2596
2597 </div>
2597 </div>
2598 </div>
2598 </div>
2599 </div>
2599 </div>
2600
2600
2601 <script type="text/javascript">process_dates()</script>
2601 <script type="text/javascript">process_dates()</script>
2602
2602
2603
2603
2604 </body>
2604 </body>
2605 </html>
2605 </html>
2606
2606
2607
2607
2608 $ killdaemons.py
2608 $ killdaemons.py
2609
2609
2610 #endif
2610 #endif
General Comments 0
You need to be logged in to leave comments. Login now