simplestorerepo: avoid shadowing dict in list comprehension over dict
authorAugie Fackler <augie@google.com>
Wed, 04 Apr 2018 12:16:50 -0700
changeset 37341 d62d2e346acf
parent 37340 8cf97e0e1730
child 37342 4e6a6d0dccee
simplestorerepo: avoid shadowing dict in list comprehension over dict Caught by pyflakes. Differential Revision: https://phab.mercurial-scm.org/D3077
tests/simplestorerepo.py
--- a/tests/simplestorerepo.py	Tue Apr 03 09:54:20 2018 -0700
+++ b/tests/simplestorerepo.py	Wed Apr 04 12:16:50 2018 -0700
@@ -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
+            revishead[self.rev(entry[b'p1'])] = False
+            revishead[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):