Mercurial > hg
comparison doc/gendoc.py @ 41030:c0865f3da285
py3: byteify sys.argv in gendoc.py
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 20 Dec 2018 18:12:29 -0500 |
parents | e10641c48fa7 |
children | 2eeef8e577ac |
comparison
equal
deleted
inserted
replaced
41029:b2de94e59702 | 41030:c0865f3da285 |
---|---|
27 # calling _(). | 27 # calling _(). |
28 from mercurial import util | 28 from mercurial import util |
29 util.datapath | 29 util.datapath |
30 from mercurial import ( | 30 from mercurial import ( |
31 commands, | 31 commands, |
32 encoding, | |
32 extensions, | 33 extensions, |
33 help, | 34 help, |
34 minirst, | 35 minirst, |
35 pycompat, | 36 pycompat, |
36 ui as uimod, | 37 ui as uimod, |
228 return set(extensions.enabled().keys()) | set(extensions.disabled().keys()) | 229 return set(extensions.enabled().keys()) | set(extensions.disabled().keys()) |
229 | 230 |
230 if __name__ == "__main__": | 231 if __name__ == "__main__": |
231 doc = b'hg.1.gendoc' | 232 doc = b'hg.1.gendoc' |
232 if len(sys.argv) > 1: | 233 if len(sys.argv) > 1: |
233 doc = sys.argv[1] | 234 doc = encoding.strtolocal(sys.argv[1]) |
234 | 235 |
235 ui = uimod.ui.load() | 236 ui = uimod.ui.load() |
236 if doc == b'hg.1.gendoc': | 237 if doc == b'hg.1.gendoc': |
237 showdoc(ui) | 238 showdoc(ui) |
238 else: | 239 else: |