comparison hgext/mq.py @ 36668:e77cee5de1c7

py3: use b"%d" to covert integer to bytes instead of str Differential Revision: https://phab.mercurial-scm.org/D2618
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 02 Mar 2018 07:17:06 +0530
parents bcfc4e3b6548
children f0b6fbea00cf
comparison
equal deleted inserted replaced
36667:bcfc4e3b6548 36668:e77cee5de1c7
1930 applied = set([p.name for p in self.applied]) 1930 applied = set([p.name for p in self.applied])
1931 if length is None: 1931 if length is None:
1932 length = len(self.series) - start 1932 length = len(self.series) - start
1933 if not missing: 1933 if not missing:
1934 if self.ui.verbose: 1934 if self.ui.verbose:
1935 idxwidth = len(str(start + length - 1)) 1935 idxwidth = len("%d" % (start + length - 1))
1936 for i in xrange(start, start + length): 1936 for i in xrange(start, start + length):
1937 patch = self.series[i] 1937 patch = self.series[i]
1938 if patch in applied: 1938 if patch in applied:
1939 char, state = 'A', 'applied' 1939 char, state = 'A', 'applied'
1940 elif self.pushable(i)[0]: 1940 elif self.pushable(i)[0]:
2096 def appliedname(self, index): 2096 def appliedname(self, index):
2097 pname = self.applied[index].name 2097 pname = self.applied[index].name
2098 if not self.ui.verbose: 2098 if not self.ui.verbose:
2099 p = pname 2099 p = pname
2100 else: 2100 else:
2101 p = str(self.series.index(pname)) + " " + pname 2101 p = ("%d" % self.series.index(pname)) + " " + pname
2102 return p 2102 return p
2103 2103
2104 def qimport(self, repo, files, patchname=None, rev=None, existing=None, 2104 def qimport(self, repo, files, patchname=None, rev=None, existing=None,
2105 force=None, git=False): 2105 force=None, git=False):
2106 def checkseries(patchname): 2106 def checkseries(patchname):