##// END OF EJS Templates
help: use absolute_import
Gregory Szorc -
r27479:3ce1d50d default
parent child Browse files
Show More
@@ -1,580 +1,599 b''
1 # help.py - help data for mercurial
1 # help.py - help data for mercurial
2 #
2 #
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from i18n import gettext, _
8 from __future__ import absolute_import
9 import itertools, os, textwrap
9
10 import error
10 import itertools
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import os
12 import templater
12 import textwrap
13 import encoding, util, minirst
13
14 import cmdutil
14 from .i18n import (
15 import hgweb.webcommands as webcommands
15 _,
16 gettext,
17 )
18 from . import (
19 cmdutil,
20 encoding,
21 error,
22 extensions,
23 filemerge,
24 fileset,
25 minirst,
26 revset,
27 templatefilters,
28 templatekw,
29 templater,
30 util,
31 )
32 from .hgweb import (
33 webcommands,
34 )
16
35
17 _exclkeywords = [
36 _exclkeywords = [
18 "(DEPRECATED)",
37 "(DEPRECATED)",
19 "(EXPERIMENTAL)",
38 "(EXPERIMENTAL)",
20 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
39 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
21 _("(DEPRECATED)"),
40 _("(DEPRECATED)"),
22 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
41 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
23 _("(EXPERIMENTAL)"),
42 _("(EXPERIMENTAL)"),
24 ]
43 ]
25
44
26 def listexts(header, exts, indent=1, showdeprecated=False):
45 def listexts(header, exts, indent=1, showdeprecated=False):
27 '''return a text listing of the given extensions'''
46 '''return a text listing of the given extensions'''
28 rst = []
47 rst = []
29 if exts:
48 if exts:
30 for name, desc in sorted(exts.iteritems()):
49 for name, desc in sorted(exts.iteritems()):
31 if not showdeprecated and any(w in desc for w in _exclkeywords):
50 if not showdeprecated and any(w in desc for w in _exclkeywords):
32 continue
51 continue
33 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
52 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
34 if rst:
53 if rst:
35 rst.insert(0, '\n%s\n\n' % header)
54 rst.insert(0, '\n%s\n\n' % header)
36 return rst
55 return rst
37
56
38 def extshelp(ui):
57 def extshelp(ui):
39 rst = loaddoc('extensions')(ui).splitlines(True)
58 rst = loaddoc('extensions')(ui).splitlines(True)
40 rst.extend(listexts(
59 rst.extend(listexts(
41 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
60 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
42 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
61 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
43 doc = ''.join(rst)
62 doc = ''.join(rst)
44 return doc
63 return doc
45
64
46 def optrst(header, options, verbose):
65 def optrst(header, options, verbose):
47 data = []
66 data = []
48 multioccur = False
67 multioccur = False
49 for option in options:
68 for option in options:
50 if len(option) == 5:
69 if len(option) == 5:
51 shortopt, longopt, default, desc, optlabel = option
70 shortopt, longopt, default, desc, optlabel = option
52 else:
71 else:
53 shortopt, longopt, default, desc = option
72 shortopt, longopt, default, desc = option
54 optlabel = _("VALUE") # default label
73 optlabel = _("VALUE") # default label
55
74
56 if not verbose and any(w in desc for w in _exclkeywords):
75 if not verbose and any(w in desc for w in _exclkeywords):
57 continue
76 continue
58
77
59 so = ''
78 so = ''
60 if shortopt:
79 if shortopt:
61 so = '-' + shortopt
80 so = '-' + shortopt
62 lo = '--' + longopt
81 lo = '--' + longopt
63 if default:
82 if default:
64 desc += _(" (default: %s)") % default
83 desc += _(" (default: %s)") % default
65
84
66 if isinstance(default, list):
85 if isinstance(default, list):
67 lo += " %s [+]" % optlabel
86 lo += " %s [+]" % optlabel
68 multioccur = True
87 multioccur = True
69 elif (default is not None) and not isinstance(default, bool):
88 elif (default is not None) and not isinstance(default, bool):
70 lo += " %s" % optlabel
89 lo += " %s" % optlabel
71
90
72 data.append((so, lo, desc))
91 data.append((so, lo, desc))
73
92
74 if multioccur:
93 if multioccur:
75 header += (_(" ([+] can be repeated)"))
94 header += (_(" ([+] can be repeated)"))
76
95
77 rst = ['\n%s:\n\n' % header]
96 rst = ['\n%s:\n\n' % header]
78 rst.extend(minirst.maketable(data, 1))
97 rst.extend(minirst.maketable(data, 1))
79
98
80 return ''.join(rst)
99 return ''.join(rst)
81
100
82 def indicateomitted(rst, omitted, notomitted=None):
101 def indicateomitted(rst, omitted, notomitted=None):
83 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
102 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
84 if notomitted:
103 if notomitted:
85 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
104 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
86
105
87 def filtercmd(ui, cmd, kw, doc):
106 def filtercmd(ui, cmd, kw, doc):
88 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
107 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
89 return True
108 return True
90 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
109 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
91 return True
110 return True
92 return False
111 return False
93
112
94 def topicmatch(ui, kw):
113 def topicmatch(ui, kw):
95 """Return help topics matching kw.
114 """Return help topics matching kw.
96
115
97 Returns {'section': [(name, summary), ...], ...} where section is
116 Returns {'section': [(name, summary), ...], ...} where section is
98 one of topics, commands, extensions, or extensioncommands.
117 one of topics, commands, extensions, or extensioncommands.
99 """
118 """
100 kw = encoding.lower(kw)
119 kw = encoding.lower(kw)
101 def lowercontains(container):
120 def lowercontains(container):
102 return kw in encoding.lower(container) # translated in helptable
121 return kw in encoding.lower(container) # translated in helptable
103 results = {'topics': [],
122 results = {'topics': [],
104 'commands': [],
123 'commands': [],
105 'extensions': [],
124 'extensions': [],
106 'extensioncommands': [],
125 'extensioncommands': [],
107 }
126 }
108 for names, header, doc in helptable:
127 for names, header, doc in helptable:
109 # Old extensions may use a str as doc.
128 # Old extensions may use a str as doc.
110 if (sum(map(lowercontains, names))
129 if (sum(map(lowercontains, names))
111 or lowercontains(header)
130 or lowercontains(header)
112 or (callable(doc) and lowercontains(doc(ui)))):
131 or (callable(doc) and lowercontains(doc(ui)))):
113 results['topics'].append((names[0], header))
132 results['topics'].append((names[0], header))
114 import commands # avoid cycle
133 from . import commands # avoid cycle
115 for cmd, entry in commands.table.iteritems():
134 for cmd, entry in commands.table.iteritems():
116 if len(entry) == 3:
135 if len(entry) == 3:
117 summary = entry[2]
136 summary = entry[2]
118 else:
137 else:
119 summary = ''
138 summary = ''
120 # translate docs *before* searching there
139 # translate docs *before* searching there
121 docs = _(getattr(entry[0], '__doc__', None)) or ''
140 docs = _(getattr(entry[0], '__doc__', None)) or ''
122 if kw in cmd or lowercontains(summary) or lowercontains(docs):
141 if kw in cmd or lowercontains(summary) or lowercontains(docs):
123 doclines = docs.splitlines()
142 doclines = docs.splitlines()
124 if doclines:
143 if doclines:
125 summary = doclines[0]
144 summary = doclines[0]
126 cmdname = cmd.partition('|')[0].lstrip('^')
145 cmdname = cmd.partition('|')[0].lstrip('^')
127 if filtercmd(ui, cmdname, kw, docs):
146 if filtercmd(ui, cmdname, kw, docs):
128 continue
147 continue
129 results['commands'].append((cmdname, summary))
148 results['commands'].append((cmdname, summary))
130 for name, docs in itertools.chain(
149 for name, docs in itertools.chain(
131 extensions.enabled(False).iteritems(),
150 extensions.enabled(False).iteritems(),
132 extensions.disabled().iteritems()):
151 extensions.disabled().iteritems()):
133 # extensions.load ignores the UI argument
152 # extensions.load ignores the UI argument
134 mod = extensions.load(None, name, '')
153 mod = extensions.load(None, name, '')
135 name = name.rpartition('.')[-1]
154 name = name.rpartition('.')[-1]
136 if lowercontains(name) or lowercontains(docs):
155 if lowercontains(name) or lowercontains(docs):
137 # extension docs are already translated
156 # extension docs are already translated
138 results['extensions'].append((name, docs.splitlines()[0]))
157 results['extensions'].append((name, docs.splitlines()[0]))
139 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
158 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
140 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
159 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
141 cmdname = cmd.partition('|')[0].lstrip('^')
160 cmdname = cmd.partition('|')[0].lstrip('^')
142 if entry[0].__doc__:
161 if entry[0].__doc__:
143 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
162 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
144 else:
163 else:
145 cmddoc = _('(no help text available)')
164 cmddoc = _('(no help text available)')
146 if filtercmd(ui, cmdname, kw, cmddoc):
165 if filtercmd(ui, cmdname, kw, cmddoc):
147 continue
166 continue
148 results['extensioncommands'].append((cmdname, cmddoc))
167 results['extensioncommands'].append((cmdname, cmddoc))
149 return results
168 return results
150
169
151 def loaddoc(topic, subdir=None):
170 def loaddoc(topic, subdir=None):
152 """Return a delayed loader for help/topic.txt."""
171 """Return a delayed loader for help/topic.txt."""
153
172
154 def loader(ui):
173 def loader(ui):
155 docdir = os.path.join(util.datapath, 'help')
174 docdir = os.path.join(util.datapath, 'help')
156 if subdir:
175 if subdir:
157 docdir = os.path.join(docdir, subdir)
176 docdir = os.path.join(docdir, subdir)
158 path = os.path.join(docdir, topic + ".txt")
177 path = os.path.join(docdir, topic + ".txt")
159 doc = gettext(util.readfile(path))
178 doc = gettext(util.readfile(path))
160 for rewriter in helphooks.get(topic, []):
179 for rewriter in helphooks.get(topic, []):
161 doc = rewriter(ui, topic, doc)
180 doc = rewriter(ui, topic, doc)
162 return doc
181 return doc
163
182
164 return loader
183 return loader
165
184
166 internalstable = sorted([
185 internalstable = sorted([
167 (['bundles'], _('container for exchange of repository data'),
186 (['bundles'], _('container for exchange of repository data'),
168 loaddoc('bundles', subdir='internals')),
187 loaddoc('bundles', subdir='internals')),
169 (['changegroups'], _('representation of revlog data'),
188 (['changegroups'], _('representation of revlog data'),
170 loaddoc('changegroups', subdir='internals')),
189 loaddoc('changegroups', subdir='internals')),
171 ])
190 ])
172
191
173 def internalshelp(ui):
192 def internalshelp(ui):
174 """Generate the index for the "internals" topic."""
193 """Generate the index for the "internals" topic."""
175 lines = []
194 lines = []
176 for names, header, doc in internalstable:
195 for names, header, doc in internalstable:
177 lines.append(' :%s: %s\n' % (names[0], header))
196 lines.append(' :%s: %s\n' % (names[0], header))
178
197
179 return ''.join(lines)
198 return ''.join(lines)
180
199
181 helptable = sorted([
200 helptable = sorted([
182 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
201 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
183 (["dates"], _("Date Formats"), loaddoc('dates')),
202 (["dates"], _("Date Formats"), loaddoc('dates')),
184 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
203 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
185 (['environment', 'env'], _('Environment Variables'),
204 (['environment', 'env'], _('Environment Variables'),
186 loaddoc('environment')),
205 loaddoc('environment')),
187 (['revisions', 'revs'], _('Specifying Single Revisions'),
206 (['revisions', 'revs'], _('Specifying Single Revisions'),
188 loaddoc('revisions')),
207 loaddoc('revisions')),
189 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
208 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
190 loaddoc('multirevs')),
209 loaddoc('multirevs')),
191 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
210 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
192 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
211 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
193 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
212 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
194 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
213 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
195 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
214 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
196 loaddoc('templates')),
215 loaddoc('templates')),
197 (['urls'], _('URL Paths'), loaddoc('urls')),
216 (['urls'], _('URL Paths'), loaddoc('urls')),
198 (["extensions"], _("Using Additional Features"), extshelp),
217 (["extensions"], _("Using Additional Features"), extshelp),
199 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
218 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
200 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
219 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
201 (["glossary"], _("Glossary"), loaddoc('glossary')),
220 (["glossary"], _("Glossary"), loaddoc('glossary')),
202 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
221 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
203 loaddoc('hgignore')),
222 loaddoc('hgignore')),
204 (["phases"], _("Working with Phases"), loaddoc('phases')),
223 (["phases"], _("Working with Phases"), loaddoc('phases')),
205 (['scripting'], _('Using Mercurial from scripts and automation'),
224 (['scripting'], _('Using Mercurial from scripts and automation'),
206 loaddoc('scripting')),
225 loaddoc('scripting')),
207 (['internals'], _("Technical implementation topics"),
226 (['internals'], _("Technical implementation topics"),
208 internalshelp),
227 internalshelp),
209 ])
228 ])
210
229
211 # Maps topics with sub-topics to a list of their sub-topics.
230 # Maps topics with sub-topics to a list of their sub-topics.
212 subtopics = {
231 subtopics = {
213 'internals': internalstable,
232 'internals': internalstable,
214 }
233 }
215
234
216 # Map topics to lists of callable taking the current topic help and
235 # Map topics to lists of callable taking the current topic help and
217 # returning the updated version
236 # returning the updated version
218 helphooks = {}
237 helphooks = {}
219
238
220 def addtopichook(topic, rewriter):
239 def addtopichook(topic, rewriter):
221 helphooks.setdefault(topic, []).append(rewriter)
240 helphooks.setdefault(topic, []).append(rewriter)
222
241
223 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
242 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
224 """Extract docstring from the items key to function mapping, build a
243 """Extract docstring from the items key to function mapping, build a
225 single documentation block and use it to overwrite the marker in doc.
244 single documentation block and use it to overwrite the marker in doc.
226 """
245 """
227 entries = []
246 entries = []
228 for name in sorted(items):
247 for name in sorted(items):
229 text = (items[name].__doc__ or '').rstrip()
248 text = (items[name].__doc__ or '').rstrip()
230 if (not text
249 if (not text
231 or not ui.verbose and any(w in text for w in _exclkeywords)):
250 or not ui.verbose and any(w in text for w in _exclkeywords)):
232 continue
251 continue
233 text = gettext(text)
252 text = gettext(text)
234 if dedent:
253 if dedent:
235 text = textwrap.dedent(text)
254 text = textwrap.dedent(text)
236 lines = text.splitlines()
255 lines = text.splitlines()
237 doclines = [(lines[0])]
256 doclines = [(lines[0])]
238 for l in lines[1:]:
257 for l in lines[1:]:
239 # Stop once we find some Python doctest
258 # Stop once we find some Python doctest
240 if l.strip().startswith('>>>'):
259 if l.strip().startswith('>>>'):
241 break
260 break
242 if dedent:
261 if dedent:
243 doclines.append(l.rstrip())
262 doclines.append(l.rstrip())
244 else:
263 else:
245 doclines.append(' ' + l.strip())
264 doclines.append(' ' + l.strip())
246 entries.append('\n'.join(doclines))
265 entries.append('\n'.join(doclines))
247 entries = '\n\n'.join(entries)
266 entries = '\n\n'.join(entries)
248 return doc.replace(marker, entries)
267 return doc.replace(marker, entries)
249
268
250 def addtopicsymbols(topic, marker, symbols, dedent=False):
269 def addtopicsymbols(topic, marker, symbols, dedent=False):
251 def add(ui, topic, doc):
270 def add(ui, topic, doc):
252 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
271 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
253 addtopichook(topic, add)
272 addtopichook(topic, add)
254
273
255 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
274 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
256 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
275 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
257 filemerge.internalsdoc)
276 filemerge.internalsdoc)
258 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
277 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
259 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
278 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
260 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
279 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
261 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
280 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
262 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
281 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
263 dedent=True)
282 dedent=True)
264
283
265 def help_(ui, name, unknowncmd=False, full=True, subtopic=None, **opts):
284 def help_(ui, name, unknowncmd=False, full=True, subtopic=None, **opts):
266 '''
285 '''
267 Generate the help for 'name' as unformatted restructured text. If
286 Generate the help for 'name' as unformatted restructured text. If
268 'name' is None, describe the commands available.
287 'name' is None, describe the commands available.
269 '''
288 '''
270
289
271 import commands # avoid cycle
290 from . import commands # avoid cycle
272
291
273 def helpcmd(name, subtopic=None):
292 def helpcmd(name, subtopic=None):
274 try:
293 try:
275 aliases, entry = cmdutil.findcmd(name, commands.table,
294 aliases, entry = cmdutil.findcmd(name, commands.table,
276 strict=unknowncmd)
295 strict=unknowncmd)
277 except error.AmbiguousCommand as inst:
296 except error.AmbiguousCommand as inst:
278 # py3k fix: except vars can't be used outside the scope of the
297 # py3k fix: except vars can't be used outside the scope of the
279 # except block, nor can be used inside a lambda. python issue4617
298 # except block, nor can be used inside a lambda. python issue4617
280 prefix = inst.args[0]
299 prefix = inst.args[0]
281 select = lambda c: c.lstrip('^').startswith(prefix)
300 select = lambda c: c.lstrip('^').startswith(prefix)
282 rst = helplist(select)
301 rst = helplist(select)
283 return rst
302 return rst
284
303
285 rst = []
304 rst = []
286
305
287 # check if it's an invalid alias and display its error if it is
306 # check if it's an invalid alias and display its error if it is
288 if getattr(entry[0], 'badalias', None):
307 if getattr(entry[0], 'badalias', None):
289 rst.append(entry[0].badalias + '\n')
308 rst.append(entry[0].badalias + '\n')
290 if entry[0].unknowncmd:
309 if entry[0].unknowncmd:
291 try:
310 try:
292 rst.extend(helpextcmd(entry[0].cmdname))
311 rst.extend(helpextcmd(entry[0].cmdname))
293 except error.UnknownCommand:
312 except error.UnknownCommand:
294 pass
313 pass
295 return rst
314 return rst
296
315
297 # synopsis
316 # synopsis
298 if len(entry) > 2:
317 if len(entry) > 2:
299 if entry[2].startswith('hg'):
318 if entry[2].startswith('hg'):
300 rst.append("%s\n" % entry[2])
319 rst.append("%s\n" % entry[2])
301 else:
320 else:
302 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
321 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
303 else:
322 else:
304 rst.append('hg %s\n' % aliases[0])
323 rst.append('hg %s\n' % aliases[0])
305 # aliases
324 # aliases
306 if full and not ui.quiet and len(aliases) > 1:
325 if full and not ui.quiet and len(aliases) > 1:
307 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
326 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
308 rst.append('\n')
327 rst.append('\n')
309
328
310 # description
329 # description
311 doc = gettext(entry[0].__doc__)
330 doc = gettext(entry[0].__doc__)
312 if not doc:
331 if not doc:
313 doc = _("(no help text available)")
332 doc = _("(no help text available)")
314 if util.safehasattr(entry[0], 'definition'): # aliased command
333 if util.safehasattr(entry[0], 'definition'): # aliased command
315 if entry[0].definition.startswith('!'): # shell alias
334 if entry[0].definition.startswith('!'): # shell alias
316 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
335 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
317 else:
336 else:
318 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
337 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
319 doc = doc.splitlines(True)
338 doc = doc.splitlines(True)
320 if ui.quiet or not full:
339 if ui.quiet or not full:
321 rst.append(doc[0])
340 rst.append(doc[0])
322 else:
341 else:
323 rst.extend(doc)
342 rst.extend(doc)
324 rst.append('\n')
343 rst.append('\n')
325
344
326 # check if this command shadows a non-trivial (multi-line)
345 # check if this command shadows a non-trivial (multi-line)
327 # extension help text
346 # extension help text
328 try:
347 try:
329 mod = extensions.find(name)
348 mod = extensions.find(name)
330 doc = gettext(mod.__doc__) or ''
349 doc = gettext(mod.__doc__) or ''
331 if '\n' in doc.strip():
350 if '\n' in doc.strip():
332 msg = _('(use "hg help -e %s" to show help for '
351 msg = _('(use "hg help -e %s" to show help for '
333 'the %s extension)') % (name, name)
352 'the %s extension)') % (name, name)
334 rst.append('\n%s\n' % msg)
353 rst.append('\n%s\n' % msg)
335 except KeyError:
354 except KeyError:
336 pass
355 pass
337
356
338 # options
357 # options
339 if not ui.quiet and entry[1]:
358 if not ui.quiet and entry[1]:
340 rst.append(optrst(_("options"), entry[1], ui.verbose))
359 rst.append(optrst(_("options"), entry[1], ui.verbose))
341
360
342 if ui.verbose:
361 if ui.verbose:
343 rst.append(optrst(_("global options"),
362 rst.append(optrst(_("global options"),
344 commands.globalopts, ui.verbose))
363 commands.globalopts, ui.verbose))
345
364
346 if not ui.verbose:
365 if not ui.verbose:
347 if not full:
366 if not full:
348 rst.append(_('\n(use "hg %s -h" to show more help)\n')
367 rst.append(_('\n(use "hg %s -h" to show more help)\n')
349 % name)
368 % name)
350 elif not ui.quiet:
369 elif not ui.quiet:
351 rst.append(_('\n(some details hidden, use --verbose '
370 rst.append(_('\n(some details hidden, use --verbose '
352 'to show complete help)'))
371 'to show complete help)'))
353
372
354 return rst
373 return rst
355
374
356
375
357 def helplist(select=None, **opts):
376 def helplist(select=None, **opts):
358 # list of commands
377 # list of commands
359 if name == "shortlist":
378 if name == "shortlist":
360 header = _('basic commands:\n\n')
379 header = _('basic commands:\n\n')
361 elif name == "debug":
380 elif name == "debug":
362 header = _('debug commands (internal and unsupported):\n\n')
381 header = _('debug commands (internal and unsupported):\n\n')
363 else:
382 else:
364 header = _('list of commands:\n\n')
383 header = _('list of commands:\n\n')
365
384
366 h = {}
385 h = {}
367 cmds = {}
386 cmds = {}
368 for c, e in commands.table.iteritems():
387 for c, e in commands.table.iteritems():
369 f = c.partition("|")[0]
388 f = c.partition("|")[0]
370 if select and not select(f):
389 if select and not select(f):
371 continue
390 continue
372 if (not select and name != 'shortlist' and
391 if (not select and name != 'shortlist' and
373 e[0].__module__ != commands.__name__):
392 e[0].__module__ != commands.__name__):
374 continue
393 continue
375 if name == "shortlist" and not f.startswith("^"):
394 if name == "shortlist" and not f.startswith("^"):
376 continue
395 continue
377 f = f.lstrip("^")
396 f = f.lstrip("^")
378 doc = e[0].__doc__
397 doc = e[0].__doc__
379 if filtercmd(ui, f, name, doc):
398 if filtercmd(ui, f, name, doc):
380 continue
399 continue
381 doc = gettext(doc)
400 doc = gettext(doc)
382 if not doc:
401 if not doc:
383 doc = _("(no help text available)")
402 doc = _("(no help text available)")
384 h[f] = doc.splitlines()[0].rstrip()
403 h[f] = doc.splitlines()[0].rstrip()
385 cmds[f] = c.lstrip("^")
404 cmds[f] = c.lstrip("^")
386
405
387 rst = []
406 rst = []
388 if not h:
407 if not h:
389 if not ui.quiet:
408 if not ui.quiet:
390 rst.append(_('no commands defined\n'))
409 rst.append(_('no commands defined\n'))
391 return rst
410 return rst
392
411
393 if not ui.quiet:
412 if not ui.quiet:
394 rst.append(header)
413 rst.append(header)
395 fns = sorted(h)
414 fns = sorted(h)
396 for f in fns:
415 for f in fns:
397 if ui.verbose:
416 if ui.verbose:
398 commacmds = cmds[f].replace("|",", ")
417 commacmds = cmds[f].replace("|",", ")
399 rst.append(" :%s: %s\n" % (commacmds, h[f]))
418 rst.append(" :%s: %s\n" % (commacmds, h[f]))
400 else:
419 else:
401 rst.append(' :%s: %s\n' % (f, h[f]))
420 rst.append(' :%s: %s\n' % (f, h[f]))
402
421
403 ex = opts.get
422 ex = opts.get
404 anyopts = (ex('keyword') or not (ex('command') or ex('extension')))
423 anyopts = (ex('keyword') or not (ex('command') or ex('extension')))
405 if not name and anyopts:
424 if not name and anyopts:
406 exts = listexts(_('enabled extensions:'), extensions.enabled())
425 exts = listexts(_('enabled extensions:'), extensions.enabled())
407 if exts:
426 if exts:
408 rst.append('\n')
427 rst.append('\n')
409 rst.extend(exts)
428 rst.extend(exts)
410
429
411 rst.append(_("\nadditional help topics:\n\n"))
430 rst.append(_("\nadditional help topics:\n\n"))
412 topics = []
431 topics = []
413 for names, header, doc in helptable:
432 for names, header, doc in helptable:
414 topics.append((names[0], header))
433 topics.append((names[0], header))
415 for t, desc in topics:
434 for t, desc in topics:
416 rst.append(" :%s: %s\n" % (t, desc))
435 rst.append(" :%s: %s\n" % (t, desc))
417
436
418 if ui.quiet:
437 if ui.quiet:
419 pass
438 pass
420 elif ui.verbose:
439 elif ui.verbose:
421 rst.append('\n%s\n' % optrst(_("global options"),
440 rst.append('\n%s\n' % optrst(_("global options"),
422 commands.globalopts, ui.verbose))
441 commands.globalopts, ui.verbose))
423 if name == 'shortlist':
442 if name == 'shortlist':
424 rst.append(_('\n(use "hg help" for the full list '
443 rst.append(_('\n(use "hg help" for the full list '
425 'of commands)\n'))
444 'of commands)\n'))
426 else:
445 else:
427 if name == 'shortlist':
446 if name == 'shortlist':
428 rst.append(_('\n(use "hg help" for the full list of commands '
447 rst.append(_('\n(use "hg help" for the full list of commands '
429 'or "hg -v" for details)\n'))
448 'or "hg -v" for details)\n'))
430 elif name and not full:
449 elif name and not full:
431 rst.append(_('\n(use "hg help %s" to show the full help '
450 rst.append(_('\n(use "hg help %s" to show the full help '
432 'text)\n') % name)
451 'text)\n') % name)
433 elif name and cmds and name in cmds.keys():
452 elif name and cmds and name in cmds.keys():
434 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
453 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
435 'aliases and global options)\n') % name)
454 'aliases and global options)\n') % name)
436 else:
455 else:
437 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
456 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
438 'and global options)\n')
457 'and global options)\n')
439 % (name and " " + name or ""))
458 % (name and " " + name or ""))
440 return rst
459 return rst
441
460
442 def helptopic(name, subtopic=None):
461 def helptopic(name, subtopic=None):
443 # Look for sub-topic entry first.
462 # Look for sub-topic entry first.
444 header, doc = None, None
463 header, doc = None, None
445 if subtopic and name in subtopics:
464 if subtopic and name in subtopics:
446 for names, header, doc in subtopics[name]:
465 for names, header, doc in subtopics[name]:
447 if subtopic in names:
466 if subtopic in names:
448 break
467 break
449
468
450 if not header:
469 if not header:
451 for names, header, doc in helptable:
470 for names, header, doc in helptable:
452 if name in names:
471 if name in names:
453 break
472 break
454 else:
473 else:
455 raise error.UnknownCommand(name)
474 raise error.UnknownCommand(name)
456
475
457 rst = [minirst.section(header)]
476 rst = [minirst.section(header)]
458
477
459 # description
478 # description
460 if not doc:
479 if not doc:
461 rst.append(" %s\n" % _("(no help text available)"))
480 rst.append(" %s\n" % _("(no help text available)"))
462 if callable(doc):
481 if callable(doc):
463 rst += [" %s\n" % l for l in doc(ui).splitlines()]
482 rst += [" %s\n" % l for l in doc(ui).splitlines()]
464
483
465 if not ui.verbose:
484 if not ui.verbose:
466 omitted = _('(some details hidden, use --verbose'
485 omitted = _('(some details hidden, use --verbose'
467 ' to show complete help)')
486 ' to show complete help)')
468 indicateomitted(rst, omitted)
487 indicateomitted(rst, omitted)
469
488
470 try:
489 try:
471 cmdutil.findcmd(name, commands.table)
490 cmdutil.findcmd(name, commands.table)
472 rst.append(_('\nuse "hg help -c %s" to see help for '
491 rst.append(_('\nuse "hg help -c %s" to see help for '
473 'the %s command\n') % (name, name))
492 'the %s command\n') % (name, name))
474 except error.UnknownCommand:
493 except error.UnknownCommand:
475 pass
494 pass
476 return rst
495 return rst
477
496
478 def helpext(name, subtopic=None):
497 def helpext(name, subtopic=None):
479 try:
498 try:
480 mod = extensions.find(name)
499 mod = extensions.find(name)
481 doc = gettext(mod.__doc__) or _('no help text available')
500 doc = gettext(mod.__doc__) or _('no help text available')
482 except KeyError:
501 except KeyError:
483 mod = None
502 mod = None
484 doc = extensions.disabledext(name)
503 doc = extensions.disabledext(name)
485 if not doc:
504 if not doc:
486 raise error.UnknownCommand(name)
505 raise error.UnknownCommand(name)
487
506
488 if '\n' not in doc:
507 if '\n' not in doc:
489 head, tail = doc, ""
508 head, tail = doc, ""
490 else:
509 else:
491 head, tail = doc.split('\n', 1)
510 head, tail = doc.split('\n', 1)
492 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
511 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
493 if tail:
512 if tail:
494 rst.extend(tail.splitlines(True))
513 rst.extend(tail.splitlines(True))
495 rst.append('\n')
514 rst.append('\n')
496
515
497 if not ui.verbose:
516 if not ui.verbose:
498 omitted = _('(some details hidden, use --verbose'
517 omitted = _('(some details hidden, use --verbose'
499 ' to show complete help)')
518 ' to show complete help)')
500 indicateomitted(rst, omitted)
519 indicateomitted(rst, omitted)
501
520
502 if mod:
521 if mod:
503 try:
522 try:
504 ct = mod.cmdtable
523 ct = mod.cmdtable
505 except AttributeError:
524 except AttributeError:
506 ct = {}
525 ct = {}
507 modcmds = set([c.partition('|')[0] for c in ct])
526 modcmds = set([c.partition('|')[0] for c in ct])
508 rst.extend(helplist(modcmds.__contains__))
527 rst.extend(helplist(modcmds.__contains__))
509 else:
528 else:
510 rst.append(_('(use "hg help extensions" for information on enabling'
529 rst.append(_('(use "hg help extensions" for information on enabling'
511 ' extensions)\n'))
530 ' extensions)\n'))
512 return rst
531 return rst
513
532
514 def helpextcmd(name, subtopic=None):
533 def helpextcmd(name, subtopic=None):
515 cmd, ext, mod = extensions.disabledcmd(ui, name,
534 cmd, ext, mod = extensions.disabledcmd(ui, name,
516 ui.configbool('ui', 'strict'))
535 ui.configbool('ui', 'strict'))
517 doc = gettext(mod.__doc__).splitlines()[0]
536 doc = gettext(mod.__doc__).splitlines()[0]
518
537
519 rst = listexts(_("'%s' is provided by the following "
538 rst = listexts(_("'%s' is provided by the following "
520 "extension:") % cmd, {ext: doc}, indent=4,
539 "extension:") % cmd, {ext: doc}, indent=4,
521 showdeprecated=True)
540 showdeprecated=True)
522 rst.append('\n')
541 rst.append('\n')
523 rst.append(_('(use "hg help extensions" for information on enabling '
542 rst.append(_('(use "hg help extensions" for information on enabling '
524 'extensions)\n'))
543 'extensions)\n'))
525 return rst
544 return rst
526
545
527
546
528 rst = []
547 rst = []
529 kw = opts.get('keyword')
548 kw = opts.get('keyword')
530 if kw or name is None and any(opts[o] for o in opts):
549 if kw or name is None and any(opts[o] for o in opts):
531 matches = topicmatch(ui, name or '')
550 matches = topicmatch(ui, name or '')
532 helpareas = []
551 helpareas = []
533 if opts.get('extension'):
552 if opts.get('extension'):
534 helpareas += [('extensions', _('Extensions'))]
553 helpareas += [('extensions', _('Extensions'))]
535 if opts.get('command'):
554 if opts.get('command'):
536 helpareas += [('commands', _('Commands'))]
555 helpareas += [('commands', _('Commands'))]
537 if not helpareas:
556 if not helpareas:
538 helpareas = [('topics', _('Topics')),
557 helpareas = [('topics', _('Topics')),
539 ('commands', _('Commands')),
558 ('commands', _('Commands')),
540 ('extensions', _('Extensions')),
559 ('extensions', _('Extensions')),
541 ('extensioncommands', _('Extension Commands'))]
560 ('extensioncommands', _('Extension Commands'))]
542 for t, title in helpareas:
561 for t, title in helpareas:
543 if matches[t]:
562 if matches[t]:
544 rst.append('%s:\n\n' % title)
563 rst.append('%s:\n\n' % title)
545 rst.extend(minirst.maketable(sorted(matches[t]), 1))
564 rst.extend(minirst.maketable(sorted(matches[t]), 1))
546 rst.append('\n')
565 rst.append('\n')
547 if not rst:
566 if not rst:
548 msg = _('no matches')
567 msg = _('no matches')
549 hint = _('try "hg help" for a list of topics')
568 hint = _('try "hg help" for a list of topics')
550 raise error.Abort(msg, hint=hint)
569 raise error.Abort(msg, hint=hint)
551 elif name and name != 'shortlist':
570 elif name and name != 'shortlist':
552 queries = []
571 queries = []
553 if unknowncmd:
572 if unknowncmd:
554 queries += [helpextcmd]
573 queries += [helpextcmd]
555 if opts.get('extension'):
574 if opts.get('extension'):
556 queries += [helpext]
575 queries += [helpext]
557 if opts.get('command'):
576 if opts.get('command'):
558 queries += [helpcmd]
577 queries += [helpcmd]
559 if not queries:
578 if not queries:
560 queries = (helptopic, helpcmd, helpext, helpextcmd)
579 queries = (helptopic, helpcmd, helpext, helpextcmd)
561 for f in queries:
580 for f in queries:
562 try:
581 try:
563 rst = f(name, subtopic)
582 rst = f(name, subtopic)
564 break
583 break
565 except error.UnknownCommand:
584 except error.UnknownCommand:
566 pass
585 pass
567 else:
586 else:
568 if unknowncmd:
587 if unknowncmd:
569 raise error.UnknownCommand(name)
588 raise error.UnknownCommand(name)
570 else:
589 else:
571 msg = _('no such help topic: %s') % name
590 msg = _('no such help topic: %s') % name
572 hint = _('try "hg help --keyword %s"') % name
591 hint = _('try "hg help --keyword %s"') % name
573 raise error.Abort(msg, hint=hint)
592 raise error.Abort(msg, hint=hint)
574 else:
593 else:
575 # program name
594 # program name
576 if not ui.quiet:
595 if not ui.quiet:
577 rst = [_("Mercurial Distributed SCM\n"), '\n']
596 rst = [_("Mercurial Distributed SCM\n"), '\n']
578 rst.extend(helplist(None, **opts))
597 rst.extend(helplist(None, **opts))
579
598
580 return ''.join(rst)
599 return ''.join(rst)
@@ -1,207 +1,206 b''
1 #require test-repo
1 #require test-repo
2
2
3 $ cd "$TESTDIR"/..
3 $ cd "$TESTDIR"/..
4
4
5 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
5 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
6 contrib/casesmash.py not using absolute_import
6 contrib/casesmash.py not using absolute_import
7 contrib/check-code.py not using absolute_import
7 contrib/check-code.py not using absolute_import
8 contrib/check-code.py requires print_function
8 contrib/check-code.py requires print_function
9 contrib/check-config.py not using absolute_import
9 contrib/check-config.py not using absolute_import
10 contrib/check-config.py requires print_function
10 contrib/check-config.py requires print_function
11 contrib/debugcmdserver.py not using absolute_import
11 contrib/debugcmdserver.py not using absolute_import
12 contrib/debugcmdserver.py requires print_function
12 contrib/debugcmdserver.py requires print_function
13 contrib/debugshell.py not using absolute_import
13 contrib/debugshell.py not using absolute_import
14 contrib/fixpax.py not using absolute_import
14 contrib/fixpax.py not using absolute_import
15 contrib/fixpax.py requires print_function
15 contrib/fixpax.py requires print_function
16 contrib/hgclient.py not using absolute_import
16 contrib/hgclient.py not using absolute_import
17 contrib/hgclient.py requires print_function
17 contrib/hgclient.py requires print_function
18 contrib/hgfixes/fix_bytes.py not using absolute_import
18 contrib/hgfixes/fix_bytes.py not using absolute_import
19 contrib/hgfixes/fix_bytesmod.py not using absolute_import
19 contrib/hgfixes/fix_bytesmod.py not using absolute_import
20 contrib/hgfixes/fix_leftover_imports.py not using absolute_import
20 contrib/hgfixes/fix_leftover_imports.py not using absolute_import
21 contrib/import-checker.py not using absolute_import
21 contrib/import-checker.py not using absolute_import
22 contrib/import-checker.py requires print_function
22 contrib/import-checker.py requires print_function
23 contrib/memory.py not using absolute_import
23 contrib/memory.py not using absolute_import
24 contrib/perf.py not using absolute_import
24 contrib/perf.py not using absolute_import
25 contrib/python-hook-examples.py not using absolute_import
25 contrib/python-hook-examples.py not using absolute_import
26 contrib/revsetbenchmarks.py not using absolute_import
26 contrib/revsetbenchmarks.py not using absolute_import
27 contrib/revsetbenchmarks.py requires print_function
27 contrib/revsetbenchmarks.py requires print_function
28 contrib/showstack.py not using absolute_import
28 contrib/showstack.py not using absolute_import
29 contrib/synthrepo.py not using absolute_import
29 contrib/synthrepo.py not using absolute_import
30 contrib/win32/hgwebdir_wsgi.py not using absolute_import
30 contrib/win32/hgwebdir_wsgi.py not using absolute_import
31 doc/check-seclevel.py not using absolute_import
31 doc/check-seclevel.py not using absolute_import
32 doc/gendoc.py not using absolute_import
32 doc/gendoc.py not using absolute_import
33 doc/hgmanpage.py not using absolute_import
33 doc/hgmanpage.py not using absolute_import
34 hgext/__init__.py not using absolute_import
34 hgext/__init__.py not using absolute_import
35 hgext/acl.py not using absolute_import
35 hgext/acl.py not using absolute_import
36 hgext/blackbox.py not using absolute_import
36 hgext/blackbox.py not using absolute_import
37 hgext/bugzilla.py not using absolute_import
37 hgext/bugzilla.py not using absolute_import
38 hgext/censor.py not using absolute_import
38 hgext/censor.py not using absolute_import
39 hgext/children.py not using absolute_import
39 hgext/children.py not using absolute_import
40 hgext/churn.py not using absolute_import
40 hgext/churn.py not using absolute_import
41 hgext/clonebundles.py not using absolute_import
41 hgext/clonebundles.py not using absolute_import
42 hgext/color.py not using absolute_import
42 hgext/color.py not using absolute_import
43 hgext/convert/__init__.py not using absolute_import
43 hgext/convert/__init__.py not using absolute_import
44 hgext/convert/bzr.py not using absolute_import
44 hgext/convert/bzr.py not using absolute_import
45 hgext/convert/common.py not using absolute_import
45 hgext/convert/common.py not using absolute_import
46 hgext/convert/convcmd.py not using absolute_import
46 hgext/convert/convcmd.py not using absolute_import
47 hgext/convert/cvs.py not using absolute_import
47 hgext/convert/cvs.py not using absolute_import
48 hgext/convert/cvsps.py not using absolute_import
48 hgext/convert/cvsps.py not using absolute_import
49 hgext/convert/darcs.py not using absolute_import
49 hgext/convert/darcs.py not using absolute_import
50 hgext/convert/filemap.py not using absolute_import
50 hgext/convert/filemap.py not using absolute_import
51 hgext/convert/git.py not using absolute_import
51 hgext/convert/git.py not using absolute_import
52 hgext/convert/gnuarch.py not using absolute_import
52 hgext/convert/gnuarch.py not using absolute_import
53 hgext/convert/hg.py not using absolute_import
53 hgext/convert/hg.py not using absolute_import
54 hgext/convert/monotone.py not using absolute_import
54 hgext/convert/monotone.py not using absolute_import
55 hgext/convert/p4.py not using absolute_import
55 hgext/convert/p4.py not using absolute_import
56 hgext/convert/subversion.py not using absolute_import
56 hgext/convert/subversion.py not using absolute_import
57 hgext/convert/transport.py not using absolute_import
57 hgext/convert/transport.py not using absolute_import
58 hgext/eol.py not using absolute_import
58 hgext/eol.py not using absolute_import
59 hgext/extdiff.py not using absolute_import
59 hgext/extdiff.py not using absolute_import
60 hgext/factotum.py not using absolute_import
60 hgext/factotum.py not using absolute_import
61 hgext/fetch.py not using absolute_import
61 hgext/fetch.py not using absolute_import
62 hgext/gpg.py not using absolute_import
62 hgext/gpg.py not using absolute_import
63 hgext/graphlog.py not using absolute_import
63 hgext/graphlog.py not using absolute_import
64 hgext/hgcia.py not using absolute_import
64 hgext/hgcia.py not using absolute_import
65 hgext/hgk.py not using absolute_import
65 hgext/hgk.py not using absolute_import
66 hgext/highlight/__init__.py not using absolute_import
66 hgext/highlight/__init__.py not using absolute_import
67 hgext/highlight/highlight.py not using absolute_import
67 hgext/highlight/highlight.py not using absolute_import
68 hgext/histedit.py not using absolute_import
68 hgext/histedit.py not using absolute_import
69 hgext/keyword.py not using absolute_import
69 hgext/keyword.py not using absolute_import
70 hgext/largefiles/__init__.py not using absolute_import
70 hgext/largefiles/__init__.py not using absolute_import
71 hgext/largefiles/basestore.py not using absolute_import
71 hgext/largefiles/basestore.py not using absolute_import
72 hgext/largefiles/lfcommands.py not using absolute_import
72 hgext/largefiles/lfcommands.py not using absolute_import
73 hgext/largefiles/lfutil.py not using absolute_import
73 hgext/largefiles/lfutil.py not using absolute_import
74 hgext/largefiles/localstore.py not using absolute_import
74 hgext/largefiles/localstore.py not using absolute_import
75 hgext/largefiles/overrides.py not using absolute_import
75 hgext/largefiles/overrides.py not using absolute_import
76 hgext/largefiles/proto.py not using absolute_import
76 hgext/largefiles/proto.py not using absolute_import
77 hgext/largefiles/remotestore.py not using absolute_import
77 hgext/largefiles/remotestore.py not using absolute_import
78 hgext/largefiles/reposetup.py not using absolute_import
78 hgext/largefiles/reposetup.py not using absolute_import
79 hgext/largefiles/uisetup.py not using absolute_import
79 hgext/largefiles/uisetup.py not using absolute_import
80 hgext/largefiles/wirestore.py not using absolute_import
80 hgext/largefiles/wirestore.py not using absolute_import
81 hgext/mq.py not using absolute_import
81 hgext/mq.py not using absolute_import
82 hgext/notify.py not using absolute_import
82 hgext/notify.py not using absolute_import
83 hgext/pager.py not using absolute_import
83 hgext/pager.py not using absolute_import
84 hgext/patchbomb.py not using absolute_import
84 hgext/patchbomb.py not using absolute_import
85 hgext/purge.py not using absolute_import
85 hgext/purge.py not using absolute_import
86 hgext/rebase.py not using absolute_import
86 hgext/rebase.py not using absolute_import
87 hgext/record.py not using absolute_import
87 hgext/record.py not using absolute_import
88 hgext/relink.py not using absolute_import
88 hgext/relink.py not using absolute_import
89 hgext/schemes.py not using absolute_import
89 hgext/schemes.py not using absolute_import
90 hgext/share.py not using absolute_import
90 hgext/share.py not using absolute_import
91 hgext/shelve.py not using absolute_import
91 hgext/shelve.py not using absolute_import
92 hgext/strip.py not using absolute_import
92 hgext/strip.py not using absolute_import
93 hgext/transplant.py not using absolute_import
93 hgext/transplant.py not using absolute_import
94 hgext/win32mbcs.py not using absolute_import
94 hgext/win32mbcs.py not using absolute_import
95 hgext/win32text.py not using absolute_import
95 hgext/win32text.py not using absolute_import
96 hgext/zeroconf/Zeroconf.py not using absolute_import
96 hgext/zeroconf/Zeroconf.py not using absolute_import
97 hgext/zeroconf/Zeroconf.py requires print_function
97 hgext/zeroconf/Zeroconf.py requires print_function
98 hgext/zeroconf/__init__.py not using absolute_import
98 hgext/zeroconf/__init__.py not using absolute_import
99 i18n/check-translation.py not using absolute_import
99 i18n/check-translation.py not using absolute_import
100 i18n/polib.py not using absolute_import
100 i18n/polib.py not using absolute_import
101 mercurial/byterange.py not using absolute_import
101 mercurial/byterange.py not using absolute_import
102 mercurial/cmdutil.py not using absolute_import
102 mercurial/cmdutil.py not using absolute_import
103 mercurial/commands.py not using absolute_import
103 mercurial/commands.py not using absolute_import
104 mercurial/context.py not using absolute_import
104 mercurial/context.py not using absolute_import
105 mercurial/dirstate.py not using absolute_import
105 mercurial/dirstate.py not using absolute_import
106 mercurial/dispatch.py requires print_function
106 mercurial/dispatch.py requires print_function
107 mercurial/exchange.py not using absolute_import
107 mercurial/exchange.py not using absolute_import
108 mercurial/help.py not using absolute_import
109 mercurial/httpclient/__init__.py not using absolute_import
108 mercurial/httpclient/__init__.py not using absolute_import
110 mercurial/httpclient/_readers.py not using absolute_import
109 mercurial/httpclient/_readers.py not using absolute_import
111 mercurial/httpclient/socketutil.py not using absolute_import
110 mercurial/httpclient/socketutil.py not using absolute_import
112 mercurial/httpconnection.py not using absolute_import
111 mercurial/httpconnection.py not using absolute_import
113 mercurial/keepalive.py not using absolute_import
112 mercurial/keepalive.py not using absolute_import
114 mercurial/keepalive.py requires print_function
113 mercurial/keepalive.py requires print_function
115 mercurial/localrepo.py not using absolute_import
114 mercurial/localrepo.py not using absolute_import
116 mercurial/lsprof.py requires print_function
115 mercurial/lsprof.py requires print_function
117 mercurial/lsprofcalltree.py not using absolute_import
116 mercurial/lsprofcalltree.py not using absolute_import
118 mercurial/lsprofcalltree.py requires print_function
117 mercurial/lsprofcalltree.py requires print_function
119 mercurial/mail.py requires print_function
118 mercurial/mail.py requires print_function
120 mercurial/manifest.py not using absolute_import
119 mercurial/manifest.py not using absolute_import
121 mercurial/mdiff.py not using absolute_import
120 mercurial/mdiff.py not using absolute_import
122 mercurial/patch.py not using absolute_import
121 mercurial/patch.py not using absolute_import
123 mercurial/pvec.py not using absolute_import
122 mercurial/pvec.py not using absolute_import
124 mercurial/py3kcompat.py not using absolute_import
123 mercurial/py3kcompat.py not using absolute_import
125 mercurial/scmposix.py not using absolute_import
124 mercurial/scmposix.py not using absolute_import
126 mercurial/scmutil.py not using absolute_import
125 mercurial/scmutil.py not using absolute_import
127 mercurial/scmwindows.py not using absolute_import
126 mercurial/scmwindows.py not using absolute_import
128 mercurial/store.py not using absolute_import
127 mercurial/store.py not using absolute_import
129 setup.py not using absolute_import
128 setup.py not using absolute_import
130 tests/filterpyflakes.py requires print_function
129 tests/filterpyflakes.py requires print_function
131 tests/generate-working-copy-states.py requires print_function
130 tests/generate-working-copy-states.py requires print_function
132 tests/get-with-headers.py requires print_function
131 tests/get-with-headers.py requires print_function
133 tests/heredoctest.py requires print_function
132 tests/heredoctest.py requires print_function
134 tests/hypothesishelpers.py not using absolute_import
133 tests/hypothesishelpers.py not using absolute_import
135 tests/hypothesishelpers.py requires print_function
134 tests/hypothesishelpers.py requires print_function
136 tests/killdaemons.py not using absolute_import
135 tests/killdaemons.py not using absolute_import
137 tests/md5sum.py not using absolute_import
136 tests/md5sum.py not using absolute_import
138 tests/mockblackbox.py not using absolute_import
137 tests/mockblackbox.py not using absolute_import
139 tests/printenv.py not using absolute_import
138 tests/printenv.py not using absolute_import
140 tests/readlink.py not using absolute_import
139 tests/readlink.py not using absolute_import
141 tests/readlink.py requires print_function
140 tests/readlink.py requires print_function
142 tests/revlog-formatv0.py not using absolute_import
141 tests/revlog-formatv0.py not using absolute_import
143 tests/run-tests.py not using absolute_import
142 tests/run-tests.py not using absolute_import
144 tests/seq.py not using absolute_import
143 tests/seq.py not using absolute_import
145 tests/seq.py requires print_function
144 tests/seq.py requires print_function
146 tests/silenttestrunner.py not using absolute_import
145 tests/silenttestrunner.py not using absolute_import
147 tests/silenttestrunner.py requires print_function
146 tests/silenttestrunner.py requires print_function
148 tests/sitecustomize.py not using absolute_import
147 tests/sitecustomize.py not using absolute_import
149 tests/svn-safe-append.py not using absolute_import
148 tests/svn-safe-append.py not using absolute_import
150 tests/svnxml.py not using absolute_import
149 tests/svnxml.py not using absolute_import
151 tests/test-ancestor.py requires print_function
150 tests/test-ancestor.py requires print_function
152 tests/test-atomictempfile.py not using absolute_import
151 tests/test-atomictempfile.py not using absolute_import
153 tests/test-batching.py not using absolute_import
152 tests/test-batching.py not using absolute_import
154 tests/test-batching.py requires print_function
153 tests/test-batching.py requires print_function
155 tests/test-bdiff.py not using absolute_import
154 tests/test-bdiff.py not using absolute_import
156 tests/test-bdiff.py requires print_function
155 tests/test-bdiff.py requires print_function
157 tests/test-context.py not using absolute_import
156 tests/test-context.py not using absolute_import
158 tests/test-context.py requires print_function
157 tests/test-context.py requires print_function
159 tests/test-demandimport.py not using absolute_import
158 tests/test-demandimport.py not using absolute_import
160 tests/test-demandimport.py requires print_function
159 tests/test-demandimport.py requires print_function
161 tests/test-dispatch.py not using absolute_import
160 tests/test-dispatch.py not using absolute_import
162 tests/test-dispatch.py requires print_function
161 tests/test-dispatch.py requires print_function
163 tests/test-doctest.py not using absolute_import
162 tests/test-doctest.py not using absolute_import
164 tests/test-duplicateoptions.py not using absolute_import
163 tests/test-duplicateoptions.py not using absolute_import
165 tests/test-duplicateoptions.py requires print_function
164 tests/test-duplicateoptions.py requires print_function
166 tests/test-filecache.py not using absolute_import
165 tests/test-filecache.py not using absolute_import
167 tests/test-filecache.py requires print_function
166 tests/test-filecache.py requires print_function
168 tests/test-filelog.py not using absolute_import
167 tests/test-filelog.py not using absolute_import
169 tests/test-filelog.py requires print_function
168 tests/test-filelog.py requires print_function
170 tests/test-hg-parseurl.py not using absolute_import
169 tests/test-hg-parseurl.py not using absolute_import
171 tests/test-hg-parseurl.py requires print_function
170 tests/test-hg-parseurl.py requires print_function
172 tests/test-hgweb-auth.py not using absolute_import
171 tests/test-hgweb-auth.py not using absolute_import
173 tests/test-hgweb-auth.py requires print_function
172 tests/test-hgweb-auth.py requires print_function
174 tests/test-hgwebdir-paths.py not using absolute_import
173 tests/test-hgwebdir-paths.py not using absolute_import
175 tests/test-hybridencode.py not using absolute_import
174 tests/test-hybridencode.py not using absolute_import
176 tests/test-hybridencode.py requires print_function
175 tests/test-hybridencode.py requires print_function
177 tests/test-lrucachedict.py not using absolute_import
176 tests/test-lrucachedict.py not using absolute_import
178 tests/test-lrucachedict.py requires print_function
177 tests/test-lrucachedict.py requires print_function
179 tests/test-manifest.py not using absolute_import
178 tests/test-manifest.py not using absolute_import
180 tests/test-minirst.py not using absolute_import
179 tests/test-minirst.py not using absolute_import
181 tests/test-minirst.py requires print_function
180 tests/test-minirst.py requires print_function
182 tests/test-parseindex2.py not using absolute_import
181 tests/test-parseindex2.py not using absolute_import
183 tests/test-parseindex2.py requires print_function
182 tests/test-parseindex2.py requires print_function
184 tests/test-pathencode.py not using absolute_import
183 tests/test-pathencode.py not using absolute_import
185 tests/test-pathencode.py requires print_function
184 tests/test-pathencode.py requires print_function
186 tests/test-propertycache.py not using absolute_import
185 tests/test-propertycache.py not using absolute_import
187 tests/test-propertycache.py requires print_function
186 tests/test-propertycache.py requires print_function
188 tests/test-revlog-ancestry.py not using absolute_import
187 tests/test-revlog-ancestry.py not using absolute_import
189 tests/test-revlog-ancestry.py requires print_function
188 tests/test-revlog-ancestry.py requires print_function
190 tests/test-run-tests.py not using absolute_import
189 tests/test-run-tests.py not using absolute_import
191 tests/test-simplemerge.py not using absolute_import
190 tests/test-simplemerge.py not using absolute_import
192 tests/test-status-inprocess.py not using absolute_import
191 tests/test-status-inprocess.py not using absolute_import
193 tests/test-status-inprocess.py requires print_function
192 tests/test-status-inprocess.py requires print_function
194 tests/test-symlink-os-yes-fs-no.py not using absolute_import
193 tests/test-symlink-os-yes-fs-no.py not using absolute_import
195 tests/test-trusted.py not using absolute_import
194 tests/test-trusted.py not using absolute_import
196 tests/test-trusted.py requires print_function
195 tests/test-trusted.py requires print_function
197 tests/test-ui-color.py not using absolute_import
196 tests/test-ui-color.py not using absolute_import
198 tests/test-ui-color.py requires print_function
197 tests/test-ui-color.py requires print_function
199 tests/test-ui-config.py not using absolute_import
198 tests/test-ui-config.py not using absolute_import
200 tests/test-ui-config.py requires print_function
199 tests/test-ui-config.py requires print_function
201 tests/test-ui-verbosity.py not using absolute_import
200 tests/test-ui-verbosity.py not using absolute_import
202 tests/test-ui-verbosity.py requires print_function
201 tests/test-ui-verbosity.py requires print_function
203 tests/test-url.py not using absolute_import
202 tests/test-url.py not using absolute_import
204 tests/test-url.py requires print_function
203 tests/test-url.py requires print_function
205 tests/test-walkrepo.py requires print_function
204 tests/test-walkrepo.py requires print_function
206 tests/test-wireproto.py requires print_function
205 tests/test-wireproto.py requires print_function
207 tests/tinyproxy.py requires print_function
206 tests/tinyproxy.py requires print_function
General Comments 0
You need to be logged in to leave comments. Login now