##// END OF EJS Templates
simplemerge: write output only once it's complete...
Martin von Zweigbergk -
r46716:a771ffc3 default
parent child Browse files
Show More
@@ -499,14 +499,9 b' def simplemerge(ui, localctx, basectx, o'
499 extrakwargs[b'name_base'] = name_base
499 extrakwargs[b'name_base'] = name_base
500 extrakwargs[b'minimize'] = False
500 extrakwargs[b'minimize'] = False
501
501
502 lines = []
502 lines = m3.merge_lines(
503 for line in m3.merge_lines(
504 name_a=name_a, name_b=name_b, **pycompat.strkwargs(extrakwargs)
503 name_a=name_a, name_b=name_b, **pycompat.strkwargs(extrakwargs)
505 ):
504 )
506 if opts.get('print'):
507 ui.fout.write(line)
508 else:
509 lines.append(line)
510
505
511 # merge flags if necessary
506 # merge flags if necessary
512 flags = localctx.flags()
507 flags = localctx.flags()
@@ -518,8 +513,10 b' def simplemerge(ui, localctx, basectx, o'
518 addedflags = (localflags ^ otherflags) - baseflags
513 addedflags = (localflags ^ otherflags) - baseflags
519 flags = b''.join(sorted(commonflags | addedflags))
514 flags = b''.join(sorted(commonflags | addedflags))
520
515
521 if not opts.get('print'):
516 mergedtext = b''.join(lines)
522 mergedtext = b''.join(lines)
517 if opts.get('print'):
518 ui.fout.write(mergedtext)
519 else:
523 localctx.write(mergedtext, flags)
520 localctx.write(mergedtext, flags)
524
521
525 if m3.conflicts and not mode == b'union':
522 if m3.conflicts and not mode == b'union':
General Comments 0
You need to be logged in to leave comments. Login now