diff tests/test-extension @ 4950: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 5db730475d6d
line wrap: on
line diff
--- a/tests/test-extension	Wed Jul 18 14:00:55 2007 -0700
+++ b/tests/test-extension	Thu Jul 19 19:43:25 2007 -0300
@@ -64,3 +64,18 @@
 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