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

Unified Diff: build/util/lastchange.py

Issue 499063002: Temporarily make lastchange use only the git hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert whitespace changes now that trybot has succeeded Created 6 years, 4 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: build/util/lastchange.py
diff --git a/build/util/lastchange.py b/build/util/lastchange.py
index 28a266ddaf7ad977d37f4499076b0aa84eca19c5..93c695845998eb47c268b467d41f4363299c555a 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):
« 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