Commit 62fd6933 authored by maruel@chromium.org's avatar maruel@chromium.org

Massive overhaul for gcl help

Automatically generate help and enforce stricter argument parsing.
Stops from throwing an exception when run outside a subversion checkout.
Fixed gcl lint.

Review URL: http://codereview.chromium.org/2301003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48386 0039d316-1c4b-4281-b951-d872f2087c98
parent 6b1d00b0
This diff is collapsed.
......@@ -36,9 +36,9 @@ class GclUnittest(GclTestsBase):
'CMDdescription', 'CMDdiff', 'CMDhelp', 'CMDlint', 'CMDnothave',
'CMDopened', 'CMDpassthru', 'CMDpresubmit', 'CMDrename', 'CMDsettings',
'CMDstatus', 'CMDtry', 'CMDupload',
'ChangeInfo', 'DEFAULT_LINT_IGNORE_REGEX',
'DEFAULT_LINT_REGEX', 'CheckHomeForFile',
'DoPresubmitChecks', 'ErrorExit', 'FILES_CACHE', 'FilterFlag',
'ChangeInfo', 'Command', 'DEFAULT_LINT_IGNORE_REGEX',
'DEFAULT_LINT_REGEX', 'CheckHomeForFile', 'DoPresubmitChecks',
'ErrorExit', 'FILES_CACHE', 'FilterFlag', 'GenUsage',
'GenerateChangeName', 'GenerateDiff', 'GetCLs', 'GetCacheDir',
'GetCachedFile', 'GetChangelistInfoFile', 'GetChangesDir',
'GetCodeReviewSetting', 'GetEditor', 'GetFilesNotInCL', 'GetInfoDir',
......@@ -48,7 +48,8 @@ class GclUnittest(GclTestsBase):
'OptionallyDoPresubmitChecks', 'REPOSITORY_ROOT',
'RunShell', 'RunShellWithReturnCode', 'SVN',
'SendToRietveld', 'TryChange', 'UnknownFiles', 'Warn',
'breakpad', 'gclient_utils', 'getpass', 'main', 'need_change', 'os',
'attrs', 'breakpad', 'defer_attributes', 'gclient_utils', 'getpass',
'main', 'need_change', 'need_change_and_args', 'no_args', 'os',
'random', 're', 'shutil', 'string', 'subprocess', 'sys', 'tempfile',
'time', 'upload', 'urllib2',
]
......@@ -85,8 +86,7 @@ class GclUnittest(GclTestsBase):
self.assertEquals(gcl.GetRepositoryRoot(), root_path + '.~')
def testHelp(self):
gcl.sys.stdout.write(mox.StrContains('GCL is a wrapper for Subversion'))
gcl.sys.stdout.write('\n')
gcl.sys.stdout.write = lambda x: None
self.mox.ReplayAll()
gcl.CMDhelp([])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment