##// END OF EJS Templates
dirstate: move delaywrite logic from write to _write...
Matt Mackall -
r27397:6c6b48ac default
parent child Browse files
Show More
@@ -662,13 +662,6 b' class dirstate(object):'
662 if not self._dirty:
662 if not self._dirty:
663 return
663 return
664
664
665 # enough 'delaywrite' prevents 'pack_dirstate' from dropping
666 # timestamp of each entries in dirstate, because of 'now > mtime'
667 delaywrite = self._ui.configint('debug', 'dirstate.delaywrite', 0)
668 if delaywrite > 0:
669 import time # to avoid useless import
670 time.sleep(delaywrite)
671
672 filename = self._filename
665 filename = self._filename
673 if tr is False: # not explicitly specified
666 if tr is False: # not explicitly specified
674 if (self._ui.configbool('devel', 'all-warnings')
667 if (self._ui.configbool('devel', 'all-warnings')
@@ -710,6 +703,14 b' class dirstate(object):'
710 # use the modification time of the newly created temporary file as the
703 # use the modification time of the newly created temporary file as the
711 # filesystem's notion of 'now'
704 # filesystem's notion of 'now'
712 now = util.fstat(st).st_mtime & _rangemask
705 now = util.fstat(st).st_mtime & _rangemask
706
707 # enough 'delaywrite' prevents 'pack_dirstate' from dropping
708 # timestamp of each entries in dirstate, because of 'now > mtime'
709 delaywrite = self._ui.configint('debug', 'dirstate.delaywrite', 0)
710 if delaywrite > 0:
711 import time # to avoid useless import
712 time.sleep(delaywrite)
713
713 st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
714 st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now))
714 st.close()
715 st.close()
715 self._lastnormaltime = 0
716 self._lastnormaltime = 0
General Comments 0
You need to be logged in to leave comments. Login now