From 993d8dde169387c432c706e5b7a559dcb622bcc9 Mon Sep 17 00:00:00 2001 From: agable Date: Sat, 23 Aug 2014 11:50:22 -0700 Subject: [PATCH] Temporarily make lastchange use only the git hash. 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} --- build/util/lastchange.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/build/util/lastchange.py b/build/util/lastchange.py index 28a266ddaf7a..93c695845998 100755 --- a/build/util/lastchange.py +++ b/build/util/lastchange.py @@ -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: @@ -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):