Mercurial > hg-stable
changeset 32758:999aa9cfb4d3
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 ;-) )
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 07 Jun 2017 19:32:16 +0100 |
parents | d6924192c0d5 |
children | 48d1e1214d8c |
files | mercurial/bookmarks.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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):