[PATCH 3 of 5] py3: byteify gendoc.py
Yuya Nishihara
yuya at tcha.org
Thu Dec 20 06:37:26 EST 2018
On Wed, 19 Dec 2018 17:39:18 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1545185847 18000
> # Tue Dec 18 21:17:27 2018 -0500
> # Node ID 7935c7f28f9d098fa76d207e70455260a42e3190
> # Parent c96002c3968f7f74bfe68c5bacb1ba717a58e290
> py3: byteify gendoc.py
> if __name__ == "__main__":
> - doc = 'hg.1.gendoc'
> + doc = b'hg.1.gendoc'
> if len(sys.argv) > 1:
> doc = sys.argv[1]
>
> ui = uimod.ui.load()
> - if doc == 'hg.1.gendoc':
> + if doc == b'hg.1.gendoc':
> showdoc(ui)
> else:
> showtopic(ui, sys.argv[1])
sys.argv[n] is a unicode string on Python 3. We'll need to convert it back
to bytes.
More information about the Mercurial-devel
mailing list