##// END OF EJS Templates
githelp: fail gracefully in a couple cases where arguments are missing...
Matt Harbison -
r38130:d8bd6a9c default
parent child Browse files
Show More
@@ -236,6 +236,8 b' def branch(ui, repo, *args, **kwargs):'
236 236 # shell command to output the active bookmark for the active
237 237 # revision
238 238 old = '`hg log -T"{activebookmark}" -r .`'
239 else:
240 raise error.Abort(_('missing newbranch argument'))
239 241 new = args[0]
240 242 cmd['-m'] = old
241 243 cmd.append(new)
@@ -957,6 +959,8 b' def status(ui, repo, *args, **kwargs):'
957 959 ui.status((bytes(cmd)), "\n")
958 960
959 961 def svn(ui, repo, *args, **kwargs):
962 if not args:
963 raise error.Abort(_('missing svn command'))
960 964 svncmd = args[0]
961 965 if not svncmd in gitsvncommands:
962 966 ui.warn(_("error: unknown git svn command %s\n") % (svncmd))
@@ -988,6 +992,9 b' def svnfindrev(ui, repo, *args, **kwargs'
988 992 ]
989 993 args, opts = parseoptions(ui, cmdoptions, args)
990 994
995 if not args:
996 raise error.Abort(_('missing find-rev argument'))
997
991 998 cmd = Command('log')
992 999 cmd['-r'] = args[0]
993 1000
@@ -1020,6 +1027,10 b' def tag(ui, repo, *args, **kwargs):'
1020 1027 cmd = Command('tags')
1021 1028 else:
1022 1029 cmd = Command('tag')
1030
1031 if not args:
1032 raise error.Abort(_('missing tag argument'))
1033
1023 1034 cmd.append(args[0])
1024 1035 if len(args) > 1:
1025 1036 cmd['-r'] = args[1]
General Comments 0
You need to be logged in to leave comments. Login now