comparison mercurial/dirstate.py @ 47532:ccbabaee5c36

dirstate-entry: add a `need_delay` method This abstract the internal processing need for entry that would have an ambiguous mtime (If I understand things correctly). Differential Revision: https://phab.mercurial-scm.org/D10974
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 04 Jul 2021 02:13:53 +0200
parents f5b8f0b9c129
children 174d0bcce2eb
comparison
equal deleted inserted replaced
47531:f5b8f0b9c129 47532:ccbabaee5c36
752 # timestamp of each entries in dirstate, because of 'now > mtime' 752 # timestamp of each entries in dirstate, because of 'now > mtime'
753 delaywrite = self._ui.configint(b'debug', b'dirstate.delaywrite') 753 delaywrite = self._ui.configint(b'debug', b'dirstate.delaywrite')
754 if delaywrite > 0: 754 if delaywrite > 0:
755 # do we have any files to delay for? 755 # do we have any files to delay for?
756 for f, e in pycompat.iteritems(self._map): 756 for f, e in pycompat.iteritems(self._map):
757 if e.state == b'n' and e[3] == now: 757 if e.need_delay(now):
758 import time # to avoid useless import 758 import time # to avoid useless import
759 759
760 # rather than sleep n seconds, sleep until the next 760 # rather than sleep n seconds, sleep until the next
761 # multiple of n seconds 761 # multiple of n seconds
762 clock = time.time() 762 clock = time.time()