[PATCH 4 of 7 V6] dirstate: attach the nonnormalset to a propertycache

Laurent Charignon lcharignon at fb.com
Wed Dec 23 15:05:47 CST 2015


Sounds good, I will do that, I understand the motivation behind it.

Thanks,

Laurent

On Dec 22, 2015, at 2:01 PM, Martin von Zweigbergk <martinvonz at google.com<mailto:martinvonz at google.com>> wrote:

Here's a diff that shows what I meant. Sorry if gmail/inbox messes up the whitespace.

--- a/mercurial/dirstate.py     Mon Dec 21 16:27:34 2015 -0800
+++ b/mercurial/dirstate.py     Tue Dec 22 14:00:12 2015 -0800
@@ -128,8 +128,7 @@ class dirstate(object):

     @propertycache
     def _nonnormalset(self):
-        self._read()
-        return self._nonnormalset
+        return nonnomalentries(self._map)

     @propertycache
     def _filefoldmap(self):
@@ -386,7 +385,6 @@ class dirstate(object):
     def _read(self):
         self._map = {}
         self._copymap = {}
-        self._nonnormalset = set()
         try:
             fp = self._opendirstatefile()
             try:
@@ -427,7 +425,6 @@ class dirstate(object):
         # (we cannot decorate the function directly since it is in a C module)
         parse_dirstate = util.nogc(parsers.parse_dirstate)
         p = parse_dirstate(self._map, self._copymap, st)
-        self._nonnormalset = nonnomalentries(self._map)
         if not self._dirtypl:
             self._pl = p

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151223/274c94cf/attachment.html>


More information about the Mercurial-devel mailing list