##// END OF EJS Templates
simplemerge: rewrite flag merging loop as expression...
Yuya Nishihara -
r45475:4bb0ea78 default
parent child Browse files
Show More
@@ -517,11 +517,9 b' def simplemerge(ui, localctx, basectx, o'
517 otherflags = set(pycompat.iterbytestr(otherctx.flags()))
517 otherflags = set(pycompat.iterbytestr(otherctx.flags()))
518 if is_not_null(basectx) and localflags != otherflags:
518 if is_not_null(basectx) and localflags != otherflags:
519 baseflags = set(pycompat.iterbytestr(basectx.flags()))
519 baseflags = set(pycompat.iterbytestr(basectx.flags()))
520 flags = localflags & otherflags
520 commonflags = localflags & otherflags
521 for f in localflags.symmetric_difference(otherflags):
521 addedflags = (localflags ^ otherflags) - baseflags
522 if f not in baseflags:
522 flags = b''.join(sorted(commonflags | addedflags))
523 flags.add(f)
524 flags = b''.join(sorted(flags))
525
523
526 if not opts.get(b'print'):
524 if not opts.get(b'print'):
527 localctx.write(mergedtext, flags)
525 localctx.write(mergedtext, flags)
General Comments 0
You need to be logged in to leave comments. Login now