mercurial/dirstate.py
changeset 30026 ba06562a06a2
parent 29889 6f447b9ec263
child 30224 ad56071b37d4
--- a/mercurial/dirstate.py	Tue Sep 27 22:09:28 2016 -0700
+++ b/mercurial/dirstate.py	Tue Aug 30 15:16:28 2016 -0700
@@ -680,21 +680,15 @@
             self.clear()
             self._lastnormaltime = lastnormaltime
 
-        for f in changedfiles:
-            mode = 0o666
-            if f in allfiles and 'x' in allfiles.flags(f):
-                mode = 0o777
-
-            if f in allfiles:
-                self._map[f] = dirstatetuple('n', mode, -1, 0)
-            else:
-                self._map.pop(f, None)
-                if f in self._nonnormalset:
-                    self._nonnormalset.remove(f)
-
         if self._origpl is None:
             self._origpl = self._pl
         self._pl = (parent, nullid)
+        for f in changedfiles:
+            if f in allfiles:
+                self.normallookup(f)
+            else:
+                self.drop(f)
+
         self._dirty = True
 
     def write(self, tr):