changeset 36610:b755eab7e677

revset: use %d to turn an int into a bytestr Differential Revision: https://phab.mercurial-scm.org/D2557
author Augie Fackler <augie@google.com>
date Fri, 02 Mar 2018 11:37:41 -0500
parents 04e50037d957
children 27911e0fb50e
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Fri Mar 02 11:37:21 2018 -0500
+++ b/mercurial/revset.py	Fri Mar 02 11:37:41 2018 -0500
@@ -2061,7 +2061,7 @@
         try:
             # fast path for integer revision
             r = int(t)
-            if str(r) != t or r not in cl:
+            if ('%d' % r) != t or r not in cl:
                 raise ValueError
             revs = [r]
         except ValueError: