mercurial/commands.py
changeset 29701 47e48931263e
parent 29700 6eb9c8291a78
child 29702 d29fbf97cc9f
equal deleted inserted replaced
29700:6eb9c8291a78 29701:47e48931263e
  2396 
  2396 
  2397 @command('debugextensions', formatteropts, [], norepo=True)
  2397 @command('debugextensions', formatteropts, [], norepo=True)
  2398 def debugextensions(ui, **opts):
  2398 def debugextensions(ui, **opts):
  2399     '''show information about active extensions'''
  2399     '''show information about active extensions'''
  2400     exts = extensions.extensions(ui)
  2400     exts = extensions.extensions(ui)
       
  2401     hgver = util.version()
  2401     fm = ui.formatter('debugextensions', opts)
  2402     fm = ui.formatter('debugextensions', opts)
  2402     for extname, extmod in sorted(exts, key=operator.itemgetter(0)):
  2403     for extname, extmod in sorted(exts, key=operator.itemgetter(0)):
  2403         extsource = extmod.__file__
  2404         extsource = extmod.__file__
  2404         exttestedwith = getattr(extmod, 'testedwith', '').split()
  2405         exttestedwith = getattr(extmod, 'testedwith', '').split()
  2405         extbuglink = getattr(extmod, 'buglink', None)
  2406         extbuglink = getattr(extmod, 'buglink', None)
  2411         else:
  2412         else:
  2412             fm.write('name', '%s', extname)
  2413             fm.write('name', '%s', extname)
  2413             if not exttestedwith:
  2414             if not exttestedwith:
  2414                 fm.plain(_(' (untested!)\n'))
  2415                 fm.plain(_(' (untested!)\n'))
  2415             else:
  2416             else:
  2416                 if exttestedwith == ['internal'] or \
  2417                 if exttestedwith == ['internal'] or hgver in exttestedwith:
  2417                                 util.version() in exttestedwith:
       
  2418                     fm.plain('\n')
  2418                     fm.plain('\n')
  2419                 else:
  2419                 else:
  2420                     lasttestedversion = exttestedwith[-1]
  2420                     lasttestedversion = exttestedwith[-1]
  2421                     fm.plain(' (%s!)\n' % lasttestedversion)
  2421                     fm.plain(' (%s!)\n' % lasttestedversion)
  2422 
  2422