Mercurial > public > mercurial-scm > hg
comparison hgext/githelp.py @ 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 |
comparison
equal
deleted
inserted
replaced
38118:d8bd6a9c64a5 | 38119:ee96458afdb6 |
---|---|
961 def svn(ui, repo, *args, **kwargs): | 961 def svn(ui, repo, *args, **kwargs): |
962 if not args: | 962 if not args: |
963 raise error.Abort(_('missing svn command')) | 963 raise error.Abort(_('missing svn command')) |
964 svncmd = args[0] | 964 svncmd = args[0] |
965 if not svncmd in gitsvncommands: | 965 if not svncmd in gitsvncommands: |
966 ui.warn(_("error: unknown git svn command %s\n") % (svncmd)) | 966 raise error.Abort(_('unknown git svn command "%s"') % (svncmd)) |
967 | 967 |
968 args = args[1:] | 968 args = args[1:] |
969 return gitsvncommands[svncmd](ui, repo, *args, **kwargs) | 969 return gitsvncommands[svncmd](ui, repo, *args, **kwargs) |
970 | 970 |
971 def svndcommit(ui, repo, *args, **kwargs): | 971 def svndcommit(ui, repo, *args, **kwargs): |