Patchwork D978: dirstate: move write into dirstatemap

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2017, 4:55 a.m.
Message ID <e4f4cc207cbd4951c35e7dc6d5254097@localhost.localdomain>
Download mbox | patch
Permalink /patch/24860/
State Not Applicable
Headers show

Comments

phabricator - Oct. 14, 2017, 4:55 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe2214632c3a2: dirstate: move write into dirstatemap (authored by durham, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D978?vs=2508&id=2707

REVISION DETAIL
  https://phab.mercurial-scm.org/D978

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: durham, #hg-reviewers, quark, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -739,12 +739,10 @@ 
                     now = end # trust our estimate that the end is near now
                     break
 
-        st.write(parsers.pack_dirstate(self._map._map, self._map.copymap,
-                                       self._pl, now))
+        self._map.write(st, now)
         self._nonnormalset, self._otherparentset = self._map.nonnormalentries()
-        st.close()
         self._lastnormaltime = 0
-        self._dirty = self._map._dirtyparents = False
+        self._dirty = False
 
     def _dirignore(self, f):
         if f == '.':
@@ -1401,3 +1399,9 @@ 
         p = parse_dirstate(self._map, self.copymap, st)
         if not self._dirtyparents:
             self.setparents(*p)
+
+    def write(self, st, now):
+        st.write(parsers.pack_dirstate(self._map, self.copymap,
+                                       self.parents(), now))
+        st.close()
+        self._dirtyparents = False