Commit 3487f7f4 authored by thakis@chromium.org's avatar thakis@chromium.org

Add more logging. Useful to understand `git try` slowness.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71602 0039d316-1c4b-4281-b951-d872f2087c98
parent e0c16f9f
...@@ -87,6 +87,7 @@ def CheckCall(command, print_error=True, **kwargs): ...@@ -87,6 +87,7 @@ def CheckCall(command, print_error=True, **kwargs):
Works on python 2.4 Works on python 2.4
""" """
logging.info("CheckCall(%s)" % command)
try: try:
stderr = None stderr = None
if not print_error: if not print_error:
...@@ -98,6 +99,7 @@ def CheckCall(command, print_error=True, **kwargs): ...@@ -98,6 +99,7 @@ def CheckCall(command, print_error=True, **kwargs):
if process.returncode: if process.returncode:
raise CheckCallError(command, kwargs.get('cwd', None), process.returncode, raise CheckCallError(command, kwargs.get('cwd', None), process.returncode,
std_out, std_err) std_out, std_err)
logging.info("CheckCall done")
return std_out, std_err return std_out, std_err
......
...@@ -336,7 +336,9 @@ def _SendChangeHTTP(options): ...@@ -336,7 +336,9 @@ def _SendChangeHTTP(options):
logging.info(options.diff) logging.info(options.diff)
try: try:
logging.info('Opening connection...')
connection = urllib.urlopen(url, urllib.urlencode(values), proxies=proxies) connection = urllib.urlopen(url, urllib.urlencode(values), proxies=proxies)
logging.info('Done')
except IOError, e: except IOError, e:
logging.info(str(e)) logging.info(str(e))
if (values.get('bot') and len(e.args) > 2 and if (values.get('bot') and len(e.args) > 2 and
...@@ -347,7 +349,9 @@ def _SendChangeHTTP(options): ...@@ -347,7 +349,9 @@ def _SendChangeHTTP(options):
str(e.args))) str(e.args)))
if not connection: if not connection:
raise NoTryServerAccess('%s is unaccessible.' % url) raise NoTryServerAccess('%s is unaccessible.' % url)
logging.info('Reading response...')
response = connection.read() response = connection.read()
logging.info('Done')
if response != 'OK': if response != 'OK':
raise NoTryServerAccess('%s is unaccessible. Got:\n%s' % (url, response)) raise NoTryServerAccess('%s is unaccessible. Got:\n%s' % (url, response))
......
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