# HG changeset patch # User Gregory Szorc # Date 2019-01-26 22:16:34 # Node ID 873a28d7e962e933f3f67dd263369c35450035f6 # Parent 031d91623fdcfaa2289ac915cb7cb4b671fd2e60 githelp: format with %d if an integer Python 3 doesn't allow us to format an int with %s like Python 2 did. So handle that. Differential Revision: https://phab.mercurial-scm.org/D5726 diff --git a/hgext/githelp.py b/hgext/githelp.py --- a/hgext/githelp.py +++ b/hgext/githelp.py @@ -121,7 +121,12 @@ class Command(object): for k, values in sorted(self.opts.iteritems()): for v in values: if v: - cmd += " %s %s" % (k, v) + if isinstance(v, int): + fmt = ' %s %d' + else: + fmt = ' %s %s' + + cmd += fmt % (k, v) else: cmd += " %s" % (k,) if self.args: