D11102: testing: do not stop waiting if timeout is 0 (issue6541)
ced (Cédric Krier)
phabricator at mercurial-scm.org
Sat Jul 17 10:48:11 UTC 2021
ced created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11102
AFFECTED FILES
mercurial/testing/__init__.py
CHANGE DETAILS
diff --git a/mercurial/testing/__init__.py b/mercurial/testing/__init__.py
--- a/mercurial/testing/__init__.py
+++ b/mercurial/testing/__init__.py
@@ -27,7 +27,7 @@
timeout *= _timeout_factor()
start = time.time()
while not os.path.exists(path):
- if time.time() - start > timeout:
+ if timeout and time.time() - start > timeout:
raise RuntimeError(b"timed out waiting for file: %s" % path)
time.sleep(0.01)
To: ced, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list