D5726: githelp: format with %d if an integer
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Sat Jan 26 18:19:27 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG873a28d7e962: githelp: format with %d if an integer (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5726?vs=13525&id=13533
REVISION DETAIL
https://phab.mercurial-scm.org/D5726
AFFECTED FILES
hgext/githelp.py
CHANGE DETAILS
diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -121,7 +121,12 @@
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:
To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list