# HG changeset patch # User FUJIWARA Katsunori # Date 2015-10-07 16:41:30 # Node ID 3f41e28a16d870de5269d70ee94f92c5e37c1d5c # Parent 46dec89fe88821df819ee54a15e7f919095b10fc 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 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -622,6 +622,9 @@ class dirstate(object): 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