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

Side by Side Diff: tools/bisect-builds.py

Issue 10536022: Fixed index type in GetOfficialBuildsList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Snapshot Build Bisect Tool 6 """Snapshot Build Bisect Tool
7 7
8 This script bisects a snapshot archive using binary search. It starts at 8 This script bisects a snapshot archive using binary search. It starts at
9 a bad revision (it will try to guess HEAD) and asks for a last known-good 9 a bad revision (it will try to guess HEAD) and asks for a last known-good
10 revision. It will then binary search across this revision range by downloading, 10 revision. It will then binary search across this revision range by downloading,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 """Gets the list of official build numbers between self.good_revision and 209 """Gets the list of official build numbers between self.good_revision and
210 self.bad_revision.""" 210 self.bad_revision."""
211 # Download the revlist and filter for just the range between good and bad. 211 # Download the revlist and filter for just the range between good and bad.
212 minrev = self.good_revision 212 minrev = self.good_revision
213 maxrev = self.bad_revision 213 maxrev = self.bad_revision
214 handle = urllib.urlopen(OFFICIAL_BASE_URL) 214 handle = urllib.urlopen(OFFICIAL_BASE_URL)
215 dirindex = handle.read() 215 dirindex = handle.read()
216 handle.close() 216 handle.close()
217 build_numbers = re.findall(r'<a href="([0-9][0-9].*)/">', dirindex) 217 build_numbers = re.findall(r'<a href="([0-9][0-9].*)/">', dirindex)
218 final_list = [] 218 final_list = []
219 start_index = '0' 219 start_index = 0
220 end_index = '0' 220 end_index = 0
221 i = 0 221 i = 0
222 222
223 parsed_build_numbers = [LooseVersion(x) for x in build_numbers] 223 parsed_build_numbers = [LooseVersion(x) for x in build_numbers]
224 for build_number in sorted(parsed_build_numbers): 224 for build_number in sorted(parsed_build_numbers):
225 path = OFFICIAL_BASE_URL + '/' + str(build_number) + '/' + \ 225 path = OFFICIAL_BASE_URL + '/' + str(build_number) + '/' + \
226 self._listing_platform_dir + self.archive_name 226 self._listing_platform_dir + self.archive_name
227 i = i + 1 227 i = i + 1
228 try: 228 try:
229 connection = urllib.urlopen(path) 229 connection = urllib.urlopen(path)
230 connection.close() 230 connection.close()
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 print ' ' + WEBKIT_CHANGELOG_URL % (first_known_bad_webkit_rev, 673 print ' ' + WEBKIT_CHANGELOG_URL % (first_known_bad_webkit_rev,
674 last_known_good_webkit_rev) 674 last_known_good_webkit_rev)
675 print 'CHANGELOG URL:' 675 print 'CHANGELOG URL:'
676 if opts.official_builds: 676 if opts.official_builds:
677 print OFFICIAL_CHANGELOG_URL % (last_known_good_rev, first_known_bad_rev) 677 print OFFICIAL_CHANGELOG_URL % (last_known_good_rev, first_known_bad_rev)
678 else: 678 else:
679 print ' ' + CHANGELOG_URL % (last_known_good_rev, first_known_bad_rev) 679 print ' ' + CHANGELOG_URL % (last_known_good_rev, first_known_bad_rev)
680 680
681 if __name__ == '__main__': 681 if __name__ == '__main__':
682 sys.exit(main()) 682 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698