Partial update of upload.py with r660 patch.

Make json files known as a text mimetype so that they can be seen in reviews.

Original review at http://codereview.appspot.com/4133046/

Also make sure that the copy in third_party and in git_cl are the same. I'll
remove the copy in git_cl in a later change.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74116 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 15 years ago
parent fdcc9f7f4c
commit 082cccdbb4

@ -90,9 +90,9 @@ VCS_UNKNOWN = "Unknown"
# whitelist for non-binary filetypes which do not start with "text/"
# .mm (Objective-C) shows up as application/x-freemind on my Linux box.
TEXT_MIMETYPES = ['application/javascript', 'application/x-javascript',
'application/xml', 'application/x-freemind',
'application/x-sh']
TEXT_MIMETYPES = ['application/javascript', 'application/json',
'application/x-javascript', 'application/xml',
'application/x-freemind', 'application/x-sh']
VCS_ABBREVIATIONS = {
VCS_MERCURIAL.lower(): VCS_MERCURIAL,
@ -416,6 +416,14 @@ class AbstractRpcServer(object):
url = e.info()["location"]
else:
raise
except urllib2.URLError, e:
reason = getattr(e, 'reason', None)
if isinstance(reason, str) and reason.find("110") != -1:
# Connection timeout error.
if tries <= 3:
# Try again.
continue
raise
finally:
socket.setdefaulttimeout(old_timeout)

@ -90,9 +90,9 @@ VCS_UNKNOWN = "Unknown"
# whitelist for non-binary filetypes which do not start with "text/"
# .mm (Objective-C) shows up as application/x-freemind on my Linux box.
TEXT_MIMETYPES = ['application/javascript', 'application/x-javascript',
'application/xml', 'application/x-freemind',
'application/x-sh']
TEXT_MIMETYPES = ['application/javascript', 'application/json',
'application/x-javascript', 'application/xml',
'application/x-freemind', 'application/x-sh']
VCS_ABBREVIATIONS = {
VCS_MERCURIAL.lower(): VCS_MERCURIAL,

Loading…
Cancel
Save