##// END OF EJS Templates
py3: use bytes() instead of str()...
Pulkit Goyal -
r36685:bcfc4e3b default
parent child Browse files
Show More
@@ -222,7 +222,7 b' class eolfile(object):'
222 data = ctx[f].data()
222 data = ctx[f].data()
223 if (target == "to-lf" and "\r\n" in data
223 if (target == "to-lf" and "\r\n" in data
224 or target == "to-crlf" and singlelf.search(data)):
224 or target == "to-crlf" and singlelf.search(data)):
225 failed.append((f, target, str(ctx)))
225 failed.append((f, target, bytes(ctx)))
226 break
226 break
227 return failed
227 return failed
228
228
@@ -363,7 +363,7 b' class journalstorage(object):'
363 # empty file, write version first
363 # empty file, write version first
364 f.write(str(storageversion) + '\0')
364 f.write(str(storageversion) + '\0')
365 f.seek(0, os.SEEK_END)
365 f.seek(0, os.SEEK_END)
366 f.write(str(entry) + '\0')
366 f.write(bytes(entry) + '\0')
367
367
368 def filtered(self, namespace=None, name=None):
368 def filtered(self, namespace=None, name=None):
369 """Yield all journal entries with the given namespace or name
369 """Yield all journal entries with the given namespace or name
@@ -780,7 +780,7 b' class queue(object):'
780
780
781 diffopts = self.patchopts(diffopts, patch)
781 diffopts = self.patchopts(diffopts, patch)
782 patchf = self.opener(patch, "w")
782 patchf = self.opener(patch, "w")
783 comments = str(ph)
783 comments = bytes(ph)
784 if comments:
784 if comments:
785 patchf.write(comments)
785 patchf.write(comments)
786 self.printdiff(repo, diffopts, head, n, fp=patchf)
786 self.printdiff(repo, diffopts, head, n, fp=patchf)
General Comments 0
You need to be logged in to leave comments. Login now