# HG changeset patch # User Augie Fackler # Date 2018-03-02 16:37:41 # Node ID b755eab7e6774b5fdd6c2b8565f1c44a5f0effc2 # Parent 04e50037d9573dee6cf5d36e353bc08e7cd1130e revset: use %d to turn an int into a bytestr Differential Revision: https://phab.mercurial-scm.org/D2557 diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2061,7 +2061,7 @@ def _orderedlist(repo, subset, x): 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: