diff tests/test-extension @ 4932:93b7e2fa7ee3

help: avoid traceback if an extension has only debug commands
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 19 Jul 2007 19:43:25 -0300
parents c41a404ac387
children
line wrap: on
line diff
--- a/tests/test-extension
+++ b/tests/test-extension
@@ -64,3 +64,18 @@ emptypath=`pwd`/empty.py
 echo '[extensions]' > $HGRCPATH
 echo "empty = $emptypath" >> $HGRCPATH
 hg help empty
+
+cat > debugextension.py <<EOF
+'''only debugcommands
+'''
+def debugfoobar(ui, repo, *args, **opts):
+    "yet another debug command"
+    pass
+
+cmdtable = {"debugfoobar": (debugfoobar, (), "hg debugfoobar")}
+EOF
+debugpath=`pwd`/debugextension.py
+echo '[extensions]' > $HGRCPATH
+echo "debugextension = $debugpath" >> $HGRCPATH
+hg help debugextension
+hg --debug help debugextension