Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 36554:06f59bdde626
py3: use pycompat.bytestr() to convert None to bytes
Differential Revision: https://phab.mercurial-scm.org/D2533
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 02 Mar 2018 04:47:56 +0530 |
parents | c28b6d609c47 |
children | aff5996f3043 |
comparison
equal
deleted
inserted
replaced
36553:24897a9d18ac | 36554:06f59bdde626 |
---|---|
189 def capabilities(self): | 189 def capabilities(self): |
190 return self._caps | 190 return self._caps |
191 | 191 |
192 def debugwireargs(self, one, two, three=None, four=None, five=None): | 192 def debugwireargs(self, one, two, three=None, four=None, five=None): |
193 """Used to test argument passing over the wire""" | 193 """Used to test argument passing over the wire""" |
194 return "%s %s %s %s %s" % (one, two, three, four, five) | 194 return "%s %s %s %s %s" % (one, two, pycompat.bytestr(three), |
195 pycompat.bytestr(four), | |
196 pycompat.bytestr(five)) | |
195 | 197 |
196 def getbundle(self, source, heads=None, common=None, bundlecaps=None, | 198 def getbundle(self, source, heads=None, common=None, bundlecaps=None, |
197 **kwargs): | 199 **kwargs): |
198 chunks = exchange.getbundlechunks(self._repo, source, heads=heads, | 200 chunks = exchange.getbundlechunks(self._repo, source, heads=heads, |
199 common=common, bundlecaps=bundlecaps, | 201 common=common, bundlecaps=bundlecaps, |
2229 self.hook('listkeys', namespace=namespace, values=values) | 2231 self.hook('listkeys', namespace=namespace, values=values) |
2230 return values | 2232 return values |
2231 | 2233 |
2232 def debugwireargs(self, one, two, three=None, four=None, five=None): | 2234 def debugwireargs(self, one, two, three=None, four=None, five=None): |
2233 '''used to test argument passing over the wire''' | 2235 '''used to test argument passing over the wire''' |
2234 return "%s %s %s %s %s" % (one, two, three, four, five) | 2236 return "%s %s %s %s %s" % (one, two, pycompat.bytestr(three), |
2237 pycompat.bytestr(four), | |
2238 pycompat.bytestr(five)) | |
2235 | 2239 |
2236 def savecommitmessage(self, text): | 2240 def savecommitmessage(self, text): |
2237 fp = self.vfs('last-message.txt', 'wb') | 2241 fp = self.vfs('last-message.txt', 'wb') |
2238 try: | 2242 try: |
2239 fp.write(text) | 2243 fp.write(text) |