зеркало из https://github.com/mozilla/bugbug.git
Remove elements from the commit map instead of just reading them
As each push contains a different set of commits, after we have used a given commit from the commit map, we'll never use it again.
This commit is contained in:
Родитель
ad848e99f4
Коммит
627192f35f
|
@ -163,7 +163,7 @@ class TestSelectModel(Model):
|
|||
self.granularity
|
||||
):
|
||||
commits = tuple(
|
||||
commit_map[revision] for revision in revs if revision in commit_map
|
||||
commit_map.pop(revision) for revision in revs if revision in commit_map
|
||||
)
|
||||
if len(commits) == 0:
|
||||
continue
|
||||
|
@ -545,7 +545,7 @@ class TestSelectModel(Model):
|
|||
# Select tests for all the pushes in the test set.
|
||||
for i, (rev, push) in enumerate(tqdm(test_pushes.items())):
|
||||
commits = tuple(
|
||||
commit_map[revision]
|
||||
commit_map.pop(revision)
|
||||
for revision in push["revs"]
|
||||
if revision in commit_map
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче