--- a/mercurial/simplemerge.py Tue Jun 02 21:39:07 2020 +0900
+++ b/mercurial/simplemerge.py Tue Jun 02 21:40:49 2020 +0900
@@ -451,11 +451,6 @@
return result
-def _bytes_to_set(b):
- """turns a multiple bytes (usually flags) into a set of individual byte"""
- return set(b[x : x + 1] for x in range(len(b)))
-
-
def is_not_null(ctx):
if not util.safehasattr(ctx, "node"):
return False
@@ -518,10 +513,10 @@
# merge flags if necessary
flags = localctx.flags()
- localflags = _bytes_to_set(flags)
- otherflags = _bytes_to_set(otherctx.flags())
+ localflags = set(pycompat.iterbytestr(flags))
+ otherflags = set(pycompat.iterbytestr(otherctx.flags()))
if is_not_null(basectx) and localflags != otherflags:
- baseflags = _bytes_to_set(basectx.flags())
+ baseflags = set(pycompat.iterbytestr(basectx.flags()))
flags = localflags & otherflags
for f in localflags.symmetric_difference(otherflags):
if f not in baseflags: