mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
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:
parent
989dd13aed
commit
e2d96b6e44
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user