py3: byteify sys.argv in gendoc.py
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 20 Dec 2018 18:12:29 -0500
changeset 41030 c0865f3da285
parent 41029 b2de94e59702
child 41031 b53c5651fcf6
py3: byteify sys.argv in gendoc.py
doc/gendoc.py
--- a/doc/gendoc.py	Tue Dec 18 09:34:32 2018 -0800
+++ b/doc/gendoc.py	Thu Dec 20 18:12:29 2018 -0500
@@ -29,6 +29,7 @@
 util.datapath
 from mercurial import (
     commands,
+    encoding,
     extensions,
     help,
     minirst,
@@ -230,7 +231,7 @@
 if __name__ == "__main__":
     doc = b'hg.1.gendoc'
     if len(sys.argv) > 1:
-        doc = sys.argv[1]
+        doc = encoding.strtolocal(sys.argv[1])
 
     ui = uimod.ui.load()
     if doc == b'hg.1.gendoc':