Patchwork debugextensions: process extensions loaded from the local repository too

login
register
mail settings
Submitter Matt Harbison
Date May 12, 2018, 2:19 a.m.
Message ID <473978e20a079edc925c.1526091545@Envy>
Download mbox | patch
Permalink /patch/31525/
State Accepted
Headers show

Comments

Matt Harbison - May 12, 2018, 2:19 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1526090863 14400
#      Fri May 11 22:07:43 2018 -0400
# Node ID 473978e20a079edc925c920dd1245ea959630c9a
# Parent  35b230be2610a6ba4b6d6b60e228ec4a8ddfdfae
debugextensions: process extensions loaded from the local repository too
Yuya Nishihara - May 12, 2018, 2:29 a.m.
On Fri, 11 May 2018 22:19:05 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1526090863 14400
> #      Fri May 11 22:07:43 2018 -0400
> # Node ID 473978e20a079edc925c920dd1245ea959630c9a
> # Parent  35b230be2610a6ba4b6d6b60e228ec4a8ddfdfae
> debugextensions: process extensions loaded from the local repository too

Good catch. Queued, thanks.

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -837,8 +837,8 @@  def debugdownload(ui, repo, url, output=
         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)
diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -1517,6 +1517,14 @@  Commands handling multiple repositories 
   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