revset: use %d to turn an int into a bytestr
authorAugie Fackler <augie@google.com>
Fri, 02 Mar 2018 11:37:41 -0500
changeset 36610 b755eab7e677
parent 36609 04e50037d957
child 36611 27911e0fb50e
revset: use %d to turn an int into a bytestr Differential Revision: https://phab.mercurial-scm.org/D2557
mercurial/revset.py
--- 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: