Patchwork D2143: py3: use bytes() to cast context instances

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 1:40 a.m.
Message ID <ac6a8a54b8fa610fae70a3fbf269cd3d@localhost.localdomain>
Download mbox | patch
Permalink /patch/27614/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 1:40 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4fe2041007ed: py3: use bytes() to cast context instances (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2143?vs=5428&id=5443

REVISION DETAIL
  https://phab.mercurial-scm.org/D2143

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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]