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

Unified Diff: tools/bisect-builds.py

Issue 547473002: bisect-builds.py: Correct method to convert SVN revision to Git hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bisect-builds.py
diff --git a/tools/bisect-builds.py b/tools/bisect-builds.py
index 3eeee608e133c63341d8fe6d64cac429b465435c..eb7e6d73398b90e0807e7f49abb3f7338d8bedc3 100755
--- a/tools/bisect-builds.py
+++ b/tools/bisect-builds.py
@@ -33,10 +33,7 @@ OFFICIAL_BASE_URL = 'http://%s/%s' % (GOOGLE_APIS_URL, GS_BUCKET_NAME)
CHANGELOG_URL = ('https://chromium.googlesource.com/chromium/src/+log/%s..%s')
# URL to convert SVN revision to git hash.
-CRREV_URL = ('http://crrev.com/')
-
-# Search pattern to match git hash.
-GITHASH_SEARCH_PATTERN = (r'<title>(\w+)\s')
+CRREV_URL = ('https://cr-rev.appspot.com/_ah/api/crrev/v1/redirect/')
# URL template for viewing changelogs between official versions.
OFFICIAL_CHANGELOG_URL = ('https://chromium.googlesource.com/chromium/'
@@ -955,8 +952,9 @@ def PrintChangeLog(min_chromium_rev, max_chromium_rev):
crrev_url = CRREV_URL + str(svn_revision)
url = urllib.urlopen(crrev_url)
if url.getcode() == 200:
- result = re.search(GITHASH_SEARCH_PATTERN, url.read())
- return result.group(1)
+ data = json.loads(url.read())
+ if 'git_sha' in data:
+ return data['git_sha']
print (' ' + CHANGELOG_URL % (_GetGitHashFromSVNRevision(min_chromium_rev),
_GetGitHashFromSVNRevision(max_chromium_rev)))
« 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