# HG changeset patch # User Yuya Nishihara # Date 1472223628 -32400 # Node ID ed793f41e83fb25e77ace9e0e5d5f5674ba52bff # Parent 0c8c388c7d62c401ea1510abc9cdfa24cc0394a6 extensions: use ismoduleinternal() thoroughly "ships-with-hg-core" would be long enough to typo. diff -r 0c8c388c7d62 -r ed793f41e83f mercurial/commands.py --- a/mercurial/commands.py Tue Aug 30 09:25:00 2016 -0700 +++ b/mercurial/commands.py Sat Aug 27 00:00:28 2016 +0900 @@ -2394,9 +2394,10 @@ hgver = util.version() fm = ui.formatter('debugextensions', opts) for extname, extmod in sorted(exts, key=operator.itemgetter(0)): + isinternal = extensions.ismoduleinternal(extmod) extsource = extmod.__file__ exttestedwith = getattr(extmod, 'testedwith', '').split() - if exttestedwith == ['ships-with-hg-core']: + if isinternal: showtestedwith = ['internal'] else: showtestedwith = exttestedwith @@ -2410,8 +2411,7 @@ fm.write('name', '%s', extname) if not exttestedwith: fm.plain(_(' (untested!)\n')) - elif (exttestedwith == ['ships-with-hg-core'] - or hgver in exttestedwith): + elif isinternal or hgver in exttestedwith: fm.plain('\n') else: lasttestedversion = exttestedwith[-1] diff -r 0c8c388c7d62 -r ed793f41e83f mercurial/dispatch.py --- a/mercurial/dispatch.py Tue Aug 30 09:25:00 2016 -0700 +++ b/mercurial/dispatch.py Sat Aug 27 00:00:28 2016 +0900 @@ -929,7 +929,7 @@ break # Never blame on extensions bundled with Mercurial. - if testedwith == 'ships-with-hg-core': + if extensions.ismoduleinternal(mod): continue tested = [util.versiontuple(t, 2) for t in testedwith.split()]