Patchwork [3,of,6] py3: don't use str() to stringify pushloc

login
register
mail settings
Submitter Yuya Nishihara
Date March 4, 2018, 9:41 p.m.
Message ID <9e19942b51da8d09f6a6.1520199698@mimosa>
Download mbox | patch
Permalink /patch/29004/
State Accepted
Headers show

Comments

Yuya Nishihara - March 4, 2018, 9:41 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1520196790 18000
#      Sun Mar 04 15:53:10 2018 -0500
# Node ID 9e19942b51da8d09f6a6eea8dc12b1d7a2c4adab
# Parent  794b80520f0f47171ccb1e2db142e9bff1351cde
py3: don't use str() to stringify pushloc

Patch

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -67,6 +67,7 @@  test-debugbundle.t
 test-debugextensions.t
 test-debugindexdot.t
 test-debugrename.t
+test-default-push.t
 test-diff-binary-file.t
 test-diff-change.t
 test-diff-copy-depth.t
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1757,7 +1757,7 @@  def pushurlpathoption(ui, path, value):
                   'ignoring)\n') % path.name)
         u.fragment = None
 
-    return str(u)
+    return bytes(u)
 
 @pathsuboption('pushrev', 'pushrev')
 def pushrevpathoption(ui, path, value):