[PATCH 2 of 3 V2] debugextensions: show ships-with-hg-core state as a separate field

Yuya Nishihara yuya at tcha.org
Wed Aug 31 11:13:48 EDT 2016


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1472653327 -32400
#      Wed Aug 31 23:22:07 2016 +0900
# Node ID 2bf5cbb72b04754f5aab0b31672dbfc28216b3b8
# Parent  38bc0d42369725474c4f25df15947546c1f13e2a
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.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2420,6 +2420,10 @@ def debugextensions(ui, **opts):
         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'))
diff --git a/tests/test-debugextensions.t b/tests/test-debugextensions.t
--- a/tests/test-debugextensions.t
+++ b/tests/test-debugextensions.t
@@ -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"]


More information about the Mercurial-devel mailing list