infinitepush: opt out of changegroup3 unless explicitly configured
This is currently a no-op, as changegroup3 is disabled by default. But when it
is enabled, it changes the hash names of the bundle files. As I don't use this
extension, I have no idea if that's OK or not. So keep the current default
behavior until we can get more info from actual users, while allowing them to
opt-in for testing purposes.
from mercurial.utils import procutil
# XXX: we should probably offer a devel option to do this in blackbox directly
def getuser():
return b'bob'
def getpid():
return 5000
# mock the date and user apis so the output is always the same
def uisetup(ui):
procutil.getuser = getuser
procutil.getpid = getpid