changeset 43370:7f56b0cbd245 stable

py3: render message about conflicts in chistedit code Now you can also reorder commits that (potentially) conflict. Just don't try to confirm the changes yet (because then it crashes). Differential Revision: https://phab.mercurial-scm.org/D7183
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 31 Oct 2019 15:02:03 -0700
parents 8aa54c5a2577
children 85ab79bc7dab
files hgext/histedit.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Thu Oct 31 14:46:17 2019 -0700
+++ b/hgext/histedit.py	Thu Oct 31 15:02:03 2019 -0700
@@ -1432,7 +1432,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'
@@ -1471,7 +1471,9 @@
 
         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:]):