revlog: simplify rawtext return value
We're always returning a tuple even though only the raw text is being used,
and we're rebuilding another tuple again higher.
As a bonus, this will remove one tuple creation and deletion
per `raw_text` call, hence fewer gc calls, etc.
import os
import time
class mocktime:
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
def uisetup(ui):
time.time = mocktime(os.environ.get('MOCKTIME', '0.1'))