##// END OF EJS Templates
errors: stop passing non-strings to Abort's constructor...
errors: stop passing non-strings to Abort's constructor The next patch will change `Abort`'s constructor and `__bytes__` functions and they will start assuming that the first argument is the messages as `bytes`. Differential Revision: https://phab.mercurial-scm.org/D9178

File last commit:

r43346:2372284d default
r46273:a736ab68 default
Show More
mocktime.py
20 lines | 448 B | text/x-python | PythonLexer
Jun Wu
test-patchbomb: use mocktime...
r34317 from __future__ import absolute_import
import os
import time
Augie Fackler
formatting: blacken the codebase...
r43346
Jun Wu
test-patchbomb: use mocktime...
r34317 class mocktime(object):
def __init__(self, increment):
self.time = 0
self.increment = [float(s) for s in increment.split()]
self.pos = 0
def __call__(self):
self.time += self.increment[self.pos % len(self.increment)]
self.pos += 1
return self.time
Augie Fackler
formatting: blacken the codebase...
r43346
Jun Wu
test-patchbomb: use mocktime...
r34317 def uisetup(ui):
time.time = mocktime(os.environ.get('MOCKTIME', '0.1'))