sqldirstate: do not populate the nonnormalset when not neccesary

Summary: We can be more lazy - it's propertycache so it will populate itself when needed.

Test Plan: tests are passing

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3558232

Signature: t1:3558232:1468460942:e5e03743ec9a33cdb5da6d5f7541af28316f6c34
This commit is contained in:
Mateusz Kwapich 2016-07-15 12:20:59 -07:00
parent 989dd13aed
commit e2d96b6e44

View File

@ -374,7 +374,8 @@ def makedirstate(cls):
self._sqlconn.commit()
self._lastnormaltime = 0
self._dirty = self._dirtypl = False
self._nonnormalset = self._map.nonnormalentries()
if '_nonnormalset' in self.__dict__:
delattr(self, '_nonnormalset')
if self._ui.configbool('sqldirstate', 'fakedirstate', True):
writefakedirstate(self)
@ -389,7 +390,8 @@ def makedirstate(cls):
def clear(self):
self._map.clear()
self._nonnormalset = set()
if '_nonnormalset' in self.__dict__:
delattr(self, '_nonnormalset')
self._dirs.clear()
self._copymap.clear()
self._filefoldmap.clear()