Mercurial > hg
changeset 36042:4fe2041007ed
py3: use bytes() to cast context instances
__str__ and __bytes__ are both implemented on context types. However,
__str__ behaves differently on Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D2143
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 13:09:16 -0800 |
parents | e3674c2a585c |
children | 223ed0b53f08 |
files | mercurial/merge.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Feb 11 13:06:01 2018 -0800 +++ b/mercurial/merge.py Sun Feb 11 13:09:16 2018 -0800 @@ -973,14 +973,14 @@ # Rename all local conflicting files that have not been deleted. for p in localconflicts: if p not in deletedfiles: - ctxname = str(wctx).rstrip('+') + ctxname = bytes(wctx).rstrip('+') pnew = util.safename(p, ctxname, wctx, set(actions.keys())) actions[pnew] = ('pr', (p,), "local path conflict") actions[p] = ('p', (pnew, 'l'), "path conflict") if remoteconflicts: # Check if all files in the conflicting directories have been removed. - ctxname = str(mctx).rstrip('+') + ctxname = bytes(mctx).rstrip('+') for f, p in _filesindirs(repo, mf, remoteconflicts): if f not in deletedfiles: m, args, msg = actions[p]