tests/mockblackbox.py
author Pierre-Yves David <pierre-yves.david@fb.com>
Sat, 23 May 2015 21:18:47 -0700
changeset 25300 678d0bfdd31a
parent 24705 0ead0a07ed9c
child 28028 ac49ecb2a897
permissions -rw-r--r--
repair: forbid strip from inside a transaction Stripping inside a transaction will (at best) crash or (at worst) result in very unexpected results. We explicitly forbid it early.

from mercurial import util

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

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