Mercurial > hg
comparison hgext/mq.py @ 35948:f87641bf4d23
py3: use bytes instead of str
Differential Revision: https://phab.mercurial-scm.org/D2076
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 07 Feb 2018 13:47:03 +0530 |
parents | e35616bb6ede |
children | 55e8efa2451a |
comparison
equal
deleted
inserted
replaced
35947:a36d3c8a0e41 | 35948:f87641bf4d23 |
---|---|
1270 ph.setparent(hex(nctx.p1().node())) | 1270 ph.setparent(hex(nctx.p1().node())) |
1271 msg = nctx.description().strip() | 1271 msg = nctx.description().strip() |
1272 if msg == defaultmsg.strip(): | 1272 if msg == defaultmsg.strip(): |
1273 msg = '' | 1273 msg = '' |
1274 ph.setmessage(msg) | 1274 ph.setmessage(msg) |
1275 p.write(str(ph)) | 1275 p.write(bytes(ph)) |
1276 if commitfiles: | 1276 if commitfiles: |
1277 parent = self.qparents(repo, n) | 1277 parent = self.qparents(repo, n) |
1278 if inclsubs: | 1278 if inclsubs: |
1279 self.putsubstate2changes(substatestate, changes) | 1279 self.putsubstate2changes(substatestate, changes) |
1280 chunks = patchmod.diff(repo, node1=parent, node2=n, | 1280 chunks = patchmod.diff(repo, node1=parent, node2=n, |
1851 c = [list(x) for x in refreshchanges] | 1851 c = [list(x) for x in refreshchanges] |
1852 if inclsubs: | 1852 if inclsubs: |
1853 self.putsubstate2changes(substatestate, c) | 1853 self.putsubstate2changes(substatestate, c) |
1854 chunks = patchmod.diff(repo, patchparent, | 1854 chunks = patchmod.diff(repo, patchparent, |
1855 changes=c, opts=diffopts) | 1855 changes=c, opts=diffopts) |
1856 comments = str(ph) | 1856 comments = bytes(ph) |
1857 if comments: | 1857 if comments: |
1858 patchf.write(comments) | 1858 patchf.write(comments) |
1859 for chunk in chunks: | 1859 for chunk in chunks: |
1860 patchf.write(chunk) | 1860 patchf.write(chunk) |
1861 patchf.close() | 1861 patchf.close() |