tests/mockblackbox.py
author Durham Goode <durham@fb.com>
Mon, 29 Aug 2016 17:48:14 -0700
changeset 29892 8a84347b9907
parent 28943 417380aa5bbe
child 32450 043948c84647
permissions -rw-r--r--
manifest: call m1.load and m2.load before writing a subtree As part of refactoring the manifest, certain test cases started failing because writesubtrees was called with p1 and p2 manifests that had not been loaded (so accessing m1._dirs resulted in an empty set). Let's call _load on these before attempting to access _dirs. This was caught by tests when future patches were applied.

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