Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packager.py

Issue 29903558: Issue 7004 - Switch to a more robust buildnum generation (Closed)
Patch Set: Created Oct. 6, 2018, 9:25 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
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: packager.py
diff --git a/packager.py b/packager.py
index ab9557148de8834951ea1ea93e83c55a0be18cf9..1d9819115ed169d708a40b00c96ee11bc033df06 100644
--- a/packager.py
+++ b/packager.py
@@ -72,7 +72,10 @@ def getBuildNum(baseDir):
result = subprocess.check_output(['hg', 'id', '-R', baseDir, '-n'])
return re.sub(r'\D', '', result)
elif Git().istype(baseDir):
- result = subprocess.check_output(['git', 'rev-list', 'HEAD'], cwd=baseDir)
+ result = subprocess.check_output(
+ ['git', 'rev-list', '--count', '--branches', '--tags'],
+ cwd=baseDir,
+ )
return str(len(result.splitlines()))
except subprocess.CalledProcessError:
pass
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld