tests/mockblackbox.py
author Spencer Baugh <sbaugh@janestreet.com>
Wed, 02 Aug 2023 10:16:33 -0400
changeset 50889 f874342fa568
parent 48966 6000f5b25c9b
child 51749 493034cc3265
permissions -rw-r--r--
rust-matchers: add PatternMatcher This should match the behavior of the Python patternmatcher. We need this for status [FILES] support.

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