comparison hgext/mq.py @ 36389:469c7e146c8f

py3: use "%d" for integers instead of "%s" util.parsedate() returns a tuple of integers. Writing this patch, I wish we had some type hinting. Differential Revision: https://phab.mercurial-scm.org/D2412
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 24 Feb 2018 01:21:22 +0530
parents 6f6063553502
children c6061cadb400
comparison
equal deleted inserted replaced
36388:6f6063553502 36389:469c7e146c8f
1263 nctx = repo[n] 1263 nctx = repo[n]
1264 ph = patchheader(self.join(patchfn), self.plainmode) 1264 ph = patchheader(self.join(patchfn), self.plainmode)
1265 if user: 1265 if user:
1266 ph.setuser(user) 1266 ph.setuser(user)
1267 if date: 1267 if date:
1268 ph.setdate('%s %s' % date) 1268 ph.setdate('%d %d' % date)
1269 ph.setparent(hex(nctx.p1().node())) 1269 ph.setparent(hex(nctx.p1().node()))
1270 msg = nctx.description().strip() 1270 msg = nctx.description().strip()
1271 if msg == defaultmsg.strip(): 1271 if msg == defaultmsg.strip():
1272 msg = '' 1272 msg = ''
1273 ph.setmessage(msg) 1273 ph.setmessage(msg)