hgext/githelp.py
changeset 38118 d8bd6a9c64a5
parent 37388 764ada920db5
child 38119 ee96458afdb6
--- a/hgext/githelp.py	Wed Mar 07 12:00:58 2018 +0100
+++ b/hgext/githelp.py	Mon May 21 22:32:15 2018 -0400
@@ -236,6 +236,8 @@
                 # shell command to output the active bookmark for the active
                 # revision
                 old = '`hg log -T"{activebookmark}" -r .`'
+        else:
+            raise error.Abort(_('missing newbranch argument'))
         new = args[0]
         cmd['-m'] = old
         cmd.append(new)
@@ -957,6 +959,8 @@
     ui.status((bytes(cmd)), "\n")
 
 def svn(ui, repo, *args, **kwargs):
+    if not args:
+        raise error.Abort(_('missing svn command'))
     svncmd = args[0]
     if not svncmd in gitsvncommands:
         ui.warn(_("error: unknown git svn command %s\n") % (svncmd))
@@ -988,6 +992,9 @@
     ]
     args, opts = parseoptions(ui, cmdoptions, args)
 
+    if not args:
+        raise error.Abort(_('missing find-rev argument'))
+
     cmd = Command('log')
     cmd['-r'] = args[0]
 
@@ -1020,6 +1027,10 @@
         cmd = Command('tags')
     else:
         cmd = Command('tag')
+
+        if not args:
+            raise error.Abort(_('missing tag argument'))
+
         cmd.append(args[0])
         if len(args) > 1:
             cmd['-r'] = args[1]