From f639e633144355a7a2669551410d71672245c522 Mon Sep 17 00:00:00 2001 From: "stevet@chromium.org" Date: Fri, 28 Oct 2011 00:25:57 +0000 Subject: [PATCH] Add some error checking to CMDpassthru for invalid arguments. TEST=Run a passthru command like gcl di or gcl revert without a changelist name. Ensure that gcl exits with an error message. BUG=none Review URL: http://codereview.chromium.org/8413015 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@107663 0039d316-1c4b-4281-b951-d872f2087c98 --- gcl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcl.py b/gcl.py index db7cd7af16..64804a5439 100755 --- a/gcl.py +++ b/gcl.py @@ -1339,6 +1339,9 @@ def CMDpassthru(args): It assumes a change list name is passed and is converted with the files names. """ + if not args or len(args) < 2: + ErrorExit("You need to pass a change list name for this svn fall-through " + "command") cl_name = args[1] args = ["svn", args[0]] if len(args) > 1: