diff tests/test-extension @ 7011:7da76778dbd7

Do not try to load extensions twice (issue811)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 09 Sep 2008 14:43:12 +0200
parents 5db730475d6d
children dbc40381620e
line wrap: on
line diff
--- a/tests/test-extension	Mon Sep 08 14:22:14 2008 +0200
+++ b/tests/test-extension	Tue Sep 09 14:43:12 2008 +0200
@@ -80,3 +80,25 @@
 hg help debugextension
 hg --debug help debugextension
 echo 'debugextension = !' >> $HGRCPATH
+
+echo % issue811
+debugpath=`pwd`/debugissue811.py
+cat > debugissue811.py <<EOF
+'''show all loaded extensions
+'''
+from mercurial import extensions, commands
+
+def debugextensions(ui):
+    "yet another debug command"
+    ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()]))
+
+cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")}
+commands.norepo += " debugextensions"
+EOF
+echo "debugissue811 = $debugpath" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
+echo "hgext.mq=" >> $HGRCPATH
+echo "hgext/mq=" >> $HGRCPATH
+
+echo % show extensions
+hg debugextensions