Patchwork py3: byteify one more sys.argv in gendoc.py

login
register
mail settings
Submitter Matt Harbison
Date Dec. 22, 2018, 6:12 a.m.
Message ID <8a9bc5db77fdd862b4a0.1545459177@Envy>
Download mbox | patch
Permalink /patch/37309/
State Accepted
Headers show

Comments

Matt Harbison - Dec. 22, 2018, 6:12 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1545455139 18000
#      Sat Dec 22 00:05:39 2018 -0500
# Node ID 8a9bc5db77fdd862b4a00ace2cc6821a92efb041
# Parent  366889e199653dad6052970c48a2bd2ae62e5e1d
py3: byteify one more sys.argv in gendoc.py
Yuya Nishihara - Dec. 22, 2018, 7:05 a.m.
On Sat, 22 Dec 2018 01:12:57 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1545455139 18000
> #      Sat Dec 22 00:05:39 2018 -0500
> # Node ID 8a9bc5db77fdd862b4a00ace2cc6821a92efb041
> # Parent  366889e199653dad6052970c48a2bd2ae62e5e1d
> py3: byteify one more sys.argv in gendoc.py

Queued, thanks.

Patch

diff --git a/doc/gendoc.py b/doc/gendoc.py
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -237,4 +237,4 @@  if __name__ == "__main__":
     if doc == b'hg.1.gendoc':
         showdoc(ui)
     else:
-        showtopic(ui, sys.argv[1])
+        showtopic(ui, encoding.strtolocal(sys.argv[1]))