Patchwork [2,of,6] py3: fix dumbhttp.py to convert --daemon-postexec arguments back to bytes

login
register
mail settings
Submitter Yuya Nishihara
Date July 8, 2018, 12:30 p.m.
Message ID <e46c3b6a47b5178db472.1531053043@mimosa>
Download mbox | patch
Permalink /patch/32688/
State Accepted
Headers show

Comments

Yuya Nishihara - July 8, 2018, 12:30 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1531035940 -32400
#      Sun Jul 08 16:45:40 2018 +0900
# Node ID e46c3b6a47b5178db472fdc9bb2ce6b56c6322e3
# Parent  21be76e071488bd19482d75222bdced632425de4
py3: fix dumbhttp.py to convert --daemon-postexec arguments back to bytes

Patch

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -15,6 +15,7 @@  test-audit-subrepo.t
 test-automv.t
 test-backout.t
 test-backwards-remove.t
+test-bad-pull.t
 test-basic.t
 test-bheads.t
 test-bisect.t
@@ -53,6 +54,7 @@  test-clone-cgi.t
 test-clone-pull-corruption.t
 test-clone-r.t
 test-clone-update-order.t
+test-clonebundles.t
 test-commit-amend.t
 test-commit-interactive.t
 test-commit-multiple.t
diff --git a/tests/dumbhttp.py b/tests/dumbhttp.py
--- a/tests/dumbhttp.py
+++ b/tests/dumbhttp.py
@@ -13,6 +13,7 @@  import socket
 import sys
 
 from mercurial import (
+    encoding,
     pycompat,
     server,
     util,
@@ -66,7 +67,8 @@  if __name__ == '__main__':
 
     opts = {b'pid_file': options.pid,
             b'daemon': not options.foreground,
-            b'daemon_postexec': options.daemon_postexec}
+            b'daemon_postexec': pycompat.rapply(encoding.strtolocal,
+                                                options.daemon_postexec)}
     service = simplehttpservice(options.host, options.port)
     runargs = [sys.executable, __file__] + sys.argv[1:]
     runargs = [pycompat.fsencode(a) for a in runargs]