Mercurial > hg
comparison hgext/eol.py @ 36667:bcfc4e3b6548
py3: use bytes() instead of str()
Differential Revision: https://phab.mercurial-scm.org/D2617
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 02 Mar 2018 07:16:33 +0530 |
parents | 60802bba1090 |
children | f0b6fbea00cf |
comparison
equal
deleted
inserted
replaced
36666:d79d68bb9f7c | 36667:bcfc4e3b6548 |
---|---|
220 continue | 220 continue |
221 target = self._encode[key] | 221 target = self._encode[key] |
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 |
229 def parseeol(ui, repo, nodes): | 229 def parseeol(ui, repo, nodes): |
230 try: | 230 try: |