[PATCH 2 of 7 V6] dirstate: build the nonnormal set on dirstate parsing and packing
Laurent Charignon
lcharignon at fb.com
Mon Dec 21 18:33:11 CST 2015
# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1450743816 28800
# Mon Dec 21 16:23:36 2015 -0800
# Node ID d7d4f75cce20bd0466fffae5c9214835833d1e0f
# Parent 72338485aacdd2f9189c8ad85c1824f42e41df9c
dirstate: build the nonnormal set on dirstate parsing and packing
This patch adds computation for the nonnormal set when we pack and parse the
dirstate.
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -378,6 +378,7 @@ class dirstate(object):
def _read(self):
self._map = {}
self._copymap = {}
+ self._nonnormalset = set()
try:
fp = self._opendirstatefile()
try:
@@ -418,6 +419,7 @@ 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
@@ -728,6 +730,7 @@ class dirstate(object):
st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
st.close()
self._lastnormaltime = 0
+ self._nonnormalset = nonnomalentries(self._map)
self._dirty = self._dirtypl = False
def _dirignore(self, f):
More information about the Mercurial-devel
mailing list