Bug 1272544 - artifact builds with git now only consider the last 500 revisions rather than all revisions for the last 500 commits. r?chmanchester draft
authorMark Hammond <mhammond@skippinet.com.au>
Fri, 13 May 2016 15:27:27 +1000
changeset 366666 8df2a013e6b02ba8c3c65759ee133d7ee05e6a6d
parent 365685 c8241f3e1f532ff2cb38d24ec638ac111f3d9e2c
child 520830 34a0f11de6e532aa6bf1a5a68b5cb764566b4d1a
push id18045
push userbmo:markh@mozilla.com
push dateFri, 13 May 2016 05:27:42 +0000
reviewerschmanchester
bugs1272544
milestone49.0a1
Bug 1272544 - artifact builds with git now only consider the last 500 revisions rather than all revisions for the last 500 commits. r?chmanchester MozReview-Commit-ID: 21Y4S5t952d
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -819,21 +819,20 @@ class Artifacts(object):
                           'pushid': pushid,
                           'num': NUM_PUSHHEADS_TO_QUERY_PER_PARENT},
                          'Retrieving the last {num} pushheads starting with id {pushid} on {tree}')
                 candidate_pushheads.extend(pushhead_cache.pushid_range(tree, start, end))
 
         return candidate_pushheads
 
     def _get_hg_revisions_from_git(self):
-
-        # First commit is HEAD, next is HEAD~1, etc.
         rev_list = subprocess.check_output([
             self._git, 'rev-list', '--topo-order',
-            'HEAD~{num}..HEAD'.format(num=NUM_REVISIONS_TO_QUERY),
+            '--max-count={num}'.format(num=NUM_REVISIONS_TO_QUERY),
+            'HEAD',
         ])
 
         hg_hash_list = subprocess.check_output([
             self._git, 'cinnabar', 'git2hg'
         ] + rev_list.splitlines())
 
         zeroes = "0" * 40