changeset 26521:3f41e28a16d8

dirstate: split write to write changes into files other than .hg/dirstate '_writedirstate()' is used mainly for "transactional dirstate". See the wiki page below for detail about it. https://mercurial.selenic.com/wiki/DirstateTransactionPlan
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 08 Oct 2015 01:41:30 +0900
parents 46dec89fe888
children 10f14bb22950
files mercurial/dirstate.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Thu Oct 08 01:41:30 2015 +0900
+++ b/mercurial/dirstate.py	Thu Oct 08 01:41:30 2015 +0900
@@ -622,6 +622,9 @@
             time.sleep(delaywrite)
 
         st = self._opener(self._filename, "w", atomictemp=True)
+        self._writedirstate(st)
+
+    def _writedirstate(self, st):
         # use the modification time of the newly created temporary file as the
         # filesystem's notion of 'now'
         now = util.fstat(st).st_mtime