changeset 45953:d896c958e428

dispatch: sort the loaded extension names in the bug report This makes a long list of extensions easier to read. On very rare occasion I've seen issues where the load order mattered, however that info should still be obtainable with `hg config extensions`. Differential Revision: https://phab.mercurial-scm.org/D9439
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Nov 2020 15:45:37 -0500
parents a2104b9b1787
children a120d1c9c704
files mercurial/dispatch.py tests/test-extension.t
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Nov 27 15:39:27 2020 -0500
+++ b/mercurial/dispatch.py	Fri Nov 27 15:45:37 2020 -0500
@@ -1312,7 +1312,7 @@
         + (_(b"** Mercurial Distributed SCM (version %s)\n") % util.version())
         + (
             _(b"** Extensions loaded: %s\n")
-            % b", ".join([x[0] for x in extensions.extensions()])
+            % b", ".join([x[0] for x in sorted(extensions.extensions())])
         )
     )
     return warning
--- a/tests/test-extension.t	Fri Nov 27 15:39:27 2020 -0500
+++ b/tests/test-extension.t	Fri Nov 27 15:45:37 2020 -0500
@@ -1464,7 +1464,7 @@
   ** If that fixes the bug please report it to the extension author.
   ** Python * (glob)
   ** Mercurial Distributed SCM (version 2.2)
-  ** Extensions loaded: throw, older
+  ** Extensions loaded: older, throw
 
 One extension only tested with older, one only with newer versions:
   $ echo "util.version = lambda:b'2.1'" >> older.py
@@ -1478,7 +1478,7 @@
   ** If that fixes the bug please report it to the extension author.
   ** Python * (glob)
   ** Mercurial Distributed SCM (version 2.1)
-  ** Extensions loaded: throw, older
+  ** Extensions loaded: older, throw
 
 Older extension is tested with current version, the other only with newer:
   $ echo "util.version = lambda:b'1.9.3'" >> older.py
@@ -1492,7 +1492,7 @@
   ** If that fixes the bug please report it to http://example.com/bts
   ** Python * (glob)
   ** Mercurial Distributed SCM (version 1.9.3)
-  ** Extensions loaded: throw, older
+  ** Extensions loaded: older, throw
 
 Ability to point to a different point
   $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
@@ -1501,7 +1501,7 @@
   ** Your Local Goat Lenders
   ** Python * (glob)
   ** Mercurial Distributed SCM (*) (glob)
-  ** Extensions loaded: throw, older
+  ** Extensions loaded: older, throw
 
 Declare the version as supporting this hg version, show regular bts link:
   $ hgver=`hg debuginstall -T '{hgver}'`