githelp: cleanly abort if the `svn` command is unknown
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 21 May 2018 22:41:55 -0400
changeset 38152 ee96458afdb6
parent 38151 d8bd6a9c64a5
child 38153 16463278e7f4
githelp: cleanly abort if the `svn` command is unknown Previously, the warning was lost above the sea of KeyError stacktrace output.
hgext/githelp.py
--- a/hgext/githelp.py	Mon May 21 22:32:15 2018 -0400
+++ b/hgext/githelp.py	Mon May 21 22:41:55 2018 -0400
@@ -963,7 +963,7 @@
         raise error.Abort(_('missing svn command'))
     svncmd = args[0]
     if not svncmd in gitsvncommands:
-        ui.warn(_("error: unknown git svn command %s\n") % (svncmd))
+        raise error.Abort(_('unknown git svn command "%s"') % (svncmd))
 
     args = args[1:]
     return gitsvncommands[svncmd](ui, repo, *args, **kwargs)