changeset 38021:8ba0344f9fb1

debugextensions: process extensions loaded from the local repository too
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 11 May 2018 22:07:43 -0400
parents 20a4543e9a2b
children 312d7d14d44e
files mercurial/debugcommands.py tests/test-extension.t
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Thu May 10 22:13:13 2018 -0400
+++ b/mercurial/debugcommands.py	Fri May 11 22:07:43 2018 -0400
@@ -837,8 +837,8 @@
         if output:
             dest.close()
 
-@command('debugextensions', cmdutil.formatteropts, [], norepo=True)
-def debugextensions(ui, **opts):
+@command('debugextensions', cmdutil.formatteropts, [], optionalrepo=True)
+def debugextensions(ui, repo, **opts):
     '''show information about active extensions'''
     opts = pycompat.byteskwargs(opts)
     exts = extensions.extensions(ui)
--- a/tests/test-extension.t	Thu May 10 22:13:13 2018 -0400
+++ b/tests/test-extension.t	Fri May 11 22:07:43 2018 -0400
@@ -1517,6 +1517,14 @@
   reposetup() for $TESTTMP/reposetup-test/src
   reposetup() for $TESTTMP/reposetup-test/src (chg !)
 
+  $ hg --cwd src debugextensions
+  reposetup() for $TESTTMP/reposetup-test/src
+  dodo (untested!)
+  dudu (untested!)
+  mq
+  reposetuptest (untested!)
+  strip
+
   $ hg clone -U src clone-dst1
   reposetup() for $TESTTMP/reposetup-test/src
   $ hg init push-dst1