view tests/mockblackbox.py @ 29960:da75bc36202c

manifest: remove dependency on treeinmem from manifest.add Currently manifest.add uses the treeinmem option to know if it can call fastdelta on the given manifest instance. In a future patch we will be moving add() to be on the manifestrevlog, so it won't have access to the treeinmem option anymore. Instead, let's have it actually check if the given manifest instance supports the fastdelta operation. This also means that if treemanifest or any implementation eventually implements fastdelta(), it will automatically benefit from this code path.
author Durham Goode <durham@fb.com>
date Tue, 20 Sep 2016 12:24:01 -0700
parents 417380aa5bbe
children 043948c84647
line wrap: on
line source

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