tests/mockblackbox.py
author Raphaël Gomès <rgomes@octobus.net>
Wed, 25 May 2022 18:29:21 +0200
branchstable
changeset 49375 6b04f702c501
parent 48966 6000f5b25c9b
child 51749 493034cc3265
permissions -rw-r--r--
rust: remove excessive calls to `#[timed]` This makes trace output *really* noisy and is only useful in case you want to take a look at a single revlog. This is easy to add back on a case-by-case basis and does not need to stay with the more permanent timers.

from mercurial.utils import procutil

# XXX: we should probably offer a devel option to do this in blackbox directly
def getuser():
    return b'bob'


def getpid():
    return 5000


# mock the date and user apis so the output is always the same
def uisetup(ui):
    procutil.getuser = getuser
    procutil.getpid = getpid