changeset 31351:5da0c7888dc4

context: use portable construction to verify int parsing
author Augie Fackler <augie@google.com>
date Sun, 12 Mar 2017 00:43:47 -0500
parents 2eee8ad77726
children 667e88568087
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sun Mar 12 01:59:23 2017 -0500
+++ b/mercurial/context.py	Sun Mar 12 00:43:47 2017 -0500
@@ -454,7 +454,7 @@
 
             try:
                 r = int(changeid)
-                if str(r) != changeid:
+                if '%d' % r != changeid:
                     raise ValueError
                 l = len(repo.changelog)
                 if r < 0: