From d659ceaa952714bbf503e58bc3068da881dc52a5 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Mon, 3 Aug 2009 18:45:50 +0000 Subject: [PATCH] Prints help when the user only type revert in command line. BUG=None TEST=None Patch contributed by Thiago Fransosi Farina git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22294 0039d316-1c4b-4281-b951-d872f2087c98 --- revert.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/revert.py b/revert.py index 3e5636399..4056c4ee9 100755 --- a/revert.py +++ b/revert.py @@ -261,6 +261,10 @@ and optionally commit the revert.""") parser.add_option("-r", "--reviewers", action="append", help="Reviewers to send the email to. By default, the list " "of commiters is used.") + if len(argv) < 2: + parser.print_help() + return 1; + options, args = parser.parse_args(argv) revisions = [] try: