Mercurial > hg-git
changeset 134:324a1ad9212a
gremote: do not die on wrong number of args
author | Sverre Rabbelier <sverre@rabbelier.nl> |
---|---|
date | Thu, 14 May 2009 23:55:13 +0200 |
parents | f2dfb2bed724 |
children | 421c992c058b |
files | __init__.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/__init__.py Thu May 14 20:32:54 2009 +0200 +++ b/__init__.py Thu May 14 23:55:13 2009 +0200 @@ -54,12 +54,14 @@ if len(args) == 0: git.remote_list() + elif len(args) < 2: + repo.ui.warn(_("must supply an action and a remote\n")) else: verb = args[0] nick = args[1] if verb == 'add': - if args[2]: + if len(args) == 3: git.remote_add(nick, args[2]) else: repo.ui.warn(_("must supply a url to add as a remote\n"))