Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 11 matching lines...) Expand all Loading... | |
| 22 CHANGELOG_URL = 'http://build.chromium.org/f/chromium/' \ | 22 CHANGELOG_URL = 'http://build.chromium.org/f/chromium/' \ |
| 23 'perf/dashboard/ui/changelog.html?url=/trunk/src&range=%d:%d' | 23 'perf/dashboard/ui/changelog.html?url=/trunk/src&range=%d:%d' |
| 24 | 24 |
| 25 # DEPS file URL. | 25 # DEPS file URL. |
| 26 DEPS_FILE= 'http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?revision=%d' | 26 DEPS_FILE= 'http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?revision=%d' |
| 27 | 27 |
| 28 # WebKit Changelogs URL. | 28 # WebKit Changelogs URL. |
| 29 WEBKIT_CHANGELOG_URL = 'http://trac.webkit.org/log/' \ | 29 WEBKIT_CHANGELOG_URL = 'http://trac.webkit.org/log/' \ |
| 30 'trunk/?rev=%d&stop_rev=%d&verbose=on' | 30 'trunk/?rev=%d&stop_rev=%d&verbose=on' |
| 31 | 31 |
| 32 DONE_MESSAGE = 'You are probably looking for a change made after ' \ | |
| 33 '%d (known good), but no later than %d (first known bad).' | |
| 34 | |
| 32 ############################################################################### | 35 ############################################################################### |
| 33 | 36 |
| 34 import math | 37 import math |
| 35 import optparse | 38 import optparse |
| 36 import os | 39 import os |
| 37 import pipes | 40 import pipes |
| 38 import re | 41 import re |
| 39 import shutil | 42 import shutil |
| 40 import subprocess | 43 import subprocess |
| 41 import sys | 44 import sys |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 535 try: | 538 try: |
| 536 last_known_good_webkit_rev = GetWebKitRevisionForChromiumRevision( | 539 last_known_good_webkit_rev = GetWebKitRevisionForChromiumRevision( |
| 537 last_known_good_rev) | 540 last_known_good_rev) |
| 538 first_known_bad_webkit_rev = GetWebKitRevisionForChromiumRevision( | 541 first_known_bad_webkit_rev = GetWebKitRevisionForChromiumRevision( |
| 539 first_known_bad_rev) | 542 first_known_bad_rev) |
| 540 except Exception, e: | 543 except Exception, e: |
| 541 # Silently ignore the failure. | 544 # Silently ignore the failure. |
| 542 last_known_good_webkit_rev, first_known_bad_webkit_rev = 0, 0 | 545 last_known_good_webkit_rev, first_known_bad_webkit_rev = 0, 0 |
| 543 | 546 |
| 544 # We're done. Let the user know the results in an official manner. | 547 # We're done. Let the user know the results in an official manner. |
| 545 print('You are probably looking for build %d.' % first_known_bad_rev) | 548 print DONE_MESSAGE % (last_known_good_rev, first_known_bad_rev) |
| 549 print 'All Chromium changes on one page:' | |
| 550 print ' ' + CHANGELOG_URL % (last_known_good_rev, first_known_bad_rev) | |
| 546 if last_known_good_webkit_rev != first_known_bad_webkit_rev: | 551 if last_known_good_webkit_rev != first_known_bad_webkit_rev: |
| 547 print 'WEBKIT CHANGELOG URL:' | 552 print 'All WebKit changes on one page:' |
| 548 print WEBKIT_CHANGELOG_URL % (first_known_bad_webkit_rev, | 553 print ' ' + WEBKIT_CHANGELOG_URL % (first_known_bad_webkit_rev, |
| 549 last_known_good_webkit_rev) | 554 last_known_good_webkit_rev) |
| 550 print 'CHANGELOG URL:' | 555 print 'All possible Chromium revisions to investigate:' |
| 551 print CHANGELOG_URL % (last_known_good_rev, first_known_bad_rev) | 556 for rev in range(last_known_good_rev + 1, first_known_bad_rev + 1): |
| 552 print 'Built at revision:' | 557 print ' ' + BUILD_VIEWVC_URL % rev |
|
Nico
2012/04/17 22:04:53
The scrollback from this will push the more intere
| |
| 553 print BUILD_VIEWVC_URL % first_known_bad_rev | |
| 554 | 558 |
| 555 | 559 |
| 556 if __name__ == '__main__': | 560 if __name__ == '__main__': |
| 557 sys.exit(main()) | 561 sys.exit(main()) |
| OLD | NEW |