view tests/mockblackbox.py @ 30694:5289fd78017a

cmdutil: extract a _changesetlabels function out of changeset_printer._show() There is a common logic in changeset_printer and in the summary command for labelling a changeset. This prepares extension of changeset's labels with evolution "troubles" information that would show up in both log and summary outputs. Ultimately, both would use this function.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Tue, 03 Jan 2017 10:56:41 +0100
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