tests/mockblackbox.py
author liscju <piotr.listkiewicz@gmail.com>
Tue, 24 May 2016 23:36:27 +0200
branchstable
changeset 29229 89bba2beb03e
parent 28943 417380aa5bbe
child 32412 043948c84647
permissions -rw-r--r--
bookmarks: allow pushing active bookmark on new remote head (issue5236) Before 'hg push -B .' on new remote head complained with: abort: push creates new remote head ... It was because _nowarnheads was not expanding active bookmark name, so it didn't add active bookmark "proper" name to no warn heads list.

from __future__ import absolute_import
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