# HG changeset patch
# User Matt Harbison <matt_harbi...@yahoo.com>
# Date 1526956915 14400
#      Mon May 21 22:41:55 2018 -0400
# Node ID c137053c30e3a477d9f27aa72f0f791d5bcbe5b2
# Parent  a34bed7475cc8237665aa8a3febc1237a090bc20
githelp: cleanly abort if the `svn` command is unknown

Previously, the warning was lost above the sea of KeyError stacktrace output.

diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -963,7 +963,7 @@ def svn(ui, repo, *args, **kwargs):
         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)
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to