bookmarks: move variable initialization earlier
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 07 Jun 2017 19:32:16 +0100
changeset 32758 999aa9cfb4d3
parent 32757 d6924192c0d5
child 32759 48d1e1214d8c
bookmarks: move variable initialization earlier Since we no longer set '_clean = False' during the initialization loop, we can move the attribute assignment earlier in the function for clarity. (no speed improvement expected or measured ;-) )
mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Wed Jun 07 19:13:09 2017 +0100
+++ b/mercurial/bookmarks.py	Wed Jun 07 19:32:16 2017 +0100
@@ -50,6 +50,8 @@
     def __init__(self, repo):
         dict.__init__(self)
         self._repo = repo
+        self._clean = True
+        self._aclean = True
         nm = repo.changelog.nodemap
         tonode = bin # force local lookup
         setitem = dict.__setitem__
@@ -74,9 +76,7 @@
         except IOError as inst:
             if inst.errno != errno.ENOENT:
                 raise
-        self._clean = True
         self._active = _readactive(repo, self)
-        self._aclean = True
 
     @property
     def active(self):