changeset 38119:ee96458afdb6

githelp: cleanly abort if the `svn` command is unknown Previously, the warning was lost above the sea of KeyError stacktrace output.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 21 May 2018 22:41:55 -0400
parents d8bd6a9c64a5
children 16463278e7f4
files hgext/githelp.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)