Patchwork D7183: py3: render message about conflicts in chistedit code

login
register
mail settings
Submitter phabricator
Date Nov. 1, 2019, 5:31 p.m.
Message ID <51aa57003f1366f3795813c80039cdad@localhost.localdomain>
Download mbox | patch
Permalink /patch/42670/
State Not Applicable
Headers show

Comments

phabricator - Nov. 1, 2019, 5:31 p.m.
Closed by commit rHG9acc86e812b8: py3: render message about conflicts in chistedit code (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7183?vs=17438&id=17459

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7183/new/

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




To: martinvonz, durin42, #hg-reviewers, indygreg
Cc: mercurial-devel
Yuya Nishihara - Nov. 2, 2019, 2:37 a.m.
>          if len(conflicts) > 0:
> -            conflictstr = b','.join(map(lambda r: str(r.ctx), conflicts))
> +            conflictstr = b','.join(map(lambda r: r.ctx.hex(), conflicts))

Seems okay, but it was previously a short hash.
phabricator - Nov. 2, 2019, 2:41 a.m.
yuja added a comment.


  >   if len(conflicts) > 0:
  >
  > - conflictstr = b','.join(map(lambda r: str(r.ctx), conflicts))
  >
  > +            conflictstr = b','.join(map(lambda r: r.ctx.hex(), conflicts))
  
  Seems okay, but it was previously a short hash.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7183/new/

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

To: martinvonz, durin42, #hg-reviewers, indygreg
Cc: yuja, mercurial-devel

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1427,7 +1427,7 @@ 
 
         conflicts = rule.conflicts
         if len(conflicts) > 0:
-            conflictstr = b','.join(map(lambda r: str(r.ctx), conflicts))
+            conflictstr = b','.join(map(lambda r: r.ctx.hex(), conflicts))
             conflictstr = b"changed files overlap with %s" % conflictstr
         else:
             conflictstr = b'no overlap'
@@ -1466,7 +1466,7 @@ 
 
         conflicts = [r.ctx for r in rules if r.conflicts]
         if len(conflicts) > 0:
-            line = b"potential conflict in %s" % b','.join(map(str, conflicts))
+            line = b"potential conflict in %s" % b','.join(map(pycompat.bytestr, conflicts))
             addln(rulesscr, -1, 0, line, curses.color_pair(COLOR_WARN))
 
         for y, rule in enumerate(rules[start:]):