Skip to content

Commit

Permalink
bisect-builds.py: Convert latest revision to SVN revision from Git hash
Browse files Browse the repository at this point in the history
The build archive LAST_CHANGE file now gives Git hashes.
This patch fixes the tools/bisect-builds.py script to convert the
hash to a SVN revision number.

NOTRY=TRUE

Review URL: https://codereview.chromium.org/363503005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280927 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
alancutter@chromium.org committed Jul 2, 2014
1 parent 641c8cc commit 5980b75
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/bisect-builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,11 +766,14 @@ def FixChromiumRevForBlink(revisions_final, revisions, self, rev):
revisions_final.sort()
return rev

def GetChromiumRevision(url):
def GetChromiumRevision(context, url):
"""Returns the chromium revision read from given URL."""
try:
# Location of the latest build revision number
return int(urllib.urlopen(url).read())
latest_revision = urllib.urlopen(url).read()
if latest_revision.isdigit():
return int(latest_revision)
return context.GetSVNRevisionFromGitHash(latest_revision)
except Exception, e:
print('Could not determine latest revision. This could be bad...')
return 999999999
Expand Down Expand Up @@ -871,7 +874,7 @@ def main():
else:
bad_rev = '999.0.0.0'
if not opts.official_builds:
bad_rev = GetChromiumRevision(context.GetLastChangeURL())
bad_rev = GetChromiumRevision(context, context.GetLastChangeURL())

# Find out when we were good.
if opts.good:
Expand Down

0 comments on commit 5980b75

Please sign in to comment.