tests/mockblackbox.py
author Rapha?l Gom?s <rgomes@octobus.net>
Tue, 23 Jul 2024 10:02:46 +0200
changeset 51696 7f0cb9ee0534
parent 51686 493034cc3265
child 51699 ca7bde5dbafb
permissions -rw-r--r--
Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.

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