##// END OF EJS Templates
help: let 'hg help debug' show the list of secret debug commands...
Mads Kiilerich -
r20822:be87397f default
parent child Browse files
Show More
@@ -1,509 +1,511
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, sys, os
9 import itertools, sys, os
10 import error
10 import error
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
12 import encoding, util, minirst
12 import encoding, util, minirst
13 import cmdutil
13 import cmdutil
14
14
15 def listexts(header, exts, indent=1, showdeprecated=False):
15 def listexts(header, exts, indent=1, showdeprecated=False):
16 '''return a text listing of the given extensions'''
16 '''return a text listing of the given extensions'''
17 rst = []
17 rst = []
18 if exts:
18 if exts:
19 rst.append('\n%s\n\n' % header)
19 rst.append('\n%s\n\n' % header)
20 for name, desc in sorted(exts.iteritems()):
20 for name, desc in sorted(exts.iteritems()):
21 if '(DEPRECATED)' in desc and not showdeprecated:
21 if '(DEPRECATED)' in desc and not showdeprecated:
22 continue
22 continue
23 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
23 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
24 return rst
24 return rst
25
25
26 def extshelp():
26 def extshelp():
27 rst = loaddoc('extensions')().splitlines(True)
27 rst = loaddoc('extensions')().splitlines(True)
28 rst.extend(listexts(
28 rst.extend(listexts(
29 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
29 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
30 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
30 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
31 doc = ''.join(rst)
31 doc = ''.join(rst)
32 return doc
32 return doc
33
33
34 def optrst(options, verbose):
34 def optrst(options, verbose):
35 data = []
35 data = []
36 multioccur = False
36 multioccur = False
37 for option in options:
37 for option in options:
38 if len(option) == 5:
38 if len(option) == 5:
39 shortopt, longopt, default, desc, optlabel = option
39 shortopt, longopt, default, desc, optlabel = option
40 else:
40 else:
41 shortopt, longopt, default, desc = option
41 shortopt, longopt, default, desc = option
42 optlabel = _("VALUE") # default label
42 optlabel = _("VALUE") # default label
43
43
44 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc):
44 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc):
45 continue
45 continue
46
46
47 so = ''
47 so = ''
48 if shortopt:
48 if shortopt:
49 so = '-' + shortopt
49 so = '-' + shortopt
50 lo = '--' + longopt
50 lo = '--' + longopt
51 if default:
51 if default:
52 desc += _(" (default: %s)") % default
52 desc += _(" (default: %s)") % default
53
53
54 if isinstance(default, list):
54 if isinstance(default, list):
55 lo += " %s [+]" % optlabel
55 lo += " %s [+]" % optlabel
56 multioccur = True
56 multioccur = True
57 elif (default is not None) and not isinstance(default, bool):
57 elif (default is not None) and not isinstance(default, bool):
58 lo += " %s" % optlabel
58 lo += " %s" % optlabel
59
59
60 data.append((so, lo, desc))
60 data.append((so, lo, desc))
61
61
62 rst = minirst.maketable(data, 1)
62 rst = minirst.maketable(data, 1)
63
63
64 if multioccur:
64 if multioccur:
65 rst.append(_("\n[+] marked option can be specified multiple times\n"))
65 rst.append(_("\n[+] marked option can be specified multiple times\n"))
66
66
67 return ''.join(rst)
67 return ''.join(rst)
68
68
69 def indicateomitted(rst, omitted, notomitted=None):
69 def indicateomitted(rst, omitted, notomitted=None):
70 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
70 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
71 if notomitted:
71 if notomitted:
72 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
72 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
73
73
74 def topicmatch(kw):
74 def topicmatch(kw):
75 """Return help topics matching kw.
75 """Return help topics matching kw.
76
76
77 Returns {'section': [(name, summary), ...], ...} where section is
77 Returns {'section': [(name, summary), ...], ...} where section is
78 one of topics, commands, extensions, or extensioncommands.
78 one of topics, commands, extensions, or extensioncommands.
79 """
79 """
80 kw = encoding.lower(kw)
80 kw = encoding.lower(kw)
81 def lowercontains(container):
81 def lowercontains(container):
82 return kw in encoding.lower(container) # translated in helptable
82 return kw in encoding.lower(container) # translated in helptable
83 results = {'topics': [],
83 results = {'topics': [],
84 'commands': [],
84 'commands': [],
85 'extensions': [],
85 'extensions': [],
86 'extensioncommands': [],
86 'extensioncommands': [],
87 }
87 }
88 for names, header, doc in helptable:
88 for names, header, doc in helptable:
89 if (sum(map(lowercontains, names))
89 if (sum(map(lowercontains, names))
90 or lowercontains(header)
90 or lowercontains(header)
91 or lowercontains(doc())):
91 or lowercontains(doc())):
92 results['topics'].append((names[0], header))
92 results['topics'].append((names[0], header))
93 import commands # avoid cycle
93 import commands # avoid cycle
94 for cmd, entry in commands.table.iteritems():
94 for cmd, entry in commands.table.iteritems():
95 if cmd.startswith('debug'):
95 if cmd.startswith('debug'):
96 continue
96 continue
97 if len(entry) == 3:
97 if len(entry) == 3:
98 summary = entry[2]
98 summary = entry[2]
99 else:
99 else:
100 summary = ''
100 summary = ''
101 # translate docs *before* searching there
101 # translate docs *before* searching there
102 docs = _(getattr(entry[0], '__doc__', None)) or ''
102 docs = _(getattr(entry[0], '__doc__', None)) or ''
103 if kw in cmd or lowercontains(summary) or lowercontains(docs):
103 if kw in cmd or lowercontains(summary) or lowercontains(docs):
104 doclines = docs.splitlines()
104 doclines = docs.splitlines()
105 if doclines:
105 if doclines:
106 summary = doclines[0]
106 summary = doclines[0]
107 cmdname = cmd.split('|')[0].lstrip('^')
107 cmdname = cmd.split('|')[0].lstrip('^')
108 results['commands'].append((cmdname, summary))
108 results['commands'].append((cmdname, summary))
109 for name, docs in itertools.chain(
109 for name, docs in itertools.chain(
110 extensions.enabled(False).iteritems(),
110 extensions.enabled(False).iteritems(),
111 extensions.disabled().iteritems()):
111 extensions.disabled().iteritems()):
112 # extensions.load ignores the UI argument
112 # extensions.load ignores the UI argument
113 mod = extensions.load(None, name, '')
113 mod = extensions.load(None, name, '')
114 name = name.split('.')[-1]
114 name = name.split('.')[-1]
115 if lowercontains(name) or lowercontains(docs):
115 if lowercontains(name) or lowercontains(docs):
116 # extension docs are already translated
116 # extension docs are already translated
117 results['extensions'].append((name, docs.splitlines()[0]))
117 results['extensions'].append((name, docs.splitlines()[0]))
118 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
118 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
119 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
119 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
120 cmdname = cmd.split('|')[0].lstrip('^')
120 cmdname = cmd.split('|')[0].lstrip('^')
121 if entry[0].__doc__:
121 if entry[0].__doc__:
122 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
122 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
123 else:
123 else:
124 cmddoc = _('(no help text available)')
124 cmddoc = _('(no help text available)')
125 results['extensioncommands'].append((cmdname, cmddoc))
125 results['extensioncommands'].append((cmdname, cmddoc))
126 return results
126 return results
127
127
128 def loaddoc(topic):
128 def loaddoc(topic):
129 """Return a delayed loader for help/topic.txt."""
129 """Return a delayed loader for help/topic.txt."""
130
130
131 def loader():
131 def loader():
132 if util.mainfrozen():
132 if util.mainfrozen():
133 module = sys.executable
133 module = sys.executable
134 else:
134 else:
135 module = __file__
135 module = __file__
136 base = os.path.dirname(module)
136 base = os.path.dirname(module)
137
137
138 for dir in ('.', '..'):
138 for dir in ('.', '..'):
139 docdir = os.path.join(base, dir, 'help')
139 docdir = os.path.join(base, dir, 'help')
140 if os.path.isdir(docdir):
140 if os.path.isdir(docdir):
141 break
141 break
142
142
143 path = os.path.join(docdir, topic + ".txt")
143 path = os.path.join(docdir, topic + ".txt")
144 doc = gettext(util.readfile(path))
144 doc = gettext(util.readfile(path))
145 for rewriter in helphooks.get(topic, []):
145 for rewriter in helphooks.get(topic, []):
146 doc = rewriter(topic, doc)
146 doc = rewriter(topic, doc)
147 return doc
147 return doc
148
148
149 return loader
149 return loader
150
150
151 helptable = sorted([
151 helptable = sorted([
152 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
152 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
153 (["dates"], _("Date Formats"), loaddoc('dates')),
153 (["dates"], _("Date Formats"), loaddoc('dates')),
154 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
154 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
155 (['environment', 'env'], _('Environment Variables'),
155 (['environment', 'env'], _('Environment Variables'),
156 loaddoc('environment')),
156 loaddoc('environment')),
157 (['revisions', 'revs'], _('Specifying Single Revisions'),
157 (['revisions', 'revs'], _('Specifying Single Revisions'),
158 loaddoc('revisions')),
158 loaddoc('revisions')),
159 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
159 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
160 loaddoc('multirevs')),
160 loaddoc('multirevs')),
161 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
161 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
162 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
162 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
163 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
163 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
164 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
164 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
165 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
165 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
166 loaddoc('templates')),
166 loaddoc('templates')),
167 (['urls'], _('URL Paths'), loaddoc('urls')),
167 (['urls'], _('URL Paths'), loaddoc('urls')),
168 (["extensions"], _("Using Additional Features"), extshelp),
168 (["extensions"], _("Using Additional Features"), extshelp),
169 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
169 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
170 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
170 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
171 (["glossary"], _("Glossary"), loaddoc('glossary')),
171 (["glossary"], _("Glossary"), loaddoc('glossary')),
172 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
172 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
173 loaddoc('hgignore')),
173 loaddoc('hgignore')),
174 (["phases"], _("Working with Phases"), loaddoc('phases')),
174 (["phases"], _("Working with Phases"), loaddoc('phases')),
175 ])
175 ])
176
176
177 # Map topics to lists of callable taking the current topic help and
177 # Map topics to lists of callable taking the current topic help and
178 # returning the updated version
178 # returning the updated version
179 helphooks = {}
179 helphooks = {}
180
180
181 def addtopichook(topic, rewriter):
181 def addtopichook(topic, rewriter):
182 helphooks.setdefault(topic, []).append(rewriter)
182 helphooks.setdefault(topic, []).append(rewriter)
183
183
184 def makeitemsdoc(topic, doc, marker, items):
184 def makeitemsdoc(topic, doc, marker, items):
185 """Extract docstring from the items key to function mapping, build a
185 """Extract docstring from the items key to function mapping, build a
186 .single documentation block and use it to overwrite the marker in doc
186 .single documentation block and use it to overwrite the marker in doc
187 """
187 """
188 entries = []
188 entries = []
189 for name in sorted(items):
189 for name in sorted(items):
190 text = (items[name].__doc__ or '').rstrip()
190 text = (items[name].__doc__ or '').rstrip()
191 if not text:
191 if not text:
192 continue
192 continue
193 text = gettext(text)
193 text = gettext(text)
194 lines = text.splitlines()
194 lines = text.splitlines()
195 doclines = [(lines[0])]
195 doclines = [(lines[0])]
196 for l in lines[1:]:
196 for l in lines[1:]:
197 # Stop once we find some Python doctest
197 # Stop once we find some Python doctest
198 if l.strip().startswith('>>>'):
198 if l.strip().startswith('>>>'):
199 break
199 break
200 doclines.append(' ' + l.strip())
200 doclines.append(' ' + l.strip())
201 entries.append('\n'.join(doclines))
201 entries.append('\n'.join(doclines))
202 entries = '\n\n'.join(entries)
202 entries = '\n\n'.join(entries)
203 return doc.replace(marker, entries)
203 return doc.replace(marker, entries)
204
204
205 def addtopicsymbols(topic, marker, symbols):
205 def addtopicsymbols(topic, marker, symbols):
206 def add(topic, doc):
206 def add(topic, doc):
207 return makeitemsdoc(topic, doc, marker, symbols)
207 return makeitemsdoc(topic, doc, marker, symbols)
208 addtopichook(topic, add)
208 addtopichook(topic, add)
209
209
210 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
210 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
211 addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals)
211 addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals)
212 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
212 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
213 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
213 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
214 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
214 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
215
215
216 def help_(ui, name, unknowncmd=False, full=True, **opts):
216 def help_(ui, name, unknowncmd=False, full=True, **opts):
217 '''
217 '''
218 Generate the help for 'name' as unformatted restructured text. If
218 Generate the help for 'name' as unformatted restructured text. If
219 'name' is None, describe the commands available.
219 'name' is None, describe the commands available.
220 '''
220 '''
221
221
222 import commands # avoid cycle
222 import commands # avoid cycle
223
223
224 def helpcmd(name):
224 def helpcmd(name):
225 try:
225 try:
226 aliases, entry = cmdutil.findcmd(name, commands.table,
226 aliases, entry = cmdutil.findcmd(name, commands.table,
227 strict=unknowncmd)
227 strict=unknowncmd)
228 except error.AmbiguousCommand, inst:
228 except error.AmbiguousCommand, inst:
229 # py3k fix: except vars can't be used outside the scope of the
229 # py3k fix: except vars can't be used outside the scope of the
230 # except block, nor can be used inside a lambda. python issue4617
230 # except block, nor can be used inside a lambda. python issue4617
231 prefix = inst.args[0]
231 prefix = inst.args[0]
232 select = lambda c: c.lstrip('^').startswith(prefix)
232 select = lambda c: c.lstrip('^').startswith(prefix)
233 rst = helplist(select)
233 rst = helplist(select)
234 return rst
234 return rst
235
235
236 rst = []
236 rst = []
237
237
238 # check if it's an invalid alias and display its error if it is
238 # check if it's an invalid alias and display its error if it is
239 if getattr(entry[0], 'badalias', False):
239 if getattr(entry[0], 'badalias', False):
240 if not unknowncmd:
240 if not unknowncmd:
241 ui.pushbuffer()
241 ui.pushbuffer()
242 entry[0](ui)
242 entry[0](ui)
243 rst.append(ui.popbuffer())
243 rst.append(ui.popbuffer())
244 return rst
244 return rst
245
245
246 # synopsis
246 # synopsis
247 if len(entry) > 2:
247 if len(entry) > 2:
248 if entry[2].startswith('hg'):
248 if entry[2].startswith('hg'):
249 rst.append("%s\n" % entry[2])
249 rst.append("%s\n" % entry[2])
250 else:
250 else:
251 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
251 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
252 else:
252 else:
253 rst.append('hg %s\n' % aliases[0])
253 rst.append('hg %s\n' % aliases[0])
254 # aliases
254 # aliases
255 if full and not ui.quiet and len(aliases) > 1:
255 if full and not ui.quiet and len(aliases) > 1:
256 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
256 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
257 rst.append('\n')
257 rst.append('\n')
258
258
259 # description
259 # description
260 doc = gettext(entry[0].__doc__)
260 doc = gettext(entry[0].__doc__)
261 if not doc:
261 if not doc:
262 doc = _("(no help text available)")
262 doc = _("(no help text available)")
263 if util.safehasattr(entry[0], 'definition'): # aliased command
263 if util.safehasattr(entry[0], 'definition'): # aliased command
264 if entry[0].definition.startswith('!'): # shell alias
264 if entry[0].definition.startswith('!'): # shell alias
265 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
265 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
266 else:
266 else:
267 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
267 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
268 doc = doc.splitlines(True)
268 doc = doc.splitlines(True)
269 if ui.quiet or not full:
269 if ui.quiet or not full:
270 rst.append(doc[0])
270 rst.append(doc[0])
271 else:
271 else:
272 rst.extend(doc)
272 rst.extend(doc)
273 rst.append('\n')
273 rst.append('\n')
274
274
275 # check if this command shadows a non-trivial (multi-line)
275 # check if this command shadows a non-trivial (multi-line)
276 # extension help text
276 # extension help text
277 try:
277 try:
278 mod = extensions.find(name)
278 mod = extensions.find(name)
279 doc = gettext(mod.__doc__) or ''
279 doc = gettext(mod.__doc__) or ''
280 if '\n' in doc.strip():
280 if '\n' in doc.strip():
281 msg = _('use "hg help -e %s" to show help for '
281 msg = _('use "hg help -e %s" to show help for '
282 'the %s extension') % (name, name)
282 'the %s extension') % (name, name)
283 rst.append('\n%s\n' % msg)
283 rst.append('\n%s\n' % msg)
284 except KeyError:
284 except KeyError:
285 pass
285 pass
286
286
287 # options
287 # options
288 if not ui.quiet and entry[1]:
288 if not ui.quiet and entry[1]:
289 rst.append('\n%s\n\n' % _("options:"))
289 rst.append('\n%s\n\n' % _("options:"))
290 rst.append(optrst(entry[1], ui.verbose))
290 rst.append(optrst(entry[1], ui.verbose))
291
291
292 if ui.verbose:
292 if ui.verbose:
293 rst.append('\n%s\n\n' % _("global options:"))
293 rst.append('\n%s\n\n' % _("global options:"))
294 rst.append(optrst(commands.globalopts, ui.verbose))
294 rst.append(optrst(commands.globalopts, ui.verbose))
295
295
296 if not ui.verbose:
296 if not ui.verbose:
297 if not full:
297 if not full:
298 rst.append(_('\nuse "hg help %s" to show the full help text\n')
298 rst.append(_('\nuse "hg help %s" to show the full help text\n')
299 % name)
299 % name)
300 elif not ui.quiet:
300 elif not ui.quiet:
301 omitted = _('use "hg -v help %s" to show more complete'
301 omitted = _('use "hg -v help %s" to show more complete'
302 ' help and the global options') % name
302 ' help and the global options') % name
303 notomitted = _('use "hg -v help %s" to show'
303 notomitted = _('use "hg -v help %s" to show'
304 ' the global options') % name
304 ' the global options') % name
305 indicateomitted(rst, omitted, notomitted)
305 indicateomitted(rst, omitted, notomitted)
306
306
307 return rst
307 return rst
308
308
309
309
310 def helplist(select=None):
310 def helplist(select=None):
311 # list of commands
311 # list of commands
312 if name == "shortlist":
312 if name == "shortlist":
313 header = _('basic commands:\n\n')
313 header = _('basic commands:\n\n')
314 elif name == "debug":
315 header = _('debug commands (internal and unsupported):\n\n')
314 else:
316 else:
315 header = _('list of commands:\n\n')
317 header = _('list of commands:\n\n')
316
318
317 h = {}
319 h = {}
318 cmds = {}
320 cmds = {}
319 for c, e in commands.table.iteritems():
321 for c, e in commands.table.iteritems():
320 f = c.split("|", 1)[0]
322 f = c.split("|", 1)[0]
321 if select and not select(f):
323 if select and not select(f):
322 continue
324 continue
323 if (not select and name != 'shortlist' and
325 if (not select and name != 'shortlist' and
324 e[0].__module__ != commands.__name__):
326 e[0].__module__ != commands.__name__):
325 continue
327 continue
326 if name == "shortlist" and not f.startswith("^"):
328 if name == "shortlist" and not f.startswith("^"):
327 continue
329 continue
328 f = f.lstrip("^")
330 f = f.lstrip("^")
329 if not ui.debugflag and f.startswith("debug"):
331 if not ui.debugflag and f.startswith("debug") and name != "debug":
330 continue
332 continue
331 doc = e[0].__doc__
333 doc = e[0].__doc__
332 if doc and 'DEPRECATED' in doc and not ui.verbose:
334 if doc and 'DEPRECATED' in doc and not ui.verbose:
333 continue
335 continue
334 doc = gettext(doc)
336 doc = gettext(doc)
335 if not doc:
337 if not doc:
336 doc = _("(no help text available)")
338 doc = _("(no help text available)")
337 h[f] = doc.splitlines()[0].rstrip()
339 h[f] = doc.splitlines()[0].rstrip()
338 cmds[f] = c.lstrip("^")
340 cmds[f] = c.lstrip("^")
339
341
340 rst = []
342 rst = []
341 if not h:
343 if not h:
342 if not ui.quiet:
344 if not ui.quiet:
343 rst.append(_('no commands defined\n'))
345 rst.append(_('no commands defined\n'))
344 return rst
346 return rst
345
347
346 if not ui.quiet:
348 if not ui.quiet:
347 rst.append(header)
349 rst.append(header)
348 fns = sorted(h)
350 fns = sorted(h)
349 for f in fns:
351 for f in fns:
350 if ui.verbose:
352 if ui.verbose:
351 commacmds = cmds[f].replace("|",", ")
353 commacmds = cmds[f].replace("|",", ")
352 rst.append(" :%s: %s\n" % (commacmds, h[f]))
354 rst.append(" :%s: %s\n" % (commacmds, h[f]))
353 else:
355 else:
354 rst.append(' :%s: %s\n' % (f, h[f]))
356 rst.append(' :%s: %s\n' % (f, h[f]))
355
357
356 if not name:
358 if not name:
357 exts = listexts(_('enabled extensions:'), extensions.enabled())
359 exts = listexts(_('enabled extensions:'), extensions.enabled())
358 if exts:
360 if exts:
359 rst.append('\n')
361 rst.append('\n')
360 rst.extend(exts)
362 rst.extend(exts)
361
363
362 rst.append(_("\nadditional help topics:\n\n"))
364 rst.append(_("\nadditional help topics:\n\n"))
363 topics = []
365 topics = []
364 for names, header, doc in helptable:
366 for names, header, doc in helptable:
365 topics.append((names[0], header))
367 topics.append((names[0], header))
366 for t, desc in topics:
368 for t, desc in topics:
367 rst.append(" :%s: %s\n" % (t, desc))
369 rst.append(" :%s: %s\n" % (t, desc))
368
370
369 optlist = []
371 optlist = []
370 if not ui.quiet:
372 if not ui.quiet:
371 if ui.verbose:
373 if ui.verbose:
372 optlist.append((_("global options:"), commands.globalopts))
374 optlist.append((_("global options:"), commands.globalopts))
373 if name == 'shortlist':
375 if name == 'shortlist':
374 optlist.append((_('use "hg help" for the full list '
376 optlist.append((_('use "hg help" for the full list '
375 'of commands'), ()))
377 'of commands'), ()))
376 else:
378 else:
377 if name == 'shortlist':
379 if name == 'shortlist':
378 msg = _('use "hg help" for the full list of commands '
380 msg = _('use "hg help" for the full list of commands '
379 'or "hg -v" for details')
381 'or "hg -v" for details')
380 elif name and not full:
382 elif name and not full:
381 msg = _('use "hg help %s" to show the full help '
383 msg = _('use "hg help %s" to show the full help '
382 'text') % name
384 'text') % name
383 else:
385 else:
384 msg = _('use "hg -v help%s" to show builtin aliases and '
386 msg = _('use "hg -v help%s" to show builtin aliases and '
385 'global options') % (name and " " + name or "")
387 'global options') % (name and " " + name or "")
386 optlist.append((msg, ()))
388 optlist.append((msg, ()))
387
389
388 if optlist:
390 if optlist:
389 for title, options in optlist:
391 for title, options in optlist:
390 rst.append('\n%s\n' % title)
392 rst.append('\n%s\n' % title)
391 if options:
393 if options:
392 rst.append('\n%s\n' % optrst(options, ui.verbose))
394 rst.append('\n%s\n' % optrst(options, ui.verbose))
393 return rst
395 return rst
394
396
395 def helptopic(name):
397 def helptopic(name):
396 for names, header, doc in helptable:
398 for names, header, doc in helptable:
397 if name in names:
399 if name in names:
398 break
400 break
399 else:
401 else:
400 raise error.UnknownCommand(name)
402 raise error.UnknownCommand(name)
401
403
402 rst = [minirst.section(header)]
404 rst = [minirst.section(header)]
403
405
404 # description
406 # description
405 if not doc:
407 if not doc:
406 rst.append(" %s\n" % _("(no help text available)"))
408 rst.append(" %s\n" % _("(no help text available)"))
407 if util.safehasattr(doc, '__call__'):
409 if util.safehasattr(doc, '__call__'):
408 rst += [" %s\n" % l for l in doc().splitlines()]
410 rst += [" %s\n" % l for l in doc().splitlines()]
409
411
410 if not ui.verbose:
412 if not ui.verbose:
411 omitted = (_('use "hg help -v %s" to show more complete help') %
413 omitted = (_('use "hg help -v %s" to show more complete help') %
412 name)
414 name)
413 indicateomitted(rst, omitted)
415 indicateomitted(rst, omitted)
414
416
415 try:
417 try:
416 cmdutil.findcmd(name, commands.table)
418 cmdutil.findcmd(name, commands.table)
417 rst.append(_('\nuse "hg help -c %s" to see help for '
419 rst.append(_('\nuse "hg help -c %s" to see help for '
418 'the %s command\n') % (name, name))
420 'the %s command\n') % (name, name))
419 except error.UnknownCommand:
421 except error.UnknownCommand:
420 pass
422 pass
421 return rst
423 return rst
422
424
423 def helpext(name):
425 def helpext(name):
424 try:
426 try:
425 mod = extensions.find(name)
427 mod = extensions.find(name)
426 doc = gettext(mod.__doc__) or _('no help text available')
428 doc = gettext(mod.__doc__) or _('no help text available')
427 except KeyError:
429 except KeyError:
428 mod = None
430 mod = None
429 doc = extensions.disabledext(name)
431 doc = extensions.disabledext(name)
430 if not doc:
432 if not doc:
431 raise error.UnknownCommand(name)
433 raise error.UnknownCommand(name)
432
434
433 if '\n' not in doc:
435 if '\n' not in doc:
434 head, tail = doc, ""
436 head, tail = doc, ""
435 else:
437 else:
436 head, tail = doc.split('\n', 1)
438 head, tail = doc.split('\n', 1)
437 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
439 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
438 if tail:
440 if tail:
439 rst.extend(tail.splitlines(True))
441 rst.extend(tail.splitlines(True))
440 rst.append('\n')
442 rst.append('\n')
441
443
442 if not ui.verbose:
444 if not ui.verbose:
443 omitted = (_('use "hg help -v %s" to show more complete help') %
445 omitted = (_('use "hg help -v %s" to show more complete help') %
444 name)
446 name)
445 indicateomitted(rst, omitted)
447 indicateomitted(rst, omitted)
446
448
447 if mod:
449 if mod:
448 try:
450 try:
449 ct = mod.cmdtable
451 ct = mod.cmdtable
450 except AttributeError:
452 except AttributeError:
451 ct = {}
453 ct = {}
452 modcmds = set([c.split('|', 1)[0] for c in ct])
454 modcmds = set([c.split('|', 1)[0] for c in ct])
453 rst.extend(helplist(modcmds.__contains__))
455 rst.extend(helplist(modcmds.__contains__))
454 else:
456 else:
455 rst.append(_('use "hg help extensions" for information on enabling '
457 rst.append(_('use "hg help extensions" for information on enabling '
456 'extensions\n'))
458 'extensions\n'))
457 return rst
459 return rst
458
460
459 def helpextcmd(name):
461 def helpextcmd(name):
460 cmd, ext, mod = extensions.disabledcmd(ui, name,
462 cmd, ext, mod = extensions.disabledcmd(ui, name,
461 ui.configbool('ui', 'strict'))
463 ui.configbool('ui', 'strict'))
462 doc = gettext(mod.__doc__).splitlines()[0]
464 doc = gettext(mod.__doc__).splitlines()[0]
463
465
464 rst = listexts(_("'%s' is provided by the following "
466 rst = listexts(_("'%s' is provided by the following "
465 "extension:") % cmd, {ext: doc}, indent=4)
467 "extension:") % cmd, {ext: doc}, indent=4)
466 rst.append('\n')
468 rst.append('\n')
467 rst.append(_('use "hg help extensions" for information on enabling '
469 rst.append(_('use "hg help extensions" for information on enabling '
468 'extensions\n'))
470 'extensions\n'))
469 return rst
471 return rst
470
472
471
473
472 rst = []
474 rst = []
473 kw = opts.get('keyword')
475 kw = opts.get('keyword')
474 if kw:
476 if kw:
475 matches = topicmatch(kw)
477 matches = topicmatch(kw)
476 for t, title in (('topics', _('Topics')),
478 for t, title in (('topics', _('Topics')),
477 ('commands', _('Commands')),
479 ('commands', _('Commands')),
478 ('extensions', _('Extensions')),
480 ('extensions', _('Extensions')),
479 ('extensioncommands', _('Extension Commands'))):
481 ('extensioncommands', _('Extension Commands'))):
480 if matches[t]:
482 if matches[t]:
481 rst.append('%s:\n\n' % title)
483 rst.append('%s:\n\n' % title)
482 rst.extend(minirst.maketable(sorted(matches[t]), 1))
484 rst.extend(minirst.maketable(sorted(matches[t]), 1))
483 rst.append('\n')
485 rst.append('\n')
484 elif name and name != 'shortlist':
486 elif name and name != 'shortlist':
485 i = None
487 i = None
486 if unknowncmd:
488 if unknowncmd:
487 queries = (helpextcmd,)
489 queries = (helpextcmd,)
488 elif opts.get('extension'):
490 elif opts.get('extension'):
489 queries = (helpext,)
491 queries = (helpext,)
490 elif opts.get('command'):
492 elif opts.get('command'):
491 queries = (helpcmd,)
493 queries = (helpcmd,)
492 else:
494 else:
493 queries = (helptopic, helpcmd, helpext, helpextcmd)
495 queries = (helptopic, helpcmd, helpext, helpextcmd)
494 for f in queries:
496 for f in queries:
495 try:
497 try:
496 rst = f(name)
498 rst = f(name)
497 i = None
499 i = None
498 break
500 break
499 except error.UnknownCommand, inst:
501 except error.UnknownCommand, inst:
500 i = inst
502 i = inst
501 if i:
503 if i:
502 raise i
504 raise i
503 else:
505 else:
504 # program name
506 # program name
505 if not ui.quiet:
507 if not ui.quiet:
506 rst = [_("Mercurial Distributed SCM\n"), '\n']
508 rst = [_("Mercurial Distributed SCM\n"), '\n']
507 rst.extend(helplist())
509 rst.extend(helplist())
508
510
509 return ''.join(rst)
511 return ''.join(rst)
@@ -1,2032 +1,2093
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 working directory with another revision
17 merge merge working directory with another revision
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 working directory with another revision
38 merge merge working directory with another revision
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 track a line of development with movable markers
58 bookmarks track a line of development with movable markers
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 forget forget the specified files on the next commit
69 forget forget the specified files on the next commit
70 graft copy changes from other branches onto the current branch
70 graft copy changes from other branches onto the current branch
71 grep search for a pattern in specified files and revisions
71 grep search for a pattern in specified files and revisions
72 heads show branch heads
72 heads show branch heads
73 help show help for a given topic or a help overview
73 help show help for a given topic or a help overview
74 identify identify the working copy or specified revision
74 identify identify the working copy or specified revision
75 import import an ordered set of patches
75 import import an ordered set of patches
76 incoming show new changesets found in source
76 incoming show new changesets found in source
77 init create a new repository in the given directory
77 init create a new repository in the given directory
78 locate locate files matching specific patterns
78 locate locate files matching specific patterns
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 working directory with another revision
81 merge merge working directory with another revision
82 outgoing show changesets not found in the destination
82 outgoing show changesets not found in the destination
83 parents show the parents of the working directory or revision
83 parents show the parents of the working directory or revision
84 paths show aliases for remote repositories
84 paths show aliases for remote repositories
85 phase set or show the current phase name
85 phase set or show the current phase name
86 pull pull changes from the specified source
86 pull pull changes from the specified source
87 push push changes to the specified destination
87 push push changes to the specified destination
88 recover roll back an interrupted transaction
88 recover roll back an interrupted transaction
89 remove remove the specified files on the next commit
89 remove remove the specified files on the next commit
90 rename rename files; equivalent of copy + remove
90 rename rename files; equivalent of copy + remove
91 resolve redo merges or set/view the merge status of files
91 resolve redo merges or set/view the merge status of files
92 revert restore files to their checkout state
92 revert restore files to their checkout state
93 root print the root (top) of the current working directory
93 root print the root (top) of the current working directory
94 serve start stand-alone webserver
94 serve start stand-alone webserver
95 status show changed files in the working directory
95 status show changed files in the working directory
96 summary summarize working directory state
96 summary summarize working directory state
97 tag add one or more tags for the current or given revision
97 tag add one or more tags for the current or given revision
98 tags list repository tags
98 tags list repository tags
99 unbundle apply one or more changegroup files
99 unbundle apply one or more changegroup files
100 update update working directory (or switch revisions)
100 update update working directory (or switch revisions)
101 verify verify the integrity of the repository
101 verify verify the integrity of the repository
102 version output version and copyright information
102 version output version and copyright information
103
103
104 additional help topics:
104 additional help topics:
105
105
106 config Configuration Files
106 config Configuration Files
107 dates Date Formats
107 dates Date Formats
108 diffs Diff Formats
108 diffs Diff Formats
109 environment Environment Variables
109 environment Environment Variables
110 extensions Using Additional Features
110 extensions Using Additional Features
111 filesets Specifying File Sets
111 filesets Specifying File Sets
112 glossary Glossary
112 glossary Glossary
113 hgignore Syntax for Mercurial Ignore Files
113 hgignore Syntax for Mercurial Ignore Files
114 hgweb Configuring hgweb
114 hgweb Configuring hgweb
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 subrepos Subrepositories
121 subrepos Subrepositories
122 templating Template Usage
122 templating Template Usage
123 urls URL Paths
123 urls URL Paths
124
124
125 use "hg -v help" to show builtin aliases and global options
125 use "hg -v help" to show builtin aliases and global options
126
126
127 $ hg -q help
127 $ hg -q help
128 add add the specified files on the next commit
128 add add the specified files on the next commit
129 addremove add all new files, delete all missing files
129 addremove add all new files, delete all missing files
130 annotate show changeset information by line for each file
130 annotate show changeset information by line for each file
131 archive create an unversioned archive of a repository revision
131 archive create an unversioned archive of a repository revision
132 backout reverse effect of earlier changeset
132 backout reverse effect of earlier changeset
133 bisect subdivision search of changesets
133 bisect subdivision search of changesets
134 bookmarks track a line of development with movable markers
134 bookmarks track a line of development with movable markers
135 branch set or show the current branch name
135 branch set or show the current branch name
136 branches list repository named branches
136 branches list repository named branches
137 bundle create a changegroup file
137 bundle create a changegroup file
138 cat output the current or given revision of files
138 cat output the current or given revision of files
139 clone make a copy of an existing repository
139 clone make a copy of an existing repository
140 commit commit the specified files or all outstanding changes
140 commit commit the specified files or all outstanding changes
141 config show combined config settings from all hgrc files
141 config show combined config settings from all hgrc files
142 copy mark files as copied for the next commit
142 copy mark files as copied for the next commit
143 diff diff repository (or selected files)
143 diff diff repository (or selected files)
144 export dump the header and diffs for one or more changesets
144 export dump the header and diffs for one or more changesets
145 forget forget the specified files on the next commit
145 forget forget the specified files on the next commit
146 graft copy changes from other branches onto the current branch
146 graft copy changes from other branches onto the current branch
147 grep search for a pattern in specified files and revisions
147 grep search for a pattern in specified files and revisions
148 heads show branch heads
148 heads show branch heads
149 help show help for a given topic or a help overview
149 help show help for a given topic or a help overview
150 identify identify the working copy or specified revision
150 identify identify the working copy or specified revision
151 import import an ordered set of patches
151 import import an ordered set of patches
152 incoming show new changesets found in source
152 incoming show new changesets found in source
153 init create a new repository in the given directory
153 init create a new repository in the given directory
154 locate locate files matching specific patterns
154 locate locate files matching specific patterns
155 log show revision history of entire repository or files
155 log show revision history of entire repository or files
156 manifest output the current or given revision of the project manifest
156 manifest output the current or given revision of the project manifest
157 merge merge working directory with another revision
157 merge merge working directory with another revision
158 outgoing show changesets not found in the destination
158 outgoing show changesets not found in the destination
159 parents show the parents of the working directory or revision
159 parents show the parents of the working directory or revision
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 merge-tools Merge Tools
191 merge-tools Merge Tools
192 multirevs Specifying Multiple Revisions
192 multirevs Specifying Multiple Revisions
193 patterns File Name Patterns
193 patterns File Name Patterns
194 phases Working with Phases
194 phases Working with Phases
195 revisions Specifying Single Revisions
195 revisions Specifying Single Revisions
196 revsets Specifying Revision Sets
196 revsets Specifying Revision Sets
197 subrepos Subrepositories
197 subrepos Subrepositories
198 templating Template Usage
198 templating Template Usage
199 urls URL Paths
199 urls URL Paths
200
200
201 Test extension help:
201 Test extension help:
202 $ hg help extensions --config extensions.rebase= --config extensions.children=
202 $ hg help extensions --config extensions.rebase= --config extensions.children=
203 Using Additional Features
203 Using Additional Features
204 """""""""""""""""""""""""
204 """""""""""""""""""""""""
205
205
206 Mercurial has the ability to add new features through the use of
206 Mercurial has the ability to add new features through the use of
207 extensions. Extensions may add new commands, add options to existing
207 extensions. Extensions may add new commands, add options to existing
208 commands, change the default behavior of commands, or implement hooks.
208 commands, change the default behavior of commands, or implement hooks.
209
209
210 To enable the "foo" extension, either shipped with Mercurial or in the
210 To enable the "foo" extension, either shipped with Mercurial or in the
211 Python search path, create an entry for it in your configuration file,
211 Python search path, create an entry for it in your configuration file,
212 like this:
212 like this:
213
213
214 [extensions]
214 [extensions]
215 foo =
215 foo =
216
216
217 You may also specify the full path to an extension:
217 You may also specify the full path to an extension:
218
218
219 [extensions]
219 [extensions]
220 myfeature = ~/.hgext/myfeature.py
220 myfeature = ~/.hgext/myfeature.py
221
221
222 See "hg help config" for more information on configuration files.
222 See "hg help config" for more information on configuration files.
223
223
224 Extensions are not loaded by default for a variety of reasons: they can
224 Extensions are not loaded by default for a variety of reasons: they can
225 increase startup overhead; they may be meant for advanced usage only; they
225 increase startup overhead; they may be meant for advanced usage only; they
226 may provide potentially dangerous abilities (such as letting you destroy
226 may provide potentially dangerous abilities (such as letting you destroy
227 or modify history); they might not be ready for prime time; or they may
227 or modify history); they might not be ready for prime time; or they may
228 alter some usual behaviors of stock Mercurial. It is thus up to the user
228 alter some usual behaviors of stock Mercurial. It is thus up to the user
229 to activate extensions as needed.
229 to activate extensions as needed.
230
230
231 To explicitly disable an extension enabled in a configuration file of
231 To explicitly disable an extension enabled in a configuration file of
232 broader scope, prepend its path with !:
232 broader scope, prepend its path with !:
233
233
234 [extensions]
234 [extensions]
235 # disabling extension bar residing in /path/to/extension/bar.py
235 # disabling extension bar residing in /path/to/extension/bar.py
236 bar = !/path/to/extension/bar.py
236 bar = !/path/to/extension/bar.py
237 # ditto, but no path was supplied for extension baz
237 # ditto, but no path was supplied for extension baz
238 baz = !
238 baz = !
239
239
240 enabled extensions:
240 enabled extensions:
241
241
242 children command to display child changesets (DEPRECATED)
242 children command to display child changesets (DEPRECATED)
243 rebase command to move sets of revisions to a different ancestor
243 rebase command to move sets of revisions to a different ancestor
244
244
245 disabled extensions:
245 disabled extensions:
246
246
247 acl hooks for controlling repository access
247 acl hooks for controlling repository access
248 blackbox log repository events to a blackbox for debugging
248 blackbox log repository events to a blackbox for debugging
249 bugzilla hooks for integrating with the Bugzilla bug tracker
249 bugzilla hooks for integrating with the Bugzilla bug tracker
250 churn command to display statistics about repository history
250 churn command to display statistics about repository history
251 color colorize output from some commands
251 color colorize output from some commands
252 convert import revisions from foreign VCS repositories into
252 convert import revisions from foreign VCS repositories into
253 Mercurial
253 Mercurial
254 eol automatically manage newlines in repository files
254 eol automatically manage newlines in repository files
255 extdiff command to allow external programs to compare revisions
255 extdiff command to allow external programs to compare revisions
256 factotum http authentication with factotum
256 factotum http authentication with factotum
257 gpg commands to sign and verify changesets
257 gpg commands to sign and verify changesets
258 hgcia hooks for integrating with the CIA.vc notification service
258 hgcia hooks for integrating with the CIA.vc notification service
259 hgk browse the repository in a graphical way
259 hgk browse the repository in a graphical way
260 highlight syntax highlighting for hgweb (requires Pygments)
260 highlight syntax highlighting for hgweb (requires Pygments)
261 histedit interactive history editing
261 histedit interactive history editing
262 keyword expand keywords in tracked files
262 keyword expand keywords in tracked files
263 largefiles track large binary files
263 largefiles track large binary files
264 mq manage a stack of patches
264 mq manage a stack of patches
265 notify hooks for sending email push notifications
265 notify hooks for sending email push notifications
266 pager browse command output with an external pager
266 pager browse command output with an external pager
267 patchbomb command to send changesets as (a series of) patch emails
267 patchbomb command to send changesets as (a series of) patch emails
268 progress show progress bars for some actions
268 progress show progress bars for some actions
269 purge command to delete untracked files from the working
269 purge command to delete untracked files from the working
270 directory
270 directory
271 record commands to interactively select changes for
271 record commands to interactively select changes for
272 commit/qrefresh
272 commit/qrefresh
273 relink recreates hardlinks between repository clones
273 relink recreates hardlinks between repository clones
274 schemes extend schemes with shortcuts to repository swarms
274 schemes extend schemes with shortcuts to repository swarms
275 share share a common history between several working directories
275 share share a common history between several working directories
276 shelve save and restore changes to the working directory
276 shelve save and restore changes to the working directory
277 strip strip changesets and their descendents from history
277 strip strip changesets and their descendents from history
278 transplant command to transplant changesets from another branch
278 transplant command to transplant changesets from another branch
279 win32mbcs allow the use of MBCS paths with problematic encodings
279 win32mbcs allow the use of MBCS paths with problematic encodings
280 zeroconf discover and advertise repositories on the local network
280 zeroconf discover and advertise repositories on the local network
281 Test short command list with verbose option
281 Test short command list with verbose option
282
282
283 $ hg -v help shortlist
283 $ hg -v help shortlist
284 Mercurial Distributed SCM
284 Mercurial Distributed SCM
285
285
286 basic commands:
286 basic commands:
287
287
288 add add the specified files on the next commit
288 add add the specified files on the next commit
289 annotate, blame
289 annotate, blame
290 show changeset information by line for each file
290 show changeset information by line for each file
291 clone make a copy of an existing repository
291 clone make a copy of an existing repository
292 commit, ci commit the specified files or all outstanding changes
292 commit, ci commit the specified files or all outstanding changes
293 diff diff repository (or selected files)
293 diff diff repository (or selected files)
294 export dump the header and diffs for one or more changesets
294 export dump the header and diffs for one or more changesets
295 forget forget the specified files on the next commit
295 forget forget the specified files on the next commit
296 init create a new repository in the given directory
296 init create a new repository in the given directory
297 log, history show revision history of entire repository or files
297 log, history show revision history of entire repository or files
298 merge merge working directory with another revision
298 merge merge working directory with another revision
299 pull pull changes from the specified source
299 pull pull changes from the specified source
300 push push changes to the specified destination
300 push push changes to the specified destination
301 remove, rm remove the specified files on the next commit
301 remove, rm remove the specified files on the next commit
302 serve start stand-alone webserver
302 serve start stand-alone webserver
303 status, st show changed files in the working directory
303 status, st show changed files in the working directory
304 summary, sum summarize working directory state
304 summary, sum summarize working directory state
305 update, up, checkout, co
305 update, up, checkout, co
306 update working directory (or switch revisions)
306 update working directory (or switch revisions)
307
307
308 global options:
308 global options:
309
309
310 -R --repository REPO repository root directory or name of overlay bundle
310 -R --repository REPO repository root directory or name of overlay bundle
311 file
311 file
312 --cwd DIR change working directory
312 --cwd DIR change working directory
313 -y --noninteractive do not prompt, automatically pick the first choice for
313 -y --noninteractive do not prompt, automatically pick the first choice for
314 all prompts
314 all prompts
315 -q --quiet suppress output
315 -q --quiet suppress output
316 -v --verbose enable additional output
316 -v --verbose enable additional output
317 --config CONFIG [+] set/override config option (use 'section.name=value')
317 --config CONFIG [+] set/override config option (use 'section.name=value')
318 --debug enable debugging output
318 --debug enable debugging output
319 --debugger start debugger
319 --debugger start debugger
320 --encoding ENCODE set the charset encoding (default: ascii)
320 --encoding ENCODE set the charset encoding (default: ascii)
321 --encodingmode MODE set the charset encoding mode (default: strict)
321 --encodingmode MODE set the charset encoding mode (default: strict)
322 --traceback always print a traceback on exception
322 --traceback always print a traceback on exception
323 --time time how long the command takes
323 --time time how long the command takes
324 --profile print command execution profile
324 --profile print command execution profile
325 --version output version information and exit
325 --version output version information and exit
326 -h --help display help and exit
326 -h --help display help and exit
327 --hidden consider hidden changesets
327 --hidden consider hidden changesets
328
328
329 [+] marked option can be specified multiple times
329 [+] marked option can be specified multiple times
330
330
331 use "hg help" for the full list of commands
331 use "hg help" for the full list of commands
332
332
333 $ hg add -h
333 $ hg add -h
334 hg add [OPTION]... [FILE]...
334 hg add [OPTION]... [FILE]...
335
335
336 add the specified files on the next commit
336 add the specified files on the next commit
337
337
338 Schedule files to be version controlled and added to the repository.
338 Schedule files to be version controlled and added to the repository.
339
339
340 The files will be added to the repository at the next commit. To undo an
340 The files will be added to the repository at the next commit. To undo an
341 add before that, see "hg forget".
341 add before that, see "hg forget".
342
342
343 If no names are given, add all files to the repository.
343 If no names are given, add all files to the repository.
344
344
345 Returns 0 if all files are successfully added.
345 Returns 0 if all files are successfully added.
346
346
347 options:
347 options:
348
348
349 -I --include PATTERN [+] include names matching the given patterns
349 -I --include PATTERN [+] include names matching the given patterns
350 -X --exclude PATTERN [+] exclude names matching the given patterns
350 -X --exclude PATTERN [+] exclude names matching the given patterns
351 -S --subrepos recurse into subrepositories
351 -S --subrepos recurse into subrepositories
352 -n --dry-run do not perform actions, just print output
352 -n --dry-run do not perform actions, just print output
353
353
354 [+] marked option can be specified multiple times
354 [+] marked option can be specified multiple times
355
355
356 use "hg -v help add" to show more complete help and the global options
356 use "hg -v help add" to show more complete help and the global options
357
357
358 Verbose help for add
358 Verbose help for add
359
359
360 $ hg add -hv
360 $ hg add -hv
361 hg add [OPTION]... [FILE]...
361 hg add [OPTION]... [FILE]...
362
362
363 add the specified files on the next commit
363 add the specified files on the next commit
364
364
365 Schedule files to be version controlled and added to the repository.
365 Schedule files to be version controlled and added to the repository.
366
366
367 The files will be added to the repository at the next commit. To undo an
367 The files will be added to the repository at the next commit. To undo an
368 add before that, see "hg forget".
368 add before that, see "hg forget".
369
369
370 If no names are given, add all files to the repository.
370 If no names are given, add all files to the repository.
371
371
372 An example showing how new (unknown) files are added automatically by "hg
372 An example showing how new (unknown) files are added automatically by "hg
373 add":
373 add":
374
374
375 $ ls
375 $ ls
376 foo.c
376 foo.c
377 $ hg status
377 $ hg status
378 ? foo.c
378 ? foo.c
379 $ hg add
379 $ hg add
380 adding foo.c
380 adding foo.c
381 $ hg status
381 $ hg status
382 A foo.c
382 A foo.c
383
383
384 Returns 0 if all files are successfully added.
384 Returns 0 if all files are successfully added.
385
385
386 options:
386 options:
387
387
388 -I --include PATTERN [+] include names matching the given patterns
388 -I --include PATTERN [+] include names matching the given patterns
389 -X --exclude PATTERN [+] exclude names matching the given patterns
389 -X --exclude PATTERN [+] exclude names matching the given patterns
390 -S --subrepos recurse into subrepositories
390 -S --subrepos recurse into subrepositories
391 -n --dry-run do not perform actions, just print output
391 -n --dry-run do not perform actions, just print output
392
392
393 [+] marked option can be specified multiple times
393 [+] marked option can be specified multiple times
394
394
395 global options:
395 global options:
396
396
397 -R --repository REPO repository root directory or name of overlay bundle
397 -R --repository REPO repository root directory or name of overlay bundle
398 file
398 file
399 --cwd DIR change working directory
399 --cwd DIR change working directory
400 -y --noninteractive do not prompt, automatically pick the first choice for
400 -y --noninteractive do not prompt, automatically pick the first choice for
401 all prompts
401 all prompts
402 -q --quiet suppress output
402 -q --quiet suppress output
403 -v --verbose enable additional output
403 -v --verbose enable additional output
404 --config CONFIG [+] set/override config option (use 'section.name=value')
404 --config CONFIG [+] set/override config option (use 'section.name=value')
405 --debug enable debugging output
405 --debug enable debugging output
406 --debugger start debugger
406 --debugger start debugger
407 --encoding ENCODE set the charset encoding (default: ascii)
407 --encoding ENCODE set the charset encoding (default: ascii)
408 --encodingmode MODE set the charset encoding mode (default: strict)
408 --encodingmode MODE set the charset encoding mode (default: strict)
409 --traceback always print a traceback on exception
409 --traceback always print a traceback on exception
410 --time time how long the command takes
410 --time time how long the command takes
411 --profile print command execution profile
411 --profile print command execution profile
412 --version output version information and exit
412 --version output version information and exit
413 -h --help display help and exit
413 -h --help display help and exit
414 --hidden consider hidden changesets
414 --hidden consider hidden changesets
415
415
416 [+] marked option can be specified multiple times
416 [+] marked option can be specified multiple times
417
417
418 Test help option with version option
418 Test help option with version option
419
419
420 $ hg add -h --version
420 $ hg add -h --version
421 Mercurial Distributed SCM (version *) (glob)
421 Mercurial Distributed SCM (version *) (glob)
422 (see http://mercurial.selenic.com for more information)
422 (see http://mercurial.selenic.com for more information)
423
423
424 Copyright (C) 2005-2014 Matt Mackall and others
424 Copyright (C) 2005-2014 Matt Mackall and others
425 This is free software; see the source for copying conditions. There is NO
425 This is free software; see the source for copying conditions. There is NO
426 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
426 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
427
427
428 $ hg add --skjdfks
428 $ hg add --skjdfks
429 hg add: option --skjdfks not recognized
429 hg add: option --skjdfks not recognized
430 hg add [OPTION]... [FILE]...
430 hg add [OPTION]... [FILE]...
431
431
432 add the specified files on the next commit
432 add the specified files on the next commit
433
433
434 options:
434 options:
435
435
436 -I --include PATTERN [+] include names matching the given patterns
436 -I --include PATTERN [+] include names matching the given patterns
437 -X --exclude PATTERN [+] exclude names matching the given patterns
437 -X --exclude PATTERN [+] exclude names matching the given patterns
438 -S --subrepos recurse into subrepositories
438 -S --subrepos recurse into subrepositories
439 -n --dry-run do not perform actions, just print output
439 -n --dry-run do not perform actions, just print output
440
440
441 [+] marked option can be specified multiple times
441 [+] marked option can be specified multiple times
442
442
443 use "hg help add" to show the full help text
443 use "hg help add" to show the full help text
444 [255]
444 [255]
445
445
446 Test ambiguous command help
446 Test ambiguous command help
447
447
448 $ hg help ad
448 $ hg help ad
449 list of commands:
449 list of commands:
450
450
451 add add the specified files on the next commit
451 add add the specified files on the next commit
452 addremove add all new files, delete all missing files
452 addremove add all new files, delete all missing files
453
453
454 use "hg -v help ad" to show builtin aliases and global options
454 use "hg -v help ad" to show builtin aliases and global options
455
455
456 Test command without options
456 Test command without options
457
457
458 $ hg help verify
458 $ hg help verify
459 hg verify
459 hg verify
460
460
461 verify the integrity of the repository
461 verify the integrity of the repository
462
462
463 Verify the integrity of the current repository.
463 Verify the integrity of the current repository.
464
464
465 This will perform an extensive check of the repository's integrity,
465 This will perform an extensive check of the repository's integrity,
466 validating the hashes and checksums of each entry in the changelog,
466 validating the hashes and checksums of each entry in the changelog,
467 manifest, and tracked files, as well as the integrity of their crosslinks
467 manifest, and tracked files, as well as the integrity of their crosslinks
468 and indices.
468 and indices.
469
469
470 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
470 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
471 information about recovery from corruption of the repository.
471 information about recovery from corruption of the repository.
472
472
473 Returns 0 on success, 1 if errors are encountered.
473 Returns 0 on success, 1 if errors are encountered.
474
474
475 use "hg -v help verify" to show the global options
475 use "hg -v help verify" to show the global options
476
476
477 $ hg help diff
477 $ hg help diff
478 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
478 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
479
479
480 diff repository (or selected files)
480 diff repository (or selected files)
481
481
482 Show differences between revisions for the specified files.
482 Show differences between revisions for the specified files.
483
483
484 Differences between files are shown using the unified diff format.
484 Differences between files are shown using the unified diff format.
485
485
486 Note:
486 Note:
487 diff may generate unexpected results for merges, as it will default to
487 diff may generate unexpected results for merges, as it will default to
488 comparing against the working directory's first parent changeset if no
488 comparing against the working directory's first parent changeset if no
489 revisions are specified.
489 revisions are specified.
490
490
491 When two revision arguments are given, then changes are shown between
491 When two revision arguments are given, then changes are shown between
492 those revisions. If only one revision is specified then that revision is
492 those revisions. If only one revision is specified then that revision is
493 compared to the working directory, and, when no revisions are specified,
493 compared to the working directory, and, when no revisions are specified,
494 the working directory files are compared to its parent.
494 the working directory files are compared to its parent.
495
495
496 Alternatively you can specify -c/--change with a revision to see the
496 Alternatively you can specify -c/--change with a revision to see the
497 changes in that changeset relative to its first parent.
497 changes in that changeset relative to its first parent.
498
498
499 Without the -a/--text option, diff will avoid generating diffs of files it
499 Without the -a/--text option, diff will avoid generating diffs of files it
500 detects as binary. With -a, diff will generate a diff anyway, probably
500 detects as binary. With -a, diff will generate a diff anyway, probably
501 with undesirable results.
501 with undesirable results.
502
502
503 Use the -g/--git option to generate diffs in the git extended diff format.
503 Use the -g/--git option to generate diffs in the git extended diff format.
504 For more information, read "hg help diffs".
504 For more information, read "hg help diffs".
505
505
506 Returns 0 on success.
506 Returns 0 on success.
507
507
508 options:
508 options:
509
509
510 -r --rev REV [+] revision
510 -r --rev REV [+] revision
511 -c --change REV change made by revision
511 -c --change REV change made by revision
512 -a --text treat all files as text
512 -a --text treat all files as text
513 -g --git use git extended diff format
513 -g --git use git extended diff format
514 --nodates omit dates from diff headers
514 --nodates omit dates from diff headers
515 -p --show-function show which function each change is in
515 -p --show-function show which function each change is in
516 --reverse produce a diff that undoes the changes
516 --reverse produce a diff that undoes the changes
517 -w --ignore-all-space ignore white space when comparing lines
517 -w --ignore-all-space ignore white space when comparing lines
518 -b --ignore-space-change ignore changes in the amount of white space
518 -b --ignore-space-change ignore changes in the amount of white space
519 -B --ignore-blank-lines ignore changes whose lines are all blank
519 -B --ignore-blank-lines ignore changes whose lines are all blank
520 -U --unified NUM number of lines of context to show
520 -U --unified NUM number of lines of context to show
521 --stat output diffstat-style summary of changes
521 --stat output diffstat-style summary of changes
522 -I --include PATTERN [+] include names matching the given patterns
522 -I --include PATTERN [+] include names matching the given patterns
523 -X --exclude PATTERN [+] exclude names matching the given patterns
523 -X --exclude PATTERN [+] exclude names matching the given patterns
524 -S --subrepos recurse into subrepositories
524 -S --subrepos recurse into subrepositories
525
525
526 [+] marked option can be specified multiple times
526 [+] marked option can be specified multiple times
527
527
528 use "hg -v help diff" to show more complete help and the global options
528 use "hg -v help diff" to show more complete help and the global options
529
529
530 $ hg help status
530 $ hg help status
531 hg status [OPTION]... [FILE]...
531 hg status [OPTION]... [FILE]...
532
532
533 aliases: st
533 aliases: st
534
534
535 show changed files in the working directory
535 show changed files in the working directory
536
536
537 Show status of files in the repository. If names are given, only files
537 Show status of files in the repository. If names are given, only files
538 that match are shown. Files that are clean or ignored or the source of a
538 that match are shown. Files that are clean or ignored or the source of a
539 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
539 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
540 -C/--copies or -A/--all are given. Unless options described with "show
540 -C/--copies or -A/--all are given. Unless options described with "show
541 only ..." are given, the options -mardu are used.
541 only ..." are given, the options -mardu are used.
542
542
543 Option -q/--quiet hides untracked (unknown and ignored) files unless
543 Option -q/--quiet hides untracked (unknown and ignored) files unless
544 explicitly requested with -u/--unknown or -i/--ignored.
544 explicitly requested with -u/--unknown or -i/--ignored.
545
545
546 Note:
546 Note:
547 status may appear to disagree with diff if permissions have changed or
547 status may appear to disagree with diff if permissions have changed or
548 a merge has occurred. The standard diff format does not report
548 a merge has occurred. The standard diff format does not report
549 permission changes and diff only reports changes relative to one merge
549 permission changes and diff only reports changes relative to one merge
550 parent.
550 parent.
551
551
552 If one revision is given, it is used as the base revision. If two
552 If one revision is given, it is used as the base revision. If two
553 revisions are given, the differences between them are shown. The --change
553 revisions are given, the differences between them are shown. The --change
554 option can also be used as a shortcut to list the changed files of a
554 option can also be used as a shortcut to list the changed files of a
555 revision from its first parent.
555 revision from its first parent.
556
556
557 The codes used to show the status of files are:
557 The codes used to show the status of files are:
558
558
559 M = modified
559 M = modified
560 A = added
560 A = added
561 R = removed
561 R = removed
562 C = clean
562 C = clean
563 ! = missing (deleted by non-hg command, but still tracked)
563 ! = missing (deleted by non-hg command, but still tracked)
564 ? = not tracked
564 ? = not tracked
565 I = ignored
565 I = ignored
566 = origin of the previous file (with --copies)
566 = origin of the previous file (with --copies)
567
567
568 Returns 0 on success.
568 Returns 0 on success.
569
569
570 options:
570 options:
571
571
572 -A --all show status of all files
572 -A --all show status of all files
573 -m --modified show only modified files
573 -m --modified show only modified files
574 -a --added show only added files
574 -a --added show only added files
575 -r --removed show only removed files
575 -r --removed show only removed files
576 -d --deleted show only deleted (but tracked) files
576 -d --deleted show only deleted (but tracked) files
577 -c --clean show only files without changes
577 -c --clean show only files without changes
578 -u --unknown show only unknown (not tracked) files
578 -u --unknown show only unknown (not tracked) files
579 -i --ignored show only ignored files
579 -i --ignored show only ignored files
580 -n --no-status hide status prefix
580 -n --no-status hide status prefix
581 -C --copies show source of copied files
581 -C --copies show source of copied files
582 -0 --print0 end filenames with NUL, for use with xargs
582 -0 --print0 end filenames with NUL, for use with xargs
583 --rev REV [+] show difference from revision
583 --rev REV [+] show difference from revision
584 --change REV list the changed files of a revision
584 --change REV list the changed files of a revision
585 -I --include PATTERN [+] include names matching the given patterns
585 -I --include PATTERN [+] include names matching the given patterns
586 -X --exclude PATTERN [+] exclude names matching the given patterns
586 -X --exclude PATTERN [+] exclude names matching the given patterns
587 -S --subrepos recurse into subrepositories
587 -S --subrepos recurse into subrepositories
588
588
589 [+] marked option can be specified multiple times
589 [+] marked option can be specified multiple times
590
590
591 use "hg -v help status" to show more complete help and the global options
591 use "hg -v help status" to show more complete help and the global options
592
592
593 $ hg -q help status
593 $ hg -q help status
594 hg status [OPTION]... [FILE]...
594 hg status [OPTION]... [FILE]...
595
595
596 show changed files in the working directory
596 show changed files in the working directory
597
597
598 $ hg help foo
598 $ hg help foo
599 hg: unknown command 'foo'
599 hg: unknown command 'foo'
600 Mercurial Distributed SCM
600 Mercurial Distributed SCM
601
601
602 basic commands:
602 basic commands:
603
603
604 add add the specified files on the next commit
604 add add the specified files on the next commit
605 annotate show changeset information by line for each file
605 annotate show changeset information by line for each file
606 clone make a copy of an existing repository
606 clone make a copy of an existing repository
607 commit commit the specified files or all outstanding changes
607 commit commit the specified files or all outstanding changes
608 diff diff repository (or selected files)
608 diff diff repository (or selected files)
609 export dump the header and diffs for one or more changesets
609 export dump the header and diffs for one or more changesets
610 forget forget the specified files on the next commit
610 forget forget the specified files on the next commit
611 init create a new repository in the given directory
611 init create a new repository in the given directory
612 log show revision history of entire repository or files
612 log show revision history of entire repository or files
613 merge merge working directory with another revision
613 merge merge working directory with another revision
614 pull pull changes from the specified source
614 pull pull changes from the specified source
615 push push changes to the specified destination
615 push push changes to the specified destination
616 remove remove the specified files on the next commit
616 remove remove the specified files on the next commit
617 serve start stand-alone webserver
617 serve start stand-alone webserver
618 status show changed files in the working directory
618 status show changed files in the working directory
619 summary summarize working directory state
619 summary summarize working directory state
620 update update working directory (or switch revisions)
620 update update working directory (or switch revisions)
621
621
622 use "hg help" for the full list of commands or "hg -v" for details
622 use "hg help" for the full list of commands or "hg -v" for details
623 [255]
623 [255]
624
624
625 $ hg skjdfks
625 $ hg skjdfks
626 hg: unknown command 'skjdfks'
626 hg: unknown command 'skjdfks'
627 Mercurial Distributed SCM
627 Mercurial Distributed SCM
628
628
629 basic commands:
629 basic commands:
630
630
631 add add the specified files on the next commit
631 add add the specified files on the next commit
632 annotate show changeset information by line for each file
632 annotate show changeset information by line for each file
633 clone make a copy of an existing repository
633 clone make a copy of an existing repository
634 commit commit the specified files or all outstanding changes
634 commit commit the specified files or all outstanding changes
635 diff diff repository (or selected files)
635 diff diff repository (or selected files)
636 export dump the header and diffs for one or more changesets
636 export dump the header and diffs for one or more changesets
637 forget forget the specified files on the next commit
637 forget forget the specified files on the next commit
638 init create a new repository in the given directory
638 init create a new repository in the given directory
639 log show revision history of entire repository or files
639 log show revision history of entire repository or files
640 merge merge working directory with another revision
640 merge merge working directory with another revision
641 pull pull changes from the specified source
641 pull pull changes from the specified source
642 push push changes to the specified destination
642 push push changes to the specified destination
643 remove remove the specified files on the next commit
643 remove remove the specified files on the next commit
644 serve start stand-alone webserver
644 serve start stand-alone webserver
645 status show changed files in the working directory
645 status show changed files in the working directory
646 summary summarize working directory state
646 summary summarize working directory state
647 update update working directory (or switch revisions)
647 update update working directory (or switch revisions)
648
648
649 use "hg help" for the full list of commands or "hg -v" for details
649 use "hg help" for the full list of commands or "hg -v" for details
650 [255]
650 [255]
651
651
652
652
653 $ cat > helpext.py <<EOF
653 $ cat > helpext.py <<EOF
654 > import os
654 > import os
655 > from mercurial import commands
655 > from mercurial import commands
656 >
656 >
657 > def nohelp(ui, *args, **kwargs):
657 > def nohelp(ui, *args, **kwargs):
658 > pass
658 > pass
659 >
659 >
660 > cmdtable = {
660 > cmdtable = {
661 > "debugoptDEP": (nohelp, [('', 'dopt', None, 'option is DEPRECATED')],),
661 > "debugoptDEP": (nohelp, [('', 'dopt', None, 'option is DEPRECATED')],),
662 > "nohelp": (nohelp, [('', 'longdesc', 3, 'x'*90),
662 > "nohelp": (nohelp, [('', 'longdesc', 3, 'x'*90),
663 > ('n', '', None, 'normal desc'),
663 > ('n', '', None, 'normal desc'),
664 > ('', 'newline', '', 'line1\nline2'),
664 > ('', 'newline', '', 'line1\nline2'),
665 > ], "hg nohelp"),
665 > ], "hg nohelp"),
666 > }
666 > }
667 >
667 >
668 > commands.norepo += ' nohelp'
668 > commands.norepo += ' nohelp'
669 > EOF
669 > EOF
670 $ echo '[extensions]' >> $HGRCPATH
670 $ echo '[extensions]' >> $HGRCPATH
671 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
671 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
672
672
673 Test command with no help text
673 Test command with no help text
674
674
675 $ hg help nohelp
675 $ hg help nohelp
676 hg nohelp
676 hg nohelp
677
677
678 (no help text available)
678 (no help text available)
679
679
680 options:
680 options:
681
681
682 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
682 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
683 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
683 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
684 -n -- normal desc
684 -n -- normal desc
685 --newline VALUE line1 line2
685 --newline VALUE line1 line2
686
686
687 use "hg -v help nohelp" to show the global options
687 use "hg -v help nohelp" to show the global options
688
688
689 $ hg help -k nohelp
689 $ hg help -k nohelp
690 Commands:
690 Commands:
691
691
692 nohelp hg nohelp
692 nohelp hg nohelp
693
693
694 Extension Commands:
694 Extension Commands:
695
695
696 nohelp (no help text available)
696 nohelp (no help text available)
697
697
698 Test that default list of commands omits extension commands
698 Test that default list of commands omits extension commands
699
699
700 $ hg help
700 $ hg help
701 Mercurial Distributed SCM
701 Mercurial Distributed SCM
702
702
703 list of commands:
703 list of commands:
704
704
705 add add the specified files on the next commit
705 add add the specified files on the next commit
706 addremove add all new files, delete all missing files
706 addremove add all new files, delete all missing files
707 annotate show changeset information by line for each file
707 annotate show changeset information by line for each file
708 archive create an unversioned archive of a repository revision
708 archive create an unversioned archive of a repository revision
709 backout reverse effect of earlier changeset
709 backout reverse effect of earlier changeset
710 bisect subdivision search of changesets
710 bisect subdivision search of changesets
711 bookmarks track a line of development with movable markers
711 bookmarks track a line of development with movable markers
712 branch set or show the current branch name
712 branch set or show the current branch name
713 branches list repository named branches
713 branches list repository named branches
714 bundle create a changegroup file
714 bundle create a changegroup file
715 cat output the current or given revision of files
715 cat output the current or given revision of files
716 clone make a copy of an existing repository
716 clone make a copy of an existing repository
717 commit commit the specified files or all outstanding changes
717 commit commit the specified files or all outstanding changes
718 config show combined config settings from all hgrc files
718 config show combined config settings from all hgrc files
719 copy mark files as copied for the next commit
719 copy mark files as copied for the next commit
720 diff diff repository (or selected files)
720 diff diff repository (or selected files)
721 export dump the header and diffs for one or more changesets
721 export dump the header and diffs for one or more changesets
722 forget forget the specified files on the next commit
722 forget forget the specified files on the next commit
723 graft copy changes from other branches onto the current branch
723 graft copy changes from other branches onto the current branch
724 grep search for a pattern in specified files and revisions
724 grep search for a pattern in specified files and revisions
725 heads show branch heads
725 heads show branch heads
726 help show help for a given topic or a help overview
726 help show help for a given topic or a help overview
727 identify identify the working copy or specified revision
727 identify identify the working copy or specified revision
728 import import an ordered set of patches
728 import import an ordered set of patches
729 incoming show new changesets found in source
729 incoming show new changesets found in source
730 init create a new repository in the given directory
730 init create a new repository in the given directory
731 locate locate files matching specific patterns
731 locate locate files matching specific patterns
732 log show revision history of entire repository or files
732 log show revision history of entire repository or files
733 manifest output the current or given revision of the project manifest
733 manifest output the current or given revision of the project manifest
734 merge merge working directory with another revision
734 merge merge working directory with another revision
735 outgoing show changesets not found in the destination
735 outgoing show changesets not found in the destination
736 parents show the parents of the working directory or revision
736 parents show the parents of the working directory or revision
737 paths show aliases for remote repositories
737 paths show aliases for remote repositories
738 phase set or show the current phase name
738 phase set or show the current phase name
739 pull pull changes from the specified source
739 pull pull changes from the specified source
740 push push changes to the specified destination
740 push push changes to the specified destination
741 recover roll back an interrupted transaction
741 recover roll back an interrupted transaction
742 remove remove the specified files on the next commit
742 remove remove the specified files on the next commit
743 rename rename files; equivalent of copy + remove
743 rename rename files; equivalent of copy + remove
744 resolve redo merges or set/view the merge status of files
744 resolve redo merges or set/view the merge status of files
745 revert restore files to their checkout state
745 revert restore files to their checkout state
746 root print the root (top) of the current working directory
746 root print the root (top) of the current working directory
747 serve start stand-alone webserver
747 serve start stand-alone webserver
748 status show changed files in the working directory
748 status show changed files in the working directory
749 summary summarize working directory state
749 summary summarize working directory state
750 tag add one or more tags for the current or given revision
750 tag add one or more tags for the current or given revision
751 tags list repository tags
751 tags list repository tags
752 unbundle apply one or more changegroup files
752 unbundle apply one or more changegroup files
753 update update working directory (or switch revisions)
753 update update working directory (or switch revisions)
754 verify verify the integrity of the repository
754 verify verify the integrity of the repository
755 version output version and copyright information
755 version output version and copyright information
756
756
757 enabled extensions:
757 enabled extensions:
758
758
759 helpext (no help text available)
759 helpext (no help text available)
760
760
761 additional help topics:
761 additional help topics:
762
762
763 config Configuration Files
763 config Configuration Files
764 dates Date Formats
764 dates Date Formats
765 diffs Diff Formats
765 diffs Diff Formats
766 environment Environment Variables
766 environment Environment Variables
767 extensions Using Additional Features
767 extensions Using Additional Features
768 filesets Specifying File Sets
768 filesets Specifying File Sets
769 glossary Glossary
769 glossary Glossary
770 hgignore Syntax for Mercurial Ignore Files
770 hgignore Syntax for Mercurial Ignore Files
771 hgweb Configuring hgweb
771 hgweb Configuring hgweb
772 merge-tools Merge Tools
772 merge-tools Merge Tools
773 multirevs Specifying Multiple Revisions
773 multirevs Specifying Multiple Revisions
774 patterns File Name Patterns
774 patterns File Name Patterns
775 phases Working with Phases
775 phases Working with Phases
776 revisions Specifying Single Revisions
776 revisions Specifying Single Revisions
777 revsets Specifying Revision Sets
777 revsets Specifying Revision Sets
778 subrepos Subrepositories
778 subrepos Subrepositories
779 templating Template Usage
779 templating Template Usage
780 urls URL Paths
780 urls URL Paths
781
781
782 use "hg -v help" to show builtin aliases and global options
782 use "hg -v help" to show builtin aliases and global options
783
783
784
784
785 Test list of internal help commands
786
787 $ hg help debug
788 debug commands (internal and unsupported):
789
790 debugancestor
791 find the ancestor revision of two revisions in a given index
792 debugbuilddag
793 builds a repo with a given DAG from scratch in the current
794 empty repo
795 debugbundle lists the contents of a bundle
796 debugcheckstate
797 validate the correctness of the current dirstate
798 debugcommands
799 list all available commands and options
800 debugcomplete
801 returns the completion list associated with the given command
802 debugdag format the changelog or an index DAG as a concise textual
803 description
804 debugdata dump the contents of a data file revision
805 debugdate parse and display a date
806 debugdirstate
807 show the contents of the current dirstate
808 debugdiscovery
809 runs the changeset discovery protocol in isolation
810 debugfileset parse and apply a fileset specification
811 debugfsinfo show information detected about current filesystem
812 debuggetbundle
813 retrieves a bundle from a repo
814 debugignore display the combined ignore pattern
815 debugindex dump the contents of an index file
816 debugindexdot
817 dump an index DAG as a graphviz dot file
818 debuginstall test Mercurial installation
819 debugknown test whether node ids are known to a repo
820 debuglabelcomplete
821 complete "labels" - tags, open branch names, bookmark names
822 debugobsolete
823 create arbitrary obsolete marker
824 debugoptDEP (no help text available)
825 debugpathcomplete
826 complete part or all of a tracked path
827 debugpushkey access the pushkey key/value protocol
828 debugpvec (no help text available)
829 debugrebuilddirstate
830 rebuild the dirstate as it would look like for the given
831 revision
832 debugrename dump rename information
833 debugrevlog show data and statistics about a revlog
834 debugrevspec parse and apply a revision specification
835 debugsetparents
836 manually set the parents of the current working directory
837 debugsub (no help text available)
838 debugsuccessorssets
839 show set of successors for revision
840 debugwalk show how files match on given patterns
841 debugwireargs
842 (no help text available)
843
844 use "hg -v help debug" to show builtin aliases and global options
845
785
846
786 Test list of commands with command with no help text
847 Test list of commands with command with no help text
787
848
788 $ hg help helpext
849 $ hg help helpext
789 helpext extension - no help text available
850 helpext extension - no help text available
790
851
791 list of commands:
852 list of commands:
792
853
793 nohelp (no help text available)
854 nohelp (no help text available)
794
855
795 use "hg -v help helpext" to show builtin aliases and global options
856 use "hg -v help helpext" to show builtin aliases and global options
796
857
797
858
798 test deprecated option is hidden in command help
859 test deprecated option is hidden in command help
799 $ hg help debugoptDEP
860 $ hg help debugoptDEP
800 hg debugoptDEP
861 hg debugoptDEP
801
862
802 (no help text available)
863 (no help text available)
803
864
804 options:
865 options:
805
866
806 use "hg -v help debugoptDEP" to show the global options
867 use "hg -v help debugoptDEP" to show the global options
807
868
808 test deprecated option is shown with -v
869 test deprecated option is shown with -v
809 $ hg help -v debugoptDEP | grep dopt
870 $ hg help -v debugoptDEP | grep dopt
810 --dopt option is DEPRECATED
871 --dopt option is DEPRECATED
811
872
812 test deprecated option is hidden with translation with untranslated description
873 test deprecated option is hidden with translation with untranslated description
813 (use many globy for not failing on changed transaction)
874 (use many globy for not failing on changed transaction)
814 $ LANGUAGE=sv hg help debugoptDEP
875 $ LANGUAGE=sv hg help debugoptDEP
815 hg debugoptDEP
876 hg debugoptDEP
816
877
817 (*) (glob)
878 (*) (glob)
818
879
819 flaggor:
880 flaggor:
820
881
821 *"hg -v help debugoptDEP"* (glob)
882 *"hg -v help debugoptDEP"* (glob)
822
883
823
884
824 Test a help topic
885 Test a help topic
825
886
826 $ hg help revs
887 $ hg help revs
827 Specifying Single Revisions
888 Specifying Single Revisions
828 """""""""""""""""""""""""""
889 """""""""""""""""""""""""""
829
890
830 Mercurial supports several ways to specify individual revisions.
891 Mercurial supports several ways to specify individual revisions.
831
892
832 A plain integer is treated as a revision number. Negative integers are
893 A plain integer is treated as a revision number. Negative integers are
833 treated as sequential offsets from the tip, with -1 denoting the tip, -2
894 treated as sequential offsets from the tip, with -1 denoting the tip, -2
834 denoting the revision prior to the tip, and so forth.
895 denoting the revision prior to the tip, and so forth.
835
896
836 A 40-digit hexadecimal string is treated as a unique revision identifier.
897 A 40-digit hexadecimal string is treated as a unique revision identifier.
837
898
838 A hexadecimal string less than 40 characters long is treated as a unique
899 A hexadecimal string less than 40 characters long is treated as a unique
839 revision identifier and is referred to as a short-form identifier. A
900 revision identifier and is referred to as a short-form identifier. A
840 short-form identifier is only valid if it is the prefix of exactly one
901 short-form identifier is only valid if it is the prefix of exactly one
841 full-length identifier.
902 full-length identifier.
842
903
843 Any other string is treated as a bookmark, tag, or branch name. A bookmark
904 Any other string is treated as a bookmark, tag, or branch name. A bookmark
844 is a movable pointer to a revision. A tag is a permanent name associated
905 is a movable pointer to a revision. A tag is a permanent name associated
845 with a revision. A branch name denotes the tipmost open branch head of
906 with a revision. A branch name denotes the tipmost open branch head of
846 that branch - or if they are all closed, the tipmost closed head of the
907 that branch - or if they are all closed, the tipmost closed head of the
847 branch. Bookmark, tag, and branch names must not contain the ":"
908 branch. Bookmark, tag, and branch names must not contain the ":"
848 character.
909 character.
849
910
850 The reserved name "tip" always identifies the most recent revision.
911 The reserved name "tip" always identifies the most recent revision.
851
912
852 The reserved name "null" indicates the null revision. This is the revision
913 The reserved name "null" indicates the null revision. This is the revision
853 of an empty repository, and the parent of revision 0.
914 of an empty repository, and the parent of revision 0.
854
915
855 The reserved name "." indicates the working directory parent. If no
916 The reserved name "." indicates the working directory parent. If no
856 working directory is checked out, it is equivalent to null. If an
917 working directory is checked out, it is equivalent to null. If an
857 uncommitted merge is in progress, "." is the revision of the first parent.
918 uncommitted merge is in progress, "." is the revision of the first parent.
858
919
859 Test templating help
920 Test templating help
860
921
861 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
922 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
862 desc String. The text of the changeset description.
923 desc String. The text of the changeset description.
863 diffstat String. Statistics of changes with the following format:
924 diffstat String. Statistics of changes with the following format:
864 firstline Any text. Returns the first line of text.
925 firstline Any text. Returns the first line of text.
865 nonempty Any text. Returns '(none)' if the string is empty.
926 nonempty Any text. Returns '(none)' if the string is empty.
866
927
867 Test help hooks
928 Test help hooks
868
929
869 $ cat > helphook1.py <<EOF
930 $ cat > helphook1.py <<EOF
870 > from mercurial import help
931 > from mercurial import help
871 >
932 >
872 > def rewrite(topic, doc):
933 > def rewrite(topic, doc):
873 > return doc + '\nhelphook1\n'
934 > return doc + '\nhelphook1\n'
874 >
935 >
875 > def extsetup(ui):
936 > def extsetup(ui):
876 > help.addtopichook('revsets', rewrite)
937 > help.addtopichook('revsets', rewrite)
877 > EOF
938 > EOF
878 $ cat > helphook2.py <<EOF
939 $ cat > helphook2.py <<EOF
879 > from mercurial import help
940 > from mercurial import help
880 >
941 >
881 > def rewrite(topic, doc):
942 > def rewrite(topic, doc):
882 > return doc + '\nhelphook2\n'
943 > return doc + '\nhelphook2\n'
883 >
944 >
884 > def extsetup(ui):
945 > def extsetup(ui):
885 > help.addtopichook('revsets', rewrite)
946 > help.addtopichook('revsets', rewrite)
886 > EOF
947 > EOF
887 $ echo '[extensions]' >> $HGRCPATH
948 $ echo '[extensions]' >> $HGRCPATH
888 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
949 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
889 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
950 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
890 $ hg help revsets | grep helphook
951 $ hg help revsets | grep helphook
891 helphook1
952 helphook1
892 helphook2
953 helphook2
893
954
894 Test keyword search help
955 Test keyword search help
895
956
896 $ cat > prefixedname.py <<EOF
957 $ cat > prefixedname.py <<EOF
897 > '''matched against word "clone"
958 > '''matched against word "clone"
898 > '''
959 > '''
899 > EOF
960 > EOF
900 $ echo '[extensions]' >> $HGRCPATH
961 $ echo '[extensions]' >> $HGRCPATH
901 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
962 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
902 $ hg help -k clone
963 $ hg help -k clone
903 Topics:
964 Topics:
904
965
905 config Configuration Files
966 config Configuration Files
906 extensions Using Additional Features
967 extensions Using Additional Features
907 glossary Glossary
968 glossary Glossary
908 phases Working with Phases
969 phases Working with Phases
909 subrepos Subrepositories
970 subrepos Subrepositories
910 urls URL Paths
971 urls URL Paths
911
972
912 Commands:
973 Commands:
913
974
914 bookmarks track a line of development with movable markers
975 bookmarks track a line of development with movable markers
915 clone make a copy of an existing repository
976 clone make a copy of an existing repository
916 paths show aliases for remote repositories
977 paths show aliases for remote repositories
917 update update working directory (or switch revisions)
978 update update working directory (or switch revisions)
918
979
919 Extensions:
980 Extensions:
920
981
921 prefixedname matched against word "clone"
982 prefixedname matched against word "clone"
922 relink recreates hardlinks between repository clones
983 relink recreates hardlinks between repository clones
923
984
924 Extension Commands:
985 Extension Commands:
925
986
926 qclone clone main and patch repository at same time
987 qclone clone main and patch repository at same time
927
988
928 Test omit indicating for help
989 Test omit indicating for help
929
990
930 $ cat > addverboseitems.py <<EOF
991 $ cat > addverboseitems.py <<EOF
931 > '''extension to test omit indicating.
992 > '''extension to test omit indicating.
932 >
993 >
933 > This paragraph is never omitted (for extension)
994 > This paragraph is never omitted (for extension)
934 >
995 >
935 > .. container:: verbose
996 > .. container:: verbose
936 >
997 >
937 > This paragraph is omitted,
998 > This paragraph is omitted,
938 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension)
999 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension)
939 >
1000 >
940 > This paragraph is never omitted, too (for extension)
1001 > This paragraph is never omitted, too (for extension)
941 > '''
1002 > '''
942 >
1003 >
943 > from mercurial import help, commands
1004 > from mercurial import help, commands
944 > testtopic = """This paragraph is never omitted (for topic).
1005 > testtopic = """This paragraph is never omitted (for topic).
945 >
1006 >
946 > .. container:: verbose
1007 > .. container:: verbose
947 >
1008 >
948 > This paragraph is omitted,
1009 > This paragraph is omitted,
949 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic)
1010 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic)
950 >
1011 >
951 > This paragraph is never omitted, too (for topic)
1012 > This paragraph is never omitted, too (for topic)
952 > """
1013 > """
953 > def extsetup(ui):
1014 > def extsetup(ui):
954 > help.helptable.append((["topic-containing-verbose"],
1015 > help.helptable.append((["topic-containing-verbose"],
955 > "This is the topic to test omit indicating.",
1016 > "This is the topic to test omit indicating.",
956 > lambda : testtopic))
1017 > lambda : testtopic))
957 > EOF
1018 > EOF
958 $ echo '[extensions]' >> $HGRCPATH
1019 $ echo '[extensions]' >> $HGRCPATH
959 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1020 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
960 $ hg help addverboseitems
1021 $ hg help addverboseitems
961 addverboseitems extension - extension to test omit indicating.
1022 addverboseitems extension - extension to test omit indicating.
962
1023
963 This paragraph is never omitted (for extension)
1024 This paragraph is never omitted (for extension)
964
1025
965 This paragraph is never omitted, too (for extension)
1026 This paragraph is never omitted, too (for extension)
966
1027
967 use "hg help -v addverboseitems" to show more complete help
1028 use "hg help -v addverboseitems" to show more complete help
968
1029
969 no commands defined
1030 no commands defined
970 $ hg help -v addverboseitems
1031 $ hg help -v addverboseitems
971 addverboseitems extension - extension to test omit indicating.
1032 addverboseitems extension - extension to test omit indicating.
972
1033
973 This paragraph is never omitted (for extension)
1034 This paragraph is never omitted (for extension)
974
1035
975 This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension)
1036 This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension)
976
1037
977 This paragraph is never omitted, too (for extension)
1038 This paragraph is never omitted, too (for extension)
978
1039
979 no commands defined
1040 no commands defined
980 $ hg help topic-containing-verbose
1041 $ hg help topic-containing-verbose
981 This is the topic to test omit indicating.
1042 This is the topic to test omit indicating.
982 """"""""""""""""""""""""""""""""""""""""""
1043 """"""""""""""""""""""""""""""""""""""""""
983
1044
984 This paragraph is never omitted (for topic).
1045 This paragraph is never omitted (for topic).
985
1046
986 This paragraph is never omitted, too (for topic)
1047 This paragraph is never omitted, too (for topic)
987
1048
988 use "hg help -v topic-containing-verbose" to show more complete help
1049 use "hg help -v topic-containing-verbose" to show more complete help
989 $ hg help -v topic-containing-verbose
1050 $ hg help -v topic-containing-verbose
990 This is the topic to test omit indicating.
1051 This is the topic to test omit indicating.
991 """"""""""""""""""""""""""""""""""""""""""
1052 """"""""""""""""""""""""""""""""""""""""""
992
1053
993 This paragraph is never omitted (for topic).
1054 This paragraph is never omitted (for topic).
994
1055
995 This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic)
1056 This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic)
996
1057
997 This paragraph is never omitted, too (for topic)
1058 This paragraph is never omitted, too (for topic)
998
1059
999 Test usage of section marks in help documents
1060 Test usage of section marks in help documents
1000
1061
1001 $ cd "$TESTDIR"/../doc
1062 $ cd "$TESTDIR"/../doc
1002 $ python check-seclevel.py
1063 $ python check-seclevel.py
1003 $ cd $TESTTMP
1064 $ cd $TESTTMP
1004
1065
1005 #if serve
1066 #if serve
1006
1067
1007 Test the help pages in hgweb.
1068 Test the help pages in hgweb.
1008
1069
1009 Dish up an empty repo; serve it cold.
1070 Dish up an empty repo; serve it cold.
1010
1071
1011 $ hg init "$TESTTMP/test"
1072 $ hg init "$TESTTMP/test"
1012 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1073 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1013 $ cat hg.pid >> $DAEMON_PIDS
1074 $ cat hg.pid >> $DAEMON_PIDS
1014
1075
1015 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1076 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1016 200 Script output follows
1077 200 Script output follows
1017
1078
1018 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1079 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1019 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1080 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1020 <head>
1081 <head>
1021 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1082 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1022 <meta name="robots" content="index, nofollow" />
1083 <meta name="robots" content="index, nofollow" />
1023 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1084 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1024 <script type="text/javascript" src="/static/mercurial.js"></script>
1085 <script type="text/javascript" src="/static/mercurial.js"></script>
1025
1086
1026 <title>Help: Index</title>
1087 <title>Help: Index</title>
1027 </head>
1088 </head>
1028 <body>
1089 <body>
1029
1090
1030 <div class="container">
1091 <div class="container">
1031 <div class="menu">
1092 <div class="menu">
1032 <div class="logo">
1093 <div class="logo">
1033 <a href="http://mercurial.selenic.com/">
1094 <a href="http://mercurial.selenic.com/">
1034 <img src="/static/hglogo.png" alt="mercurial" /></a>
1095 <img src="/static/hglogo.png" alt="mercurial" /></a>
1035 </div>
1096 </div>
1036 <ul>
1097 <ul>
1037 <li><a href="/shortlog">log</a></li>
1098 <li><a href="/shortlog">log</a></li>
1038 <li><a href="/graph">graph</a></li>
1099 <li><a href="/graph">graph</a></li>
1039 <li><a href="/tags">tags</a></li>
1100 <li><a href="/tags">tags</a></li>
1040 <li><a href="/bookmarks">bookmarks</a></li>
1101 <li><a href="/bookmarks">bookmarks</a></li>
1041 <li><a href="/branches">branches</a></li>
1102 <li><a href="/branches">branches</a></li>
1042 </ul>
1103 </ul>
1043 <ul>
1104 <ul>
1044 <li class="active">help</li>
1105 <li class="active">help</li>
1045 </ul>
1106 </ul>
1046 </div>
1107 </div>
1047
1108
1048 <div class="main">
1109 <div class="main">
1049 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1110 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1050 <form class="search" action="/log">
1111 <form class="search" action="/log">
1051
1112
1052 <p><input name="rev" id="search1" type="text" size="30" /></p>
1113 <p><input name="rev" id="search1" type="text" size="30" /></p>
1053 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1114 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1054 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1115 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1055 </form>
1116 </form>
1056 <table class="bigtable">
1117 <table class="bigtable">
1057 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1118 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1058
1119
1059 <tr><td>
1120 <tr><td>
1060 <a href="/help/config">
1121 <a href="/help/config">
1061 config
1122 config
1062 </a>
1123 </a>
1063 </td><td>
1124 </td><td>
1064 Configuration Files
1125 Configuration Files
1065 </td></tr>
1126 </td></tr>
1066 <tr><td>
1127 <tr><td>
1067 <a href="/help/dates">
1128 <a href="/help/dates">
1068 dates
1129 dates
1069 </a>
1130 </a>
1070 </td><td>
1131 </td><td>
1071 Date Formats
1132 Date Formats
1072 </td></tr>
1133 </td></tr>
1073 <tr><td>
1134 <tr><td>
1074 <a href="/help/diffs">
1135 <a href="/help/diffs">
1075 diffs
1136 diffs
1076 </a>
1137 </a>
1077 </td><td>
1138 </td><td>
1078 Diff Formats
1139 Diff Formats
1079 </td></tr>
1140 </td></tr>
1080 <tr><td>
1141 <tr><td>
1081 <a href="/help/environment">
1142 <a href="/help/environment">
1082 environment
1143 environment
1083 </a>
1144 </a>
1084 </td><td>
1145 </td><td>
1085 Environment Variables
1146 Environment Variables
1086 </td></tr>
1147 </td></tr>
1087 <tr><td>
1148 <tr><td>
1088 <a href="/help/extensions">
1149 <a href="/help/extensions">
1089 extensions
1150 extensions
1090 </a>
1151 </a>
1091 </td><td>
1152 </td><td>
1092 Using Additional Features
1153 Using Additional Features
1093 </td></tr>
1154 </td></tr>
1094 <tr><td>
1155 <tr><td>
1095 <a href="/help/filesets">
1156 <a href="/help/filesets">
1096 filesets
1157 filesets
1097 </a>
1158 </a>
1098 </td><td>
1159 </td><td>
1099 Specifying File Sets
1160 Specifying File Sets
1100 </td></tr>
1161 </td></tr>
1101 <tr><td>
1162 <tr><td>
1102 <a href="/help/glossary">
1163 <a href="/help/glossary">
1103 glossary
1164 glossary
1104 </a>
1165 </a>
1105 </td><td>
1166 </td><td>
1106 Glossary
1167 Glossary
1107 </td></tr>
1168 </td></tr>
1108 <tr><td>
1169 <tr><td>
1109 <a href="/help/hgignore">
1170 <a href="/help/hgignore">
1110 hgignore
1171 hgignore
1111 </a>
1172 </a>
1112 </td><td>
1173 </td><td>
1113 Syntax for Mercurial Ignore Files
1174 Syntax for Mercurial Ignore Files
1114 </td></tr>
1175 </td></tr>
1115 <tr><td>
1176 <tr><td>
1116 <a href="/help/hgweb">
1177 <a href="/help/hgweb">
1117 hgweb
1178 hgweb
1118 </a>
1179 </a>
1119 </td><td>
1180 </td><td>
1120 Configuring hgweb
1181 Configuring hgweb
1121 </td></tr>
1182 </td></tr>
1122 <tr><td>
1183 <tr><td>
1123 <a href="/help/merge-tools">
1184 <a href="/help/merge-tools">
1124 merge-tools
1185 merge-tools
1125 </a>
1186 </a>
1126 </td><td>
1187 </td><td>
1127 Merge Tools
1188 Merge Tools
1128 </td></tr>
1189 </td></tr>
1129 <tr><td>
1190 <tr><td>
1130 <a href="/help/multirevs">
1191 <a href="/help/multirevs">
1131 multirevs
1192 multirevs
1132 </a>
1193 </a>
1133 </td><td>
1194 </td><td>
1134 Specifying Multiple Revisions
1195 Specifying Multiple Revisions
1135 </td></tr>
1196 </td></tr>
1136 <tr><td>
1197 <tr><td>
1137 <a href="/help/patterns">
1198 <a href="/help/patterns">
1138 patterns
1199 patterns
1139 </a>
1200 </a>
1140 </td><td>
1201 </td><td>
1141 File Name Patterns
1202 File Name Patterns
1142 </td></tr>
1203 </td></tr>
1143 <tr><td>
1204 <tr><td>
1144 <a href="/help/phases">
1205 <a href="/help/phases">
1145 phases
1206 phases
1146 </a>
1207 </a>
1147 </td><td>
1208 </td><td>
1148 Working with Phases
1209 Working with Phases
1149 </td></tr>
1210 </td></tr>
1150 <tr><td>
1211 <tr><td>
1151 <a href="/help/revisions">
1212 <a href="/help/revisions">
1152 revisions
1213 revisions
1153 </a>
1214 </a>
1154 </td><td>
1215 </td><td>
1155 Specifying Single Revisions
1216 Specifying Single Revisions
1156 </td></tr>
1217 </td></tr>
1157 <tr><td>
1218 <tr><td>
1158 <a href="/help/revsets">
1219 <a href="/help/revsets">
1159 revsets
1220 revsets
1160 </a>
1221 </a>
1161 </td><td>
1222 </td><td>
1162 Specifying Revision Sets
1223 Specifying Revision Sets
1163 </td></tr>
1224 </td></tr>
1164 <tr><td>
1225 <tr><td>
1165 <a href="/help/subrepos">
1226 <a href="/help/subrepos">
1166 subrepos
1227 subrepos
1167 </a>
1228 </a>
1168 </td><td>
1229 </td><td>
1169 Subrepositories
1230 Subrepositories
1170 </td></tr>
1231 </td></tr>
1171 <tr><td>
1232 <tr><td>
1172 <a href="/help/templating">
1233 <a href="/help/templating">
1173 templating
1234 templating
1174 </a>
1235 </a>
1175 </td><td>
1236 </td><td>
1176 Template Usage
1237 Template Usage
1177 </td></tr>
1238 </td></tr>
1178 <tr><td>
1239 <tr><td>
1179 <a href="/help/urls">
1240 <a href="/help/urls">
1180 urls
1241 urls
1181 </a>
1242 </a>
1182 </td><td>
1243 </td><td>
1183 URL Paths
1244 URL Paths
1184 </td></tr>
1245 </td></tr>
1185 <tr><td>
1246 <tr><td>
1186 <a href="/help/topic-containing-verbose">
1247 <a href="/help/topic-containing-verbose">
1187 topic-containing-verbose
1248 topic-containing-verbose
1188 </a>
1249 </a>
1189 </td><td>
1250 </td><td>
1190 This is the topic to test omit indicating.
1251 This is the topic to test omit indicating.
1191 </td></tr>
1252 </td></tr>
1192
1253
1193 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1254 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1194
1255
1195 <tr><td>
1256 <tr><td>
1196 <a href="/help/add">
1257 <a href="/help/add">
1197 add
1258 add
1198 </a>
1259 </a>
1199 </td><td>
1260 </td><td>
1200 add the specified files on the next commit
1261 add the specified files on the next commit
1201 </td></tr>
1262 </td></tr>
1202 <tr><td>
1263 <tr><td>
1203 <a href="/help/annotate">
1264 <a href="/help/annotate">
1204 annotate
1265 annotate
1205 </a>
1266 </a>
1206 </td><td>
1267 </td><td>
1207 show changeset information by line for each file
1268 show changeset information by line for each file
1208 </td></tr>
1269 </td></tr>
1209 <tr><td>
1270 <tr><td>
1210 <a href="/help/clone">
1271 <a href="/help/clone">
1211 clone
1272 clone
1212 </a>
1273 </a>
1213 </td><td>
1274 </td><td>
1214 make a copy of an existing repository
1275 make a copy of an existing repository
1215 </td></tr>
1276 </td></tr>
1216 <tr><td>
1277 <tr><td>
1217 <a href="/help/commit">
1278 <a href="/help/commit">
1218 commit
1279 commit
1219 </a>
1280 </a>
1220 </td><td>
1281 </td><td>
1221 commit the specified files or all outstanding changes
1282 commit the specified files or all outstanding changes
1222 </td></tr>
1283 </td></tr>
1223 <tr><td>
1284 <tr><td>
1224 <a href="/help/diff">
1285 <a href="/help/diff">
1225 diff
1286 diff
1226 </a>
1287 </a>
1227 </td><td>
1288 </td><td>
1228 diff repository (or selected files)
1289 diff repository (or selected files)
1229 </td></tr>
1290 </td></tr>
1230 <tr><td>
1291 <tr><td>
1231 <a href="/help/export">
1292 <a href="/help/export">
1232 export
1293 export
1233 </a>
1294 </a>
1234 </td><td>
1295 </td><td>
1235 dump the header and diffs for one or more changesets
1296 dump the header and diffs for one or more changesets
1236 </td></tr>
1297 </td></tr>
1237 <tr><td>
1298 <tr><td>
1238 <a href="/help/forget">
1299 <a href="/help/forget">
1239 forget
1300 forget
1240 </a>
1301 </a>
1241 </td><td>
1302 </td><td>
1242 forget the specified files on the next commit
1303 forget the specified files on the next commit
1243 </td></tr>
1304 </td></tr>
1244 <tr><td>
1305 <tr><td>
1245 <a href="/help/init">
1306 <a href="/help/init">
1246 init
1307 init
1247 </a>
1308 </a>
1248 </td><td>
1309 </td><td>
1249 create a new repository in the given directory
1310 create a new repository in the given directory
1250 </td></tr>
1311 </td></tr>
1251 <tr><td>
1312 <tr><td>
1252 <a href="/help/log">
1313 <a href="/help/log">
1253 log
1314 log
1254 </a>
1315 </a>
1255 </td><td>
1316 </td><td>
1256 show revision history of entire repository or files
1317 show revision history of entire repository or files
1257 </td></tr>
1318 </td></tr>
1258 <tr><td>
1319 <tr><td>
1259 <a href="/help/merge">
1320 <a href="/help/merge">
1260 merge
1321 merge
1261 </a>
1322 </a>
1262 </td><td>
1323 </td><td>
1263 merge working directory with another revision
1324 merge working directory with another revision
1264 </td></tr>
1325 </td></tr>
1265 <tr><td>
1326 <tr><td>
1266 <a href="/help/pull">
1327 <a href="/help/pull">
1267 pull
1328 pull
1268 </a>
1329 </a>
1269 </td><td>
1330 </td><td>
1270 pull changes from the specified source
1331 pull changes from the specified source
1271 </td></tr>
1332 </td></tr>
1272 <tr><td>
1333 <tr><td>
1273 <a href="/help/push">
1334 <a href="/help/push">
1274 push
1335 push
1275 </a>
1336 </a>
1276 </td><td>
1337 </td><td>
1277 push changes to the specified destination
1338 push changes to the specified destination
1278 </td></tr>
1339 </td></tr>
1279 <tr><td>
1340 <tr><td>
1280 <a href="/help/remove">
1341 <a href="/help/remove">
1281 remove
1342 remove
1282 </a>
1343 </a>
1283 </td><td>
1344 </td><td>
1284 remove the specified files on the next commit
1345 remove the specified files on the next commit
1285 </td></tr>
1346 </td></tr>
1286 <tr><td>
1347 <tr><td>
1287 <a href="/help/serve">
1348 <a href="/help/serve">
1288 serve
1349 serve
1289 </a>
1350 </a>
1290 </td><td>
1351 </td><td>
1291 start stand-alone webserver
1352 start stand-alone webserver
1292 </td></tr>
1353 </td></tr>
1293 <tr><td>
1354 <tr><td>
1294 <a href="/help/status">
1355 <a href="/help/status">
1295 status
1356 status
1296 </a>
1357 </a>
1297 </td><td>
1358 </td><td>
1298 show changed files in the working directory
1359 show changed files in the working directory
1299 </td></tr>
1360 </td></tr>
1300 <tr><td>
1361 <tr><td>
1301 <a href="/help/summary">
1362 <a href="/help/summary">
1302 summary
1363 summary
1303 </a>
1364 </a>
1304 </td><td>
1365 </td><td>
1305 summarize working directory state
1366 summarize working directory state
1306 </td></tr>
1367 </td></tr>
1307 <tr><td>
1368 <tr><td>
1308 <a href="/help/update">
1369 <a href="/help/update">
1309 update
1370 update
1310 </a>
1371 </a>
1311 </td><td>
1372 </td><td>
1312 update working directory (or switch revisions)
1373 update working directory (or switch revisions)
1313 </td></tr>
1374 </td></tr>
1314
1375
1315 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1376 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1316
1377
1317 <tr><td>
1378 <tr><td>
1318 <a href="/help/addremove">
1379 <a href="/help/addremove">
1319 addremove
1380 addremove
1320 </a>
1381 </a>
1321 </td><td>
1382 </td><td>
1322 add all new files, delete all missing files
1383 add all new files, delete all missing files
1323 </td></tr>
1384 </td></tr>
1324 <tr><td>
1385 <tr><td>
1325 <a href="/help/archive">
1386 <a href="/help/archive">
1326 archive
1387 archive
1327 </a>
1388 </a>
1328 </td><td>
1389 </td><td>
1329 create an unversioned archive of a repository revision
1390 create an unversioned archive of a repository revision
1330 </td></tr>
1391 </td></tr>
1331 <tr><td>
1392 <tr><td>
1332 <a href="/help/backout">
1393 <a href="/help/backout">
1333 backout
1394 backout
1334 </a>
1395 </a>
1335 </td><td>
1396 </td><td>
1336 reverse effect of earlier changeset
1397 reverse effect of earlier changeset
1337 </td></tr>
1398 </td></tr>
1338 <tr><td>
1399 <tr><td>
1339 <a href="/help/bisect">
1400 <a href="/help/bisect">
1340 bisect
1401 bisect
1341 </a>
1402 </a>
1342 </td><td>
1403 </td><td>
1343 subdivision search of changesets
1404 subdivision search of changesets
1344 </td></tr>
1405 </td></tr>
1345 <tr><td>
1406 <tr><td>
1346 <a href="/help/bookmarks">
1407 <a href="/help/bookmarks">
1347 bookmarks
1408 bookmarks
1348 </a>
1409 </a>
1349 </td><td>
1410 </td><td>
1350 track a line of development with movable markers
1411 track a line of development with movable markers
1351 </td></tr>
1412 </td></tr>
1352 <tr><td>
1413 <tr><td>
1353 <a href="/help/branch">
1414 <a href="/help/branch">
1354 branch
1415 branch
1355 </a>
1416 </a>
1356 </td><td>
1417 </td><td>
1357 set or show the current branch name
1418 set or show the current branch name
1358 </td></tr>
1419 </td></tr>
1359 <tr><td>
1420 <tr><td>
1360 <a href="/help/branches">
1421 <a href="/help/branches">
1361 branches
1422 branches
1362 </a>
1423 </a>
1363 </td><td>
1424 </td><td>
1364 list repository named branches
1425 list repository named branches
1365 </td></tr>
1426 </td></tr>
1366 <tr><td>
1427 <tr><td>
1367 <a href="/help/bundle">
1428 <a href="/help/bundle">
1368 bundle
1429 bundle
1369 </a>
1430 </a>
1370 </td><td>
1431 </td><td>
1371 create a changegroup file
1432 create a changegroup file
1372 </td></tr>
1433 </td></tr>
1373 <tr><td>
1434 <tr><td>
1374 <a href="/help/cat">
1435 <a href="/help/cat">
1375 cat
1436 cat
1376 </a>
1437 </a>
1377 </td><td>
1438 </td><td>
1378 output the current or given revision of files
1439 output the current or given revision of files
1379 </td></tr>
1440 </td></tr>
1380 <tr><td>
1441 <tr><td>
1381 <a href="/help/config">
1442 <a href="/help/config">
1382 config
1443 config
1383 </a>
1444 </a>
1384 </td><td>
1445 </td><td>
1385 show combined config settings from all hgrc files
1446 show combined config settings from all hgrc files
1386 </td></tr>
1447 </td></tr>
1387 <tr><td>
1448 <tr><td>
1388 <a href="/help/copy">
1449 <a href="/help/copy">
1389 copy
1450 copy
1390 </a>
1451 </a>
1391 </td><td>
1452 </td><td>
1392 mark files as copied for the next commit
1453 mark files as copied for the next commit
1393 </td></tr>
1454 </td></tr>
1394 <tr><td>
1455 <tr><td>
1395 <a href="/help/graft">
1456 <a href="/help/graft">
1396 graft
1457 graft
1397 </a>
1458 </a>
1398 </td><td>
1459 </td><td>
1399 copy changes from other branches onto the current branch
1460 copy changes from other branches onto the current branch
1400 </td></tr>
1461 </td></tr>
1401 <tr><td>
1462 <tr><td>
1402 <a href="/help/grep">
1463 <a href="/help/grep">
1403 grep
1464 grep
1404 </a>
1465 </a>
1405 </td><td>
1466 </td><td>
1406 search for a pattern in specified files and revisions
1467 search for a pattern in specified files and revisions
1407 </td></tr>
1468 </td></tr>
1408 <tr><td>
1469 <tr><td>
1409 <a href="/help/heads">
1470 <a href="/help/heads">
1410 heads
1471 heads
1411 </a>
1472 </a>
1412 </td><td>
1473 </td><td>
1413 show branch heads
1474 show branch heads
1414 </td></tr>
1475 </td></tr>
1415 <tr><td>
1476 <tr><td>
1416 <a href="/help/help">
1477 <a href="/help/help">
1417 help
1478 help
1418 </a>
1479 </a>
1419 </td><td>
1480 </td><td>
1420 show help for a given topic or a help overview
1481 show help for a given topic or a help overview
1421 </td></tr>
1482 </td></tr>
1422 <tr><td>
1483 <tr><td>
1423 <a href="/help/identify">
1484 <a href="/help/identify">
1424 identify
1485 identify
1425 </a>
1486 </a>
1426 </td><td>
1487 </td><td>
1427 identify the working copy or specified revision
1488 identify the working copy or specified revision
1428 </td></tr>
1489 </td></tr>
1429 <tr><td>
1490 <tr><td>
1430 <a href="/help/import">
1491 <a href="/help/import">
1431 import
1492 import
1432 </a>
1493 </a>
1433 </td><td>
1494 </td><td>
1434 import an ordered set of patches
1495 import an ordered set of patches
1435 </td></tr>
1496 </td></tr>
1436 <tr><td>
1497 <tr><td>
1437 <a href="/help/incoming">
1498 <a href="/help/incoming">
1438 incoming
1499 incoming
1439 </a>
1500 </a>
1440 </td><td>
1501 </td><td>
1441 show new changesets found in source
1502 show new changesets found in source
1442 </td></tr>
1503 </td></tr>
1443 <tr><td>
1504 <tr><td>
1444 <a href="/help/locate">
1505 <a href="/help/locate">
1445 locate
1506 locate
1446 </a>
1507 </a>
1447 </td><td>
1508 </td><td>
1448 locate files matching specific patterns
1509 locate files matching specific patterns
1449 </td></tr>
1510 </td></tr>
1450 <tr><td>
1511 <tr><td>
1451 <a href="/help/manifest">
1512 <a href="/help/manifest">
1452 manifest
1513 manifest
1453 </a>
1514 </a>
1454 </td><td>
1515 </td><td>
1455 output the current or given revision of the project manifest
1516 output the current or given revision of the project manifest
1456 </td></tr>
1517 </td></tr>
1457 <tr><td>
1518 <tr><td>
1458 <a href="/help/nohelp">
1519 <a href="/help/nohelp">
1459 nohelp
1520 nohelp
1460 </a>
1521 </a>
1461 </td><td>
1522 </td><td>
1462 (no help text available)
1523 (no help text available)
1463 </td></tr>
1524 </td></tr>
1464 <tr><td>
1525 <tr><td>
1465 <a href="/help/outgoing">
1526 <a href="/help/outgoing">
1466 outgoing
1527 outgoing
1467 </a>
1528 </a>
1468 </td><td>
1529 </td><td>
1469 show changesets not found in the destination
1530 show changesets not found in the destination
1470 </td></tr>
1531 </td></tr>
1471 <tr><td>
1532 <tr><td>
1472 <a href="/help/parents">
1533 <a href="/help/parents">
1473 parents
1534 parents
1474 </a>
1535 </a>
1475 </td><td>
1536 </td><td>
1476 show the parents of the working directory or revision
1537 show the parents of the working directory or revision
1477 </td></tr>
1538 </td></tr>
1478 <tr><td>
1539 <tr><td>
1479 <a href="/help/paths">
1540 <a href="/help/paths">
1480 paths
1541 paths
1481 </a>
1542 </a>
1482 </td><td>
1543 </td><td>
1483 show aliases for remote repositories
1544 show aliases for remote repositories
1484 </td></tr>
1545 </td></tr>
1485 <tr><td>
1546 <tr><td>
1486 <a href="/help/phase">
1547 <a href="/help/phase">
1487 phase
1548 phase
1488 </a>
1549 </a>
1489 </td><td>
1550 </td><td>
1490 set or show the current phase name
1551 set or show the current phase name
1491 </td></tr>
1552 </td></tr>
1492 <tr><td>
1553 <tr><td>
1493 <a href="/help/recover">
1554 <a href="/help/recover">
1494 recover
1555 recover
1495 </a>
1556 </a>
1496 </td><td>
1557 </td><td>
1497 roll back an interrupted transaction
1558 roll back an interrupted transaction
1498 </td></tr>
1559 </td></tr>
1499 <tr><td>
1560 <tr><td>
1500 <a href="/help/rename">
1561 <a href="/help/rename">
1501 rename
1562 rename
1502 </a>
1563 </a>
1503 </td><td>
1564 </td><td>
1504 rename files; equivalent of copy + remove
1565 rename files; equivalent of copy + remove
1505 </td></tr>
1566 </td></tr>
1506 <tr><td>
1567 <tr><td>
1507 <a href="/help/resolve">
1568 <a href="/help/resolve">
1508 resolve
1569 resolve
1509 </a>
1570 </a>
1510 </td><td>
1571 </td><td>
1511 redo merges or set/view the merge status of files
1572 redo merges or set/view the merge status of files
1512 </td></tr>
1573 </td></tr>
1513 <tr><td>
1574 <tr><td>
1514 <a href="/help/revert">
1575 <a href="/help/revert">
1515 revert
1576 revert
1516 </a>
1577 </a>
1517 </td><td>
1578 </td><td>
1518 restore files to their checkout state
1579 restore files to their checkout state
1519 </td></tr>
1580 </td></tr>
1520 <tr><td>
1581 <tr><td>
1521 <a href="/help/root">
1582 <a href="/help/root">
1522 root
1583 root
1523 </a>
1584 </a>
1524 </td><td>
1585 </td><td>
1525 print the root (top) of the current working directory
1586 print the root (top) of the current working directory
1526 </td></tr>
1587 </td></tr>
1527 <tr><td>
1588 <tr><td>
1528 <a href="/help/tag">
1589 <a href="/help/tag">
1529 tag
1590 tag
1530 </a>
1591 </a>
1531 </td><td>
1592 </td><td>
1532 add one or more tags for the current or given revision
1593 add one or more tags for the current or given revision
1533 </td></tr>
1594 </td></tr>
1534 <tr><td>
1595 <tr><td>
1535 <a href="/help/tags">
1596 <a href="/help/tags">
1536 tags
1597 tags
1537 </a>
1598 </a>
1538 </td><td>
1599 </td><td>
1539 list repository tags
1600 list repository tags
1540 </td></tr>
1601 </td></tr>
1541 <tr><td>
1602 <tr><td>
1542 <a href="/help/unbundle">
1603 <a href="/help/unbundle">
1543 unbundle
1604 unbundle
1544 </a>
1605 </a>
1545 </td><td>
1606 </td><td>
1546 apply one or more changegroup files
1607 apply one or more changegroup files
1547 </td></tr>
1608 </td></tr>
1548 <tr><td>
1609 <tr><td>
1549 <a href="/help/verify">
1610 <a href="/help/verify">
1550 verify
1611 verify
1551 </a>
1612 </a>
1552 </td><td>
1613 </td><td>
1553 verify the integrity of the repository
1614 verify the integrity of the repository
1554 </td></tr>
1615 </td></tr>
1555 <tr><td>
1616 <tr><td>
1556 <a href="/help/version">
1617 <a href="/help/version">
1557 version
1618 version
1558 </a>
1619 </a>
1559 </td><td>
1620 </td><td>
1560 output version and copyright information
1621 output version and copyright information
1561 </td></tr>
1622 </td></tr>
1562 </table>
1623 </table>
1563 </div>
1624 </div>
1564 </div>
1625 </div>
1565
1626
1566 <script type="text/javascript">process_dates()</script>
1627 <script type="text/javascript">process_dates()</script>
1567
1628
1568
1629
1569 </body>
1630 </body>
1570 </html>
1631 </html>
1571
1632
1572
1633
1573 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1634 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1574 200 Script output follows
1635 200 Script output follows
1575
1636
1576 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1637 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1577 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1638 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1578 <head>
1639 <head>
1579 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1640 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1580 <meta name="robots" content="index, nofollow" />
1641 <meta name="robots" content="index, nofollow" />
1581 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1642 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1582 <script type="text/javascript" src="/static/mercurial.js"></script>
1643 <script type="text/javascript" src="/static/mercurial.js"></script>
1583
1644
1584 <title>Help: add</title>
1645 <title>Help: add</title>
1585 </head>
1646 </head>
1586 <body>
1647 <body>
1587
1648
1588 <div class="container">
1649 <div class="container">
1589 <div class="menu">
1650 <div class="menu">
1590 <div class="logo">
1651 <div class="logo">
1591 <a href="http://mercurial.selenic.com/">
1652 <a href="http://mercurial.selenic.com/">
1592 <img src="/static/hglogo.png" alt="mercurial" /></a>
1653 <img src="/static/hglogo.png" alt="mercurial" /></a>
1593 </div>
1654 </div>
1594 <ul>
1655 <ul>
1595 <li><a href="/shortlog">log</a></li>
1656 <li><a href="/shortlog">log</a></li>
1596 <li><a href="/graph">graph</a></li>
1657 <li><a href="/graph">graph</a></li>
1597 <li><a href="/tags">tags</a></li>
1658 <li><a href="/tags">tags</a></li>
1598 <li><a href="/bookmarks">bookmarks</a></li>
1659 <li><a href="/bookmarks">bookmarks</a></li>
1599 <li><a href="/branches">branches</a></li>
1660 <li><a href="/branches">branches</a></li>
1600 </ul>
1661 </ul>
1601 <ul>
1662 <ul>
1602 <li class="active"><a href="/help">help</a></li>
1663 <li class="active"><a href="/help">help</a></li>
1603 </ul>
1664 </ul>
1604 </div>
1665 </div>
1605
1666
1606 <div class="main">
1667 <div class="main">
1607 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1668 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1608 <h3>Help: add</h3>
1669 <h3>Help: add</h3>
1609
1670
1610 <form class="search" action="/log">
1671 <form class="search" action="/log">
1611
1672
1612 <p><input name="rev" id="search1" type="text" size="30" /></p>
1673 <p><input name="rev" id="search1" type="text" size="30" /></p>
1613 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1674 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1614 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1675 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1615 </form>
1676 </form>
1616 <div id="doc">
1677 <div id="doc">
1617 <p>
1678 <p>
1618 hg add [OPTION]... [FILE]...
1679 hg add [OPTION]... [FILE]...
1619 </p>
1680 </p>
1620 <p>
1681 <p>
1621 add the specified files on the next commit
1682 add the specified files on the next commit
1622 </p>
1683 </p>
1623 <p>
1684 <p>
1624 Schedule files to be version controlled and added to the
1685 Schedule files to be version controlled and added to the
1625 repository.
1686 repository.
1626 </p>
1687 </p>
1627 <p>
1688 <p>
1628 The files will be added to the repository at the next commit. To
1689 The files will be added to the repository at the next commit. To
1629 undo an add before that, see &quot;hg forget&quot;.
1690 undo an add before that, see &quot;hg forget&quot;.
1630 </p>
1691 </p>
1631 <p>
1692 <p>
1632 If no names are given, add all files to the repository.
1693 If no names are given, add all files to the repository.
1633 </p>
1694 </p>
1634 <p>
1695 <p>
1635 An example showing how new (unknown) files are added
1696 An example showing how new (unknown) files are added
1636 automatically by &quot;hg add&quot;:
1697 automatically by &quot;hg add&quot;:
1637 </p>
1698 </p>
1638 <pre>
1699 <pre>
1639 \$ ls (re)
1700 \$ ls (re)
1640 foo.c
1701 foo.c
1641 \$ hg status (re)
1702 \$ hg status (re)
1642 ? foo.c
1703 ? foo.c
1643 \$ hg add (re)
1704 \$ hg add (re)
1644 adding foo.c
1705 adding foo.c
1645 \$ hg status (re)
1706 \$ hg status (re)
1646 A foo.c
1707 A foo.c
1647 </pre>
1708 </pre>
1648 <p>
1709 <p>
1649 Returns 0 if all files are successfully added.
1710 Returns 0 if all files are successfully added.
1650 </p>
1711 </p>
1651 <p>
1712 <p>
1652 options:
1713 options:
1653 </p>
1714 </p>
1654 <table>
1715 <table>
1655 <tr><td>-I</td>
1716 <tr><td>-I</td>
1656 <td>--include PATTERN [+]</td>
1717 <td>--include PATTERN [+]</td>
1657 <td>include names matching the given patterns</td></tr>
1718 <td>include names matching the given patterns</td></tr>
1658 <tr><td>-X</td>
1719 <tr><td>-X</td>
1659 <td>--exclude PATTERN [+]</td>
1720 <td>--exclude PATTERN [+]</td>
1660 <td>exclude names matching the given patterns</td></tr>
1721 <td>exclude names matching the given patterns</td></tr>
1661 <tr><td>-S</td>
1722 <tr><td>-S</td>
1662 <td>--subrepos</td>
1723 <td>--subrepos</td>
1663 <td>recurse into subrepositories</td></tr>
1724 <td>recurse into subrepositories</td></tr>
1664 <tr><td>-n</td>
1725 <tr><td>-n</td>
1665 <td>--dry-run</td>
1726 <td>--dry-run</td>
1666 <td>do not perform actions, just print output</td></tr>
1727 <td>do not perform actions, just print output</td></tr>
1667 </table>
1728 </table>
1668 <p>
1729 <p>
1669 [+] marked option can be specified multiple times
1730 [+] marked option can be specified multiple times
1670 </p>
1731 </p>
1671 <p>
1732 <p>
1672 global options:
1733 global options:
1673 </p>
1734 </p>
1674 <table>
1735 <table>
1675 <tr><td>-R</td>
1736 <tr><td>-R</td>
1676 <td>--repository REPO</td>
1737 <td>--repository REPO</td>
1677 <td>repository root directory or name of overlay bundle file</td></tr>
1738 <td>repository root directory or name of overlay bundle file</td></tr>
1678 <tr><td></td>
1739 <tr><td></td>
1679 <td>--cwd DIR</td>
1740 <td>--cwd DIR</td>
1680 <td>change working directory</td></tr>
1741 <td>change working directory</td></tr>
1681 <tr><td>-y</td>
1742 <tr><td>-y</td>
1682 <td>--noninteractive</td>
1743 <td>--noninteractive</td>
1683 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1744 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1684 <tr><td>-q</td>
1745 <tr><td>-q</td>
1685 <td>--quiet</td>
1746 <td>--quiet</td>
1686 <td>suppress output</td></tr>
1747 <td>suppress output</td></tr>
1687 <tr><td>-v</td>
1748 <tr><td>-v</td>
1688 <td>--verbose</td>
1749 <td>--verbose</td>
1689 <td>enable additional output</td></tr>
1750 <td>enable additional output</td></tr>
1690 <tr><td></td>
1751 <tr><td></td>
1691 <td>--config CONFIG [+]</td>
1752 <td>--config CONFIG [+]</td>
1692 <td>set/override config option (use 'section.name=value')</td></tr>
1753 <td>set/override config option (use 'section.name=value')</td></tr>
1693 <tr><td></td>
1754 <tr><td></td>
1694 <td>--debug</td>
1755 <td>--debug</td>
1695 <td>enable debugging output</td></tr>
1756 <td>enable debugging output</td></tr>
1696 <tr><td></td>
1757 <tr><td></td>
1697 <td>--debugger</td>
1758 <td>--debugger</td>
1698 <td>start debugger</td></tr>
1759 <td>start debugger</td></tr>
1699 <tr><td></td>
1760 <tr><td></td>
1700 <td>--encoding ENCODE</td>
1761 <td>--encoding ENCODE</td>
1701 <td>set the charset encoding (default: ascii)</td></tr>
1762 <td>set the charset encoding (default: ascii)</td></tr>
1702 <tr><td></td>
1763 <tr><td></td>
1703 <td>--encodingmode MODE</td>
1764 <td>--encodingmode MODE</td>
1704 <td>set the charset encoding mode (default: strict)</td></tr>
1765 <td>set the charset encoding mode (default: strict)</td></tr>
1705 <tr><td></td>
1766 <tr><td></td>
1706 <td>--traceback</td>
1767 <td>--traceback</td>
1707 <td>always print a traceback on exception</td></tr>
1768 <td>always print a traceback on exception</td></tr>
1708 <tr><td></td>
1769 <tr><td></td>
1709 <td>--time</td>
1770 <td>--time</td>
1710 <td>time how long the command takes</td></tr>
1771 <td>time how long the command takes</td></tr>
1711 <tr><td></td>
1772 <tr><td></td>
1712 <td>--profile</td>
1773 <td>--profile</td>
1713 <td>print command execution profile</td></tr>
1774 <td>print command execution profile</td></tr>
1714 <tr><td></td>
1775 <tr><td></td>
1715 <td>--version</td>
1776 <td>--version</td>
1716 <td>output version information and exit</td></tr>
1777 <td>output version information and exit</td></tr>
1717 <tr><td>-h</td>
1778 <tr><td>-h</td>
1718 <td>--help</td>
1779 <td>--help</td>
1719 <td>display help and exit</td></tr>
1780 <td>display help and exit</td></tr>
1720 <tr><td></td>
1781 <tr><td></td>
1721 <td>--hidden</td>
1782 <td>--hidden</td>
1722 <td>consider hidden changesets</td></tr>
1783 <td>consider hidden changesets</td></tr>
1723 </table>
1784 </table>
1724 <p>
1785 <p>
1725 [+] marked option can be specified multiple times
1786 [+] marked option can be specified multiple times
1726 </p>
1787 </p>
1727
1788
1728 </div>
1789 </div>
1729 </div>
1790 </div>
1730 </div>
1791 </div>
1731
1792
1732 <script type="text/javascript">process_dates()</script>
1793 <script type="text/javascript">process_dates()</script>
1733
1794
1734
1795
1735 </body>
1796 </body>
1736 </html>
1797 </html>
1737
1798
1738
1799
1739 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1800 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1740 200 Script output follows
1801 200 Script output follows
1741
1802
1742 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1803 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1743 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1804 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1744 <head>
1805 <head>
1745 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1806 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1746 <meta name="robots" content="index, nofollow" />
1807 <meta name="robots" content="index, nofollow" />
1747 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1808 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1748 <script type="text/javascript" src="/static/mercurial.js"></script>
1809 <script type="text/javascript" src="/static/mercurial.js"></script>
1749
1810
1750 <title>Help: remove</title>
1811 <title>Help: remove</title>
1751 </head>
1812 </head>
1752 <body>
1813 <body>
1753
1814
1754 <div class="container">
1815 <div class="container">
1755 <div class="menu">
1816 <div class="menu">
1756 <div class="logo">
1817 <div class="logo">
1757 <a href="http://mercurial.selenic.com/">
1818 <a href="http://mercurial.selenic.com/">
1758 <img src="/static/hglogo.png" alt="mercurial" /></a>
1819 <img src="/static/hglogo.png" alt="mercurial" /></a>
1759 </div>
1820 </div>
1760 <ul>
1821 <ul>
1761 <li><a href="/shortlog">log</a></li>
1822 <li><a href="/shortlog">log</a></li>
1762 <li><a href="/graph">graph</a></li>
1823 <li><a href="/graph">graph</a></li>
1763 <li><a href="/tags">tags</a></li>
1824 <li><a href="/tags">tags</a></li>
1764 <li><a href="/bookmarks">bookmarks</a></li>
1825 <li><a href="/bookmarks">bookmarks</a></li>
1765 <li><a href="/branches">branches</a></li>
1826 <li><a href="/branches">branches</a></li>
1766 </ul>
1827 </ul>
1767 <ul>
1828 <ul>
1768 <li class="active"><a href="/help">help</a></li>
1829 <li class="active"><a href="/help">help</a></li>
1769 </ul>
1830 </ul>
1770 </div>
1831 </div>
1771
1832
1772 <div class="main">
1833 <div class="main">
1773 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1834 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1774 <h3>Help: remove</h3>
1835 <h3>Help: remove</h3>
1775
1836
1776 <form class="search" action="/log">
1837 <form class="search" action="/log">
1777
1838
1778 <p><input name="rev" id="search1" type="text" size="30" /></p>
1839 <p><input name="rev" id="search1" type="text" size="30" /></p>
1779 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1840 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1780 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1841 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1781 </form>
1842 </form>
1782 <div id="doc">
1843 <div id="doc">
1783 <p>
1844 <p>
1784 hg remove [OPTION]... FILE...
1845 hg remove [OPTION]... FILE...
1785 </p>
1846 </p>
1786 <p>
1847 <p>
1787 aliases: rm
1848 aliases: rm
1788 </p>
1849 </p>
1789 <p>
1850 <p>
1790 remove the specified files on the next commit
1851 remove the specified files on the next commit
1791 </p>
1852 </p>
1792 <p>
1853 <p>
1793 Schedule the indicated files for removal from the current branch.
1854 Schedule the indicated files for removal from the current branch.
1794 </p>
1855 </p>
1795 <p>
1856 <p>
1796 This command schedules the files to be removed at the next commit.
1857 This command schedules the files to be removed at the next commit.
1797 To undo a remove before that, see &quot;hg revert&quot;. To undo added
1858 To undo a remove before that, see &quot;hg revert&quot;. To undo added
1798 files, see &quot;hg forget&quot;.
1859 files, see &quot;hg forget&quot;.
1799 </p>
1860 </p>
1800 <p>
1861 <p>
1801 -A/--after can be used to remove only files that have already
1862 -A/--after can be used to remove only files that have already
1802 been deleted, -f/--force can be used to force deletion, and -Af
1863 been deleted, -f/--force can be used to force deletion, and -Af
1803 can be used to remove files from the next revision without
1864 can be used to remove files from the next revision without
1804 deleting them from the working directory.
1865 deleting them from the working directory.
1805 </p>
1866 </p>
1806 <p>
1867 <p>
1807 The following table details the behavior of remove for different
1868 The following table details the behavior of remove for different
1808 file states (columns) and option combinations (rows). The file
1869 file states (columns) and option combinations (rows). The file
1809 states are Added [A], Clean [C], Modified [M] and Missing [!]
1870 states are Added [A], Clean [C], Modified [M] and Missing [!]
1810 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
1871 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
1811 (from branch) and Delete (from disk):
1872 (from branch) and Delete (from disk):
1812 </p>
1873 </p>
1813 <table>
1874 <table>
1814 <tr><td>opt/state</td>
1875 <tr><td>opt/state</td>
1815 <td>A</td>
1876 <td>A</td>
1816 <td>C</td>
1877 <td>C</td>
1817 <td>M</td>
1878 <td>M</td>
1818 <td>!</td></tr>
1879 <td>!</td></tr>
1819 <tr><td>none</td>
1880 <tr><td>none</td>
1820 <td>W</td>
1881 <td>W</td>
1821 <td>RD</td>
1882 <td>RD</td>
1822 <td>W</td>
1883 <td>W</td>
1823 <td>R</td></tr>
1884 <td>R</td></tr>
1824 <tr><td>-f</td>
1885 <tr><td>-f</td>
1825 <td>R</td>
1886 <td>R</td>
1826 <td>RD</td>
1887 <td>RD</td>
1827 <td>RD</td>
1888 <td>RD</td>
1828 <td>R</td></tr>
1889 <td>R</td></tr>
1829 <tr><td>-A</td>
1890 <tr><td>-A</td>
1830 <td>W</td>
1891 <td>W</td>
1831 <td>W</td>
1892 <td>W</td>
1832 <td>W</td>
1893 <td>W</td>
1833 <td>R</td></tr>
1894 <td>R</td></tr>
1834 <tr><td>-Af</td>
1895 <tr><td>-Af</td>
1835 <td>R</td>
1896 <td>R</td>
1836 <td>R</td>
1897 <td>R</td>
1837 <td>R</td>
1898 <td>R</td>
1838 <td>R</td></tr>
1899 <td>R</td></tr>
1839 </table>
1900 </table>
1840 <p>
1901 <p>
1841 Note that remove never deletes files in Added [A] state from the
1902 Note that remove never deletes files in Added [A] state from the
1842 working directory, not even if option --force is specified.
1903 working directory, not even if option --force is specified.
1843 </p>
1904 </p>
1844 <p>
1905 <p>
1845 Returns 0 on success, 1 if any warnings encountered.
1906 Returns 0 on success, 1 if any warnings encountered.
1846 </p>
1907 </p>
1847 <p>
1908 <p>
1848 options:
1909 options:
1849 </p>
1910 </p>
1850 <table>
1911 <table>
1851 <tr><td>-A</td>
1912 <tr><td>-A</td>
1852 <td>--after</td>
1913 <td>--after</td>
1853 <td>record delete for missing files</td></tr>
1914 <td>record delete for missing files</td></tr>
1854 <tr><td>-f</td>
1915 <tr><td>-f</td>
1855 <td>--force</td>
1916 <td>--force</td>
1856 <td>remove (and delete) file even if added or modified</td></tr>
1917 <td>remove (and delete) file even if added or modified</td></tr>
1857 <tr><td>-I</td>
1918 <tr><td>-I</td>
1858 <td>--include PATTERN [+]</td>
1919 <td>--include PATTERN [+]</td>
1859 <td>include names matching the given patterns</td></tr>
1920 <td>include names matching the given patterns</td></tr>
1860 <tr><td>-X</td>
1921 <tr><td>-X</td>
1861 <td>--exclude PATTERN [+]</td>
1922 <td>--exclude PATTERN [+]</td>
1862 <td>exclude names matching the given patterns</td></tr>
1923 <td>exclude names matching the given patterns</td></tr>
1863 </table>
1924 </table>
1864 <p>
1925 <p>
1865 [+] marked option can be specified multiple times
1926 [+] marked option can be specified multiple times
1866 </p>
1927 </p>
1867 <p>
1928 <p>
1868 global options:
1929 global options:
1869 </p>
1930 </p>
1870 <table>
1931 <table>
1871 <tr><td>-R</td>
1932 <tr><td>-R</td>
1872 <td>--repository REPO</td>
1933 <td>--repository REPO</td>
1873 <td>repository root directory or name of overlay bundle file</td></tr>
1934 <td>repository root directory or name of overlay bundle file</td></tr>
1874 <tr><td></td>
1935 <tr><td></td>
1875 <td>--cwd DIR</td>
1936 <td>--cwd DIR</td>
1876 <td>change working directory</td></tr>
1937 <td>change working directory</td></tr>
1877 <tr><td>-y</td>
1938 <tr><td>-y</td>
1878 <td>--noninteractive</td>
1939 <td>--noninteractive</td>
1879 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1940 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1880 <tr><td>-q</td>
1941 <tr><td>-q</td>
1881 <td>--quiet</td>
1942 <td>--quiet</td>
1882 <td>suppress output</td></tr>
1943 <td>suppress output</td></tr>
1883 <tr><td>-v</td>
1944 <tr><td>-v</td>
1884 <td>--verbose</td>
1945 <td>--verbose</td>
1885 <td>enable additional output</td></tr>
1946 <td>enable additional output</td></tr>
1886 <tr><td></td>
1947 <tr><td></td>
1887 <td>--config CONFIG [+]</td>
1948 <td>--config CONFIG [+]</td>
1888 <td>set/override config option (use 'section.name=value')</td></tr>
1949 <td>set/override config option (use 'section.name=value')</td></tr>
1889 <tr><td></td>
1950 <tr><td></td>
1890 <td>--debug</td>
1951 <td>--debug</td>
1891 <td>enable debugging output</td></tr>
1952 <td>enable debugging output</td></tr>
1892 <tr><td></td>
1953 <tr><td></td>
1893 <td>--debugger</td>
1954 <td>--debugger</td>
1894 <td>start debugger</td></tr>
1955 <td>start debugger</td></tr>
1895 <tr><td></td>
1956 <tr><td></td>
1896 <td>--encoding ENCODE</td>
1957 <td>--encoding ENCODE</td>
1897 <td>set the charset encoding (default: ascii)</td></tr>
1958 <td>set the charset encoding (default: ascii)</td></tr>
1898 <tr><td></td>
1959 <tr><td></td>
1899 <td>--encodingmode MODE</td>
1960 <td>--encodingmode MODE</td>
1900 <td>set the charset encoding mode (default: strict)</td></tr>
1961 <td>set the charset encoding mode (default: strict)</td></tr>
1901 <tr><td></td>
1962 <tr><td></td>
1902 <td>--traceback</td>
1963 <td>--traceback</td>
1903 <td>always print a traceback on exception</td></tr>
1964 <td>always print a traceback on exception</td></tr>
1904 <tr><td></td>
1965 <tr><td></td>
1905 <td>--time</td>
1966 <td>--time</td>
1906 <td>time how long the command takes</td></tr>
1967 <td>time how long the command takes</td></tr>
1907 <tr><td></td>
1968 <tr><td></td>
1908 <td>--profile</td>
1969 <td>--profile</td>
1909 <td>print command execution profile</td></tr>
1970 <td>print command execution profile</td></tr>
1910 <tr><td></td>
1971 <tr><td></td>
1911 <td>--version</td>
1972 <td>--version</td>
1912 <td>output version information and exit</td></tr>
1973 <td>output version information and exit</td></tr>
1913 <tr><td>-h</td>
1974 <tr><td>-h</td>
1914 <td>--help</td>
1975 <td>--help</td>
1915 <td>display help and exit</td></tr>
1976 <td>display help and exit</td></tr>
1916 <tr><td></td>
1977 <tr><td></td>
1917 <td>--hidden</td>
1978 <td>--hidden</td>
1918 <td>consider hidden changesets</td></tr>
1979 <td>consider hidden changesets</td></tr>
1919 </table>
1980 </table>
1920 <p>
1981 <p>
1921 [+] marked option can be specified multiple times
1982 [+] marked option can be specified multiple times
1922 </p>
1983 </p>
1923
1984
1924 </div>
1985 </div>
1925 </div>
1986 </div>
1926 </div>
1987 </div>
1927
1988
1928 <script type="text/javascript">process_dates()</script>
1989 <script type="text/javascript">process_dates()</script>
1929
1990
1930
1991
1931 </body>
1992 </body>
1932 </html>
1993 </html>
1933
1994
1934
1995
1935 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
1996 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
1936 200 Script output follows
1997 200 Script output follows
1937
1998
1938 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1999 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1939 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2000 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1940 <head>
2001 <head>
1941 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2002 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1942 <meta name="robots" content="index, nofollow" />
2003 <meta name="robots" content="index, nofollow" />
1943 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2004 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1944 <script type="text/javascript" src="/static/mercurial.js"></script>
2005 <script type="text/javascript" src="/static/mercurial.js"></script>
1945
2006
1946 <title>Help: revisions</title>
2007 <title>Help: revisions</title>
1947 </head>
2008 </head>
1948 <body>
2009 <body>
1949
2010
1950 <div class="container">
2011 <div class="container">
1951 <div class="menu">
2012 <div class="menu">
1952 <div class="logo">
2013 <div class="logo">
1953 <a href="http://mercurial.selenic.com/">
2014 <a href="http://mercurial.selenic.com/">
1954 <img src="/static/hglogo.png" alt="mercurial" /></a>
2015 <img src="/static/hglogo.png" alt="mercurial" /></a>
1955 </div>
2016 </div>
1956 <ul>
2017 <ul>
1957 <li><a href="/shortlog">log</a></li>
2018 <li><a href="/shortlog">log</a></li>
1958 <li><a href="/graph">graph</a></li>
2019 <li><a href="/graph">graph</a></li>
1959 <li><a href="/tags">tags</a></li>
2020 <li><a href="/tags">tags</a></li>
1960 <li><a href="/bookmarks">bookmarks</a></li>
2021 <li><a href="/bookmarks">bookmarks</a></li>
1961 <li><a href="/branches">branches</a></li>
2022 <li><a href="/branches">branches</a></li>
1962 </ul>
2023 </ul>
1963 <ul>
2024 <ul>
1964 <li class="active"><a href="/help">help</a></li>
2025 <li class="active"><a href="/help">help</a></li>
1965 </ul>
2026 </ul>
1966 </div>
2027 </div>
1967
2028
1968 <div class="main">
2029 <div class="main">
1969 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2030 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1970 <h3>Help: revisions</h3>
2031 <h3>Help: revisions</h3>
1971
2032
1972 <form class="search" action="/log">
2033 <form class="search" action="/log">
1973
2034
1974 <p><input name="rev" id="search1" type="text" size="30" /></p>
2035 <p><input name="rev" id="search1" type="text" size="30" /></p>
1975 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2036 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1976 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2037 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1977 </form>
2038 </form>
1978 <div id="doc">
2039 <div id="doc">
1979 <h1>Specifying Single Revisions</h1>
2040 <h1>Specifying Single Revisions</h1>
1980 <p>
2041 <p>
1981 Mercurial supports several ways to specify individual revisions.
2042 Mercurial supports several ways to specify individual revisions.
1982 </p>
2043 </p>
1983 <p>
2044 <p>
1984 A plain integer is treated as a revision number. Negative integers are
2045 A plain integer is treated as a revision number. Negative integers are
1985 treated as sequential offsets from the tip, with -1 denoting the tip,
2046 treated as sequential offsets from the tip, with -1 denoting the tip,
1986 -2 denoting the revision prior to the tip, and so forth.
2047 -2 denoting the revision prior to the tip, and so forth.
1987 </p>
2048 </p>
1988 <p>
2049 <p>
1989 A 40-digit hexadecimal string is treated as a unique revision
2050 A 40-digit hexadecimal string is treated as a unique revision
1990 identifier.
2051 identifier.
1991 </p>
2052 </p>
1992 <p>
2053 <p>
1993 A hexadecimal string less than 40 characters long is treated as a
2054 A hexadecimal string less than 40 characters long is treated as a
1994 unique revision identifier and is referred to as a short-form
2055 unique revision identifier and is referred to as a short-form
1995 identifier. A short-form identifier is only valid if it is the prefix
2056 identifier. A short-form identifier is only valid if it is the prefix
1996 of exactly one full-length identifier.
2057 of exactly one full-length identifier.
1997 </p>
2058 </p>
1998 <p>
2059 <p>
1999 Any other string is treated as a bookmark, tag, or branch name. A
2060 Any other string is treated as a bookmark, tag, or branch name. A
2000 bookmark is a movable pointer to a revision. A tag is a permanent name
2061 bookmark is a movable pointer to a revision. A tag is a permanent name
2001 associated with a revision. A branch name denotes the tipmost open branch head
2062 associated with a revision. A branch name denotes the tipmost open branch head
2002 of that branch - or if they are all closed, the tipmost closed head of the
2063 of that branch - or if they are all closed, the tipmost closed head of the
2003 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2064 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2004 </p>
2065 </p>
2005 <p>
2066 <p>
2006 The reserved name &quot;tip&quot; always identifies the most recent revision.
2067 The reserved name &quot;tip&quot; always identifies the most recent revision.
2007 </p>
2068 </p>
2008 <p>
2069 <p>
2009 The reserved name &quot;null&quot; indicates the null revision. This is the
2070 The reserved name &quot;null&quot; indicates the null revision. This is the
2010 revision of an empty repository, and the parent of revision 0.
2071 revision of an empty repository, and the parent of revision 0.
2011 </p>
2072 </p>
2012 <p>
2073 <p>
2013 The reserved name &quot;.&quot; indicates the working directory parent. If no
2074 The reserved name &quot;.&quot; indicates the working directory parent. If no
2014 working directory is checked out, it is equivalent to null. If an
2075 working directory is checked out, it is equivalent to null. If an
2015 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2076 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2016 parent.
2077 parent.
2017 </p>
2078 </p>
2018
2079
2019 </div>
2080 </div>
2020 </div>
2081 </div>
2021 </div>
2082 </div>
2022
2083
2023 <script type="text/javascript">process_dates()</script>
2084 <script type="text/javascript">process_dates()</script>
2024
2085
2025
2086
2026 </body>
2087 </body>
2027 </html>
2088 </html>
2028
2089
2029
2090
2030 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2091 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2031
2092
2032 #endif
2093 #endif
General Comments 0
You need to be logged in to leave comments. Login now