Show More
@@ -19,12 +19,10 b'' | |||
|
19 | 19 | from __future__ import absolute_import |
|
20 | 20 | |
|
21 | 21 | from .i18n import _ |
|
22 | from .node import nullrev | |
|
23 | 22 | from . import ( |
|
24 | 23 | error, |
|
25 | 24 | mdiff, |
|
26 | 25 | pycompat, |
|
27 | util, | |
|
28 | 26 | ) |
|
29 | 27 | from .utils import stringutil |
|
30 | 28 | |
@@ -424,12 +422,6 b' def _picklabels(defaults, overrides):' | |||
|
424 | 422 | return result |
|
425 | 423 | |
|
426 | 424 | |
|
427 | def is_not_null(ctx): | |
|
428 | if not util.safehasattr(ctx, "node"): | |
|
429 | return False | |
|
430 | return ctx.rev() != nullrev | |
|
431 | ||
|
432 | ||
|
433 | 425 | def _mergediff(m3, name_a, name_b, name_base): |
|
434 | 426 | lines = [] |
|
435 | 427 | conflicts = False |
@@ -546,21 +538,13 b' def simplemerge(ui, localctx, basectx, o' | |||
|
546 | 538 | ) |
|
547 | 539 | conflicts = m3.conflicts and not mode == b'union' |
|
548 | 540 | |
|
549 | # merge flags if necessary | |
|
550 | flags = localctx.flags() | |
|
551 | localflags = set(pycompat.iterbytestr(flags)) | |
|
552 | otherflags = set(pycompat.iterbytestr(otherctx.flags())) | |
|
553 | if is_not_null(basectx) and localflags != otherflags: | |
|
554 | baseflags = set(pycompat.iterbytestr(basectx.flags())) | |
|
555 | commonflags = localflags & otherflags | |
|
556 | addedflags = (localflags ^ otherflags) - baseflags | |
|
557 | flags = b''.join(sorted(commonflags | addedflags)) | |
|
558 | ||
|
559 | 541 | mergedtext = b''.join(lines) |
|
560 | 542 | if opts.get('print'): |
|
561 | 543 | ui.fout.write(mergedtext) |
|
562 | 544 | else: |
|
563 |
localctx. |
|
|
545 | # localctx.flags() already has the merged flags (done in | |
|
546 | # mergestate.resolve()) | |
|
547 | localctx.write(mergedtext, localctx.flags()) | |
|
564 | 548 | |
|
565 | 549 | if conflicts: |
|
566 | 550 | return 1 |
General Comments 0
You need to be logged in to leave comments.
Login now