view tests/mockblackbox.py @ 26566:58880acd2369

bundle2: allow lazily acquiring the lock In the external pushrebase extension, it is valuable to be able to do some work without taking the lock (like running expensive hooks). This enables significantly higher commit throughput. This patch adds an option to lazily acquire the lock. It means that all bundle2 part handlers that require writing to the repo must first call op.gettransction(), when in this mode.
author Durham Goode <durham@fb.com>
date Mon, 05 Oct 2015 16:19:54 -0700
parents 0ead0a07ed9c
children ac49ecb2a897
line wrap: on
line source

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