Mercurial > hg
comparison mercurial/formatter.py @ 34256:ebe3d0095c69
py3: convert system strings to bytes in doctest of formatter.py
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 17 Sep 2017 12:39:53 +0900 |
parents | d6af8da4a3b8 |
children | ebf2c1b0c70c |
comparison
equal
deleted
inserted
replaced
34255:d6af8da4a3b8 | 34256:ebe3d0095c69 |
---|---|
46 ... from . import ui as uimod | 46 ... from . import ui as uimod |
47 ... ui = uimod.ui() | 47 ... ui = uimod.ui() |
48 ... ui.verbose = verbose | 48 ... ui.verbose = verbose |
49 ... ui.pushbuffer() | 49 ... ui.pushbuffer() |
50 ... try: | 50 ... try: |
51 ... return fn(ui, ui.formatter(fn.__name__, opts)) | 51 ... return fn(ui, ui.formatter(pycompat.sysbytes(fn.__name__), |
52 ... pycompat.byteskwargs(opts))) | |
52 ... finally: | 53 ... finally: |
53 ... print(pycompat.sysstr(ui.popbuffer()), end='') | 54 ... print(pycompat.sysstr(ui.popbuffer()), end='') |
54 | 55 |
55 Basic example: | 56 Basic example: |
56 | 57 |