tests/mockblackbox.py
author Jun Wu <quark@fb.com>
Wed, 09 Mar 2016 01:17:02 +0000
changeset 28452 0bb01c8754bf
parent 28028 ac49ecb2a897
child 28943 417380aa5bbe
permissions -rw-r--r--
serve: add chdir command for --daemon-postexec For chgserver, it probably needs a chdir to /. This patch adds chdir command support for --daemon-postexec so chg client can make use of it.

from mercurial import util

def makedate():
    return 0, 0
def getuser():
    return 'bob'
def getpid():
    return 5000

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