[PATCH 01 of 11] revsetlang: fix _quote on int on python3

Augie Fackler raf at durin42.com
Sun Mar 26 22:36:35 UTC 2017


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1490561309 14400
#      Sun Mar 26 16:48:29 2017 -0400
# Node ID 1250b7d77ba41c7ce1500d4c8e5fef921a14f683
# Parent  e86eb75e74ce1b0803c26d86a229b9b711f6d76a
revsetlang: fix _quote on int on python3

Thanks to Yuya for spotting the need.

diff --git a/mercurial/revsetlang.py b/mercurial/revsetlang.py
--- a/mercurial/revsetlang.py
+++ b/mercurial/revsetlang.py
@@ -586,7 +586,7 @@ def _quote(s):
     >>> _quote(1)
     "'1'"
     """
-    return "'%s'" % util.escapestr('%s' % s)
+    return "'%s'" % util.escapestr(pycompat.bytestr(s))
 
 def formatspec(expr, *args):
     '''


More information about the Mercurial-devel mailing list