tests/mockblackbox.py
author Phil Cohen <phillco@fb.com>
Thu, 14 Sep 2017 13:14:32 -0700
changeset 34309 440ece43024c
parent 32450 043948c84647
child 36143 f49c3ee5b02f
permissions -rw-r--r--
merge: allow a custom working context to be passed to update This will allow anyone to enable the first in-menmory merge milestone by wrapping merge.update in an extension and creating an overlayworkingctx. Differential Revision: https://phab.mercurial-scm.org/D682

from __future__ import absolute_import
from mercurial import (
    util,
)

# XXX: we should probably offer a devel option to do this in blackbox directly
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.getuser = getuser
    util.getpid = getpid