Skip to content

Commit

Permalink
Temporarily make lastchange use only the git hash.
Browse files Browse the repository at this point in the history
This will fix the currently failing browser_tests
CloudPolicyTests, which fail because the lastchange
string is too long.

TBR=scottmg@chromium.org, tandrii@chromium.org
NOTRY=True
NOTREECHECKS=True
TEST=passed browser_tests on linux_chromium_rel trybot
BUG=406783

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

Cr-Commit-Position: refs/heads/master@{#291571}
  • Loading branch information
aarongable authored and Commit bot committed Aug 23, 2014
1 parent 03331b3 commit 993d8dd
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions build/util/lastchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def FetchGitRevision(directory):
Returns:
A VersionInfo object or None on error.
"""
# TODO(agable): Re-add the commit position after the lastchange value can
# accept strings longer than 64 characters. See crbug.com/406783.
hsh = ''
proc = RunGitCommand(directory, ['rev-parse', 'HEAD'])
if proc:
Expand All @@ -107,17 +109,7 @@ def FetchGitRevision(directory):
hsh = output
if not hsh:
return None
pos = ''
proc = RunGitCommand(directory, ['show', '-s', '--format=%B', 'HEAD'])
if proc:
output = proc.communicate()[0]
if proc.returncode == 0 and output:
for line in reversed(output.splitlines()):
if line.startswith('Cr-Commit-Position:'):
pos = line.rsplit()[-1].strip()
if not pos:
return VersionInfo('git', hsh)
return VersionInfo('git', '%s-%s' % (hsh, pos))
return VersionInfo('git', hsh)


def FetchGitSVNURLAndRevision(directory, svn_url_regex):
Expand Down

0 comments on commit 993d8dd

Please sign in to comment.