2394 hgver = util.version() |
2394 hgver = util.version() |
2395 fm = ui.formatter('debugextensions', opts) |
2395 fm = ui.formatter('debugextensions', opts) |
2396 for extname, extmod in sorted(exts, key=operator.itemgetter(0)): |
2396 for extname, extmod in sorted(exts, key=operator.itemgetter(0)): |
2397 isinternal = extensions.ismoduleinternal(extmod) |
2397 isinternal = extensions.ismoduleinternal(extmod) |
2398 extsource = extmod.__file__ |
2398 extsource = extmod.__file__ |
2399 exttestedwith = getattr(extmod, 'testedwith', '').split() |
|
2400 if isinternal: |
2399 if isinternal: |
2401 showtestedwith = ['internal'] |
2400 exttestedwith = [] # never expose magic string to users |
2402 else: |
2401 else: |
2403 showtestedwith = exttestedwith |
2402 exttestedwith = getattr(extmod, 'testedwith', '').split() |
2404 extbuglink = getattr(extmod, 'buglink', None) |
2403 extbuglink = getattr(extmod, 'buglink', None) |
2405 |
2404 |
2406 fm.startitem() |
2405 fm.startitem() |
2407 |
2406 |
2408 if ui.quiet or ui.verbose: |
2407 if ui.quiet or ui.verbose: |
2409 fm.write('name', '%s\n', extname) |
2408 fm.write('name', '%s\n', extname) |
2410 else: |
2409 else: |
2411 fm.write('name', '%s', extname) |
2410 fm.write('name', '%s', extname) |
2412 if not exttestedwith: |
2411 if isinternal or hgver in exttestedwith: |
|
2412 fm.plain('\n') |
|
2413 elif not exttestedwith: |
2413 fm.plain(_(' (untested!)\n')) |
2414 fm.plain(_(' (untested!)\n')) |
2414 elif isinternal or hgver in exttestedwith: |
|
2415 fm.plain('\n') |
|
2416 else: |
2415 else: |
2417 lasttestedversion = exttestedwith[-1] |
2416 lasttestedversion = exttestedwith[-1] |
2418 fm.plain(' (%s!)\n' % lasttestedversion) |
2417 fm.plain(' (%s!)\n' % lasttestedversion) |
2419 |
2418 |
2420 fm.condwrite(ui.verbose and extsource, 'source', |
2419 fm.condwrite(ui.verbose and extsource, 'source', |
2422 |
2421 |
2423 if ui.verbose: |
2422 if ui.verbose: |
2424 fm.plain(_(' bundled: %s\n') % ['no', 'yes'][isinternal]) |
2423 fm.plain(_(' bundled: %s\n') % ['no', 'yes'][isinternal]) |
2425 fm.data(bundled=isinternal) |
2424 fm.data(bundled=isinternal) |
2426 |
2425 |
2427 fm.condwrite(ui.verbose and showtestedwith, 'testedwith', |
2426 fm.condwrite(ui.verbose and exttestedwith, 'testedwith', |
2428 _(' tested with: %s\n'), |
2427 _(' tested with: %s\n'), |
2429 fm.formatlist(showtestedwith, name='ver')) |
2428 fm.formatlist(exttestedwith, name='ver')) |
2430 |
2429 |
2431 fm.condwrite(ui.verbose and extbuglink, 'buglink', |
2430 fm.condwrite(ui.verbose and extbuglink, 'buglink', |
2432 _(' bug reporting: %s\n'), extbuglink or "") |
2431 _(' bug reporting: %s\n'), extbuglink or "") |
2433 |
2432 |
2434 fm.end() |
2433 fm.end() |