Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: tools/findit/chromium_deps.py

Issue 551433003: [Findit] Fix network timeout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/findit/common/http_client.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import base64 5 import base64
6 import json 6 import json
7 import os 7 import os
8 import re 8 import re
9 import time 9 import time
10 import urllib2 10 import urllib2
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if os_platform.lower() == 'linux': 110 if os_platform.lower() == 'linux':
111 os_platform = 'unix' 111 os_platform = 'unix'
112 112
113 chromium_git_base_url = CONFIG['chromium_git_base_url'] 113 chromium_git_base_url = CONFIG['chromium_git_base_url']
114 114
115 if not utils.IsGitHash(chromium_revision): 115 if not utils.IsGitHash(chromium_revision):
116 # Convert svn revision or commit position to Git hash. 116 # Convert svn revision or commit position to Git hash.
117 cr_rev_url_template = CONFIG['cr_rev_url'] 117 cr_rev_url_template = CONFIG['cr_rev_url']
118 url = cr_rev_url_template % chromium_revision 118 url = cr_rev_url_template % chromium_revision
119 status_code, content = utils.GetHttpClient().Get( 119 status_code, content = utils.GetHttpClient().Get(
120 url, timeout=60, retries=5, retry_if_not=404) 120 url, timeout=120, retries=5, retry_if_not=404)
121 if status_code != 200 or not content: 121 if status_code != 200 or not content:
122 if status_code == 404: 122 if status_code == 404:
123 print 'Chromium commit position %s is not found.' % chromium_revision 123 print 'Chromium commit position %s is not found.' % chromium_revision
124 return None 124 return None
125 125
126 cr_rev_data = json.loads(content) 126 cr_rev_data = json.loads(content)
127 if 'git_sha' not in cr_rev_data: 127 if 'git_sha' not in cr_rev_data:
128 return None 128 return None
129 129
130 if 'repo' not in cr_rev_data or cr_rev_data['repo'] != 'chromium/src': 130 if 'repo' not in cr_rev_data or cr_rev_data['repo'] != 'chromium/src':
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 'path': path, 231 'path': path,
232 'rolled': new_component['revision'] != old_revision, 232 'rolled': new_component['revision'] != old_revision,
233 'name': new_component['name'], 233 'name': new_component['name'],
234 'old_revision': old_revision, 234 'old_revision': old_revision,
235 'new_revision': new_component['revision'], 235 'new_revision': new_component['revision'],
236 'repository': new_component['repository'], 236 'repository': new_component['repository'],
237 'repository_type': new_component['repository_type'] 237 'repository_type': new_component['repository_type']
238 } 238 }
239 239
240 return components 240 return components
OLDNEW
« no previous file with comments | « no previous file | tools/findit/common/http_client.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698