# HG changeset patch # User Pierre-Yves David # Date 1496860336 -3600 # Node ID 999aa9cfb4d34934cfb2ce71c223615fee0cc3d9 # Parent d6924192c0d5a2c37c2e4cb1828e288b4545794e 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 ;-) ) diff -r d6924192c0d5 -r 999aa9cfb4d3 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):