Mercurial > hg
comparison mercurial/dirstate.py @ 23866:9dd442148301
dirstate: ignore negative debug.dirstate.delaywrite values - they crashed it
Sleep can only travel forward in time, not back.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 14 Jan 2015 01:15:26 +0100 |
parents | a04c7b74b3d5 |
children | 5245caa0dcde 3cc630be5f09 |
comparison
equal
deleted
inserted
replaced
23865:81349f4b47f4 | 23866:9dd442148301 |
---|---|
542 return | 542 return |
543 | 543 |
544 # enough 'delaywrite' prevents 'pack_dirstate' from dropping | 544 # enough 'delaywrite' prevents 'pack_dirstate' from dropping |
545 # timestamp of each entries in dirstate, because of 'now > mtime' | 545 # timestamp of each entries in dirstate, because of 'now > mtime' |
546 delaywrite = self._ui.configint('debug', 'dirstate.delaywrite', 0) | 546 delaywrite = self._ui.configint('debug', 'dirstate.delaywrite', 0) |
547 if delaywrite: | 547 if delaywrite > 0: |
548 import time # to avoid useless import | 548 import time # to avoid useless import |
549 time.sleep(delaywrite) | 549 time.sleep(delaywrite) |
550 | 550 |
551 st = self._opener("dirstate", "w", atomictemp=True) | 551 st = self._opener("dirstate", "w", atomictemp=True) |
552 # use the modification time of the newly created temporary file as the | 552 # use the modification time of the newly created temporary file as the |