Patchwork D2412: py3: use "%d" for integers instead of "%s"

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 9:41 a.m.
Message ID <differential-rev-PHID-DREV-3sqcvuglgtxt2wzhffjv-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28305/
State Superseded
Headers show

Comments

phabricator - Feb. 24, 2018, 9:41 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  util.parsedate() returns a tuple of integers. Writing this patch, I wish we had
  some type hinting.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2412

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1265,7 +1265,7 @@ 
                     if user:
                         ph.setuser(user)
                     if date:
-                        ph.setdate('%s %s' % date)
+                        ph.setdate('%d %d' % date)
                     ph.setparent(hex(nctx.p1().node()))
                     msg = nctx.description().strip()
                     if msg == defaultmsg.strip():