changeset 29892:b64eaf947632

debugextensions: show ships-with-hg-core state as a separate field This is less magical than rephrasing ships-with-hg-core as internal, and we can distinguish "internal" liar. "tested with: internal" will be hidden by the next patch.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 31 Aug 2016 23:22:07 +0900
parents ca6940515485
children 4c28ddda5d48
files mercurial/commands.py tests/test-debugextensions.t
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Aug 31 23:36:37 2016 +0900
+++ b/mercurial/commands.py	Wed Aug 31 23:22:07 2016 +0900
@@ -2420,6 +2420,10 @@
         fm.condwrite(ui.verbose and extsource, 'source',
                  _('  location: %s\n'), extsource or "")
 
+        if ui.verbose:
+            fm.plain(_('  bundled: %s\n') % ['no', 'yes'][isinternal])
+        fm.data(bundled=isinternal)
+
         fm.condwrite(ui.verbose and showtestedwith, 'testedwith',
                      _('  tested with: %s\n'),
                      fm.formatlist(showtestedwith, name='ver'))
--- a/tests/test-debugextensions.t	Wed Aug 31 23:36:37 2016 +0900
+++ b/tests/test-debugextensions.t	Wed Aug 31 23:22:07 2016 +0900
@@ -32,66 +32,80 @@
   $ hg debugextensions -v
   color
     location: */hgext/color.py* (glob)
+    bundled: yes
     tested with: internal
   ext1
     location: */extwithoutinfos.py* (glob)
+    bundled: no
   ext2
     location: */extwithinfos.py* (glob)
+    bundled: no
     tested with: 3.0 3.1 3.2.1
     bug reporting: https://example.org/bts
   histedit
     location: */hgext/histedit.py* (glob)
+    bundled: yes
     tested with: internal
   mq
     location: */hgext/mq.py* (glob)
+    bundled: yes
     tested with: internal
   patchbomb
     location: */hgext/patchbomb.py* (glob)
+    bundled: yes
     tested with: internal
   rebase
     location: */hgext/rebase.py* (glob)
+    bundled: yes
     tested with: internal
 
   $ hg debugextensions -Tjson | sed 's|\\\\|/|g'
   [
    {
     "buglink": "",
+    "bundled": true,
     "name": "color",
     "source": "*/hgext/color.py*", (glob)
     "testedwith": ["internal"]
    },
    {
     "buglink": "",
+    "bundled": false,
     "name": "ext1",
     "source": "*/extwithoutinfos.py*", (glob)
     "testedwith": []
    },
    {
     "buglink": "https://example.org/bts",
+    "bundled": false,
     "name": "ext2",
     "source": "*/extwithinfos.py*", (glob)
     "testedwith": ["3.0", "3.1", "3.2.1"]
    },
    {
     "buglink": "",
+    "bundled": true,
     "name": "histedit",
     "source": "*/hgext/histedit.py*", (glob)
     "testedwith": ["internal"]
    },
    {
     "buglink": "",
+    "bundled": true,
     "name": "mq",
     "source": "*/hgext/mq.py*", (glob)
     "testedwith": ["internal"]
    },
    {
     "buglink": "",
+    "bundled": true,
     "name": "patchbomb",
     "source": "*/hgext/patchbomb.py*", (glob)
     "testedwith": ["internal"]
    },
    {
     "buglink": "",
+    "bundled": true,
     "name": "rebase",
     "source": "*/hgext/rebase.py*", (glob)
     "testedwith": ["internal"]