Mercurial > public > mercurial-scm > hg-stable
comparison hgext/githelp.py @ 38154:10befe8e8b59
githelp: rewrite a Yoda conditional
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 21 May 2018 22:57:05 -0400 |
parents | 16463278e7f4 |
children | 26b73fad45d9 |
comparison
equal
deleted
inserted
replaced
38153:16463278e7f4 | 38154:10befe8e8b59 |
---|---|
960 | 960 |
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 svncmd not in gitsvncommands: |
966 raise error.Abort(_('unknown git svn command "%s"') % (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 |