Patchwork D3077: simplestorerepo: avoid shadowing dict in list comprehension over dict

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 7:14 p.m.
Message ID <de817fd2486319c22bd6ebbd9c346caf@localhost.localdomain>
Download mbox | patch
Permalink /patch/30284/
State Not Applicable
Headers show

Comments

phabricator - April 4, 2018, 7:14 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGac88fdd8a19b: simplestorerepo: avoid shadowing dict in list comprehension over dict (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3077?vs=7637&id=7642

REVISION DETAIL
  https://phab.mercurial-scm.org/D3077

AFFECTED FILES
  tests/simplestorerepo.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: pulkit, mercurial-devel

Patch

diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -480,14 +480,14 @@ 
 
     def headrevs(self):
         # Assume all revisions are heads by default.
-        ishead = {rev: True for rev in self._indexbyrev}
+        revishead = {rev: True for rev in self._indexbyrev}
 
         for rev, entry in self._indexbyrev.items():
             # Unset head flag for all seen parents.
             ishead[self.rev(entry[b'p1'])] = False
             ishead[self.rev(entry[b'p2'])] = False
 
-        return [rev for rev, ishead in sorted(ishead.items())
+        return [rev for rev, ishead in sorted(revishead.items())
                 if ishead]
 
     def heads(self, start=None, stop=None):