##// END OF EJS Templates
simplemerge: use 3-way markers if mode=='merge3', ignoring number of labels...
Martin von Zweigbergk -
r49387:18a01dce default draft
parent child Browse files
Show More
@@ -80,6 +80,8 b' try:'
80 sys.exit(0)
80 sys.exit(0)
81 if len(args) != 3:
81 if len(args) != 3:
82 raise ParseError(_(b'wrong number of arguments').decode('utf8'))
82 raise ParseError(_(b'wrong number of arguments').decode('utf8'))
83 if len(opts[b'label']) > 2:
84 opts[b'mode'] = b'merge3'
83 local, base, other = args
85 local, base, other = args
84 sys.exit(
86 sys.exit(
85 simplemerge.simplemerge(
87 simplemerge.simplemerge(
@@ -421,14 +421,15 b' def _premerge(repo, fcd, fco, fca, toolc'
421 )
421 )
422
422
423 if premerge:
423 if premerge:
424 if not labels:
425 labels = _defaultconflictlabels
426 if len(labels) < 3:
427 labels.append(b'base')
424 mode = b'merge'
428 mode = b'merge'
425 if premerge in {b'keep-merge3', b'keep-mergediff'}:
429 if premerge == b'keep-mergediff':
426 if not labels:
430 mode = b'mergediff'
427 labels = _defaultconflictlabels
431 elif premerge == b'keep-merge3':
428 if len(labels) < 3:
432 mode = b'merge3'
429 labels.append(b'base')
430 if premerge == b'keep-mergediff':
431 mode = b'mergediff'
432 r = simplemerge.simplemerge(
433 r = simplemerge.simplemerge(
433 ui, fcd, fca, fco, quiet=True, label=labels, mode=mode
434 ui, fcd, fca, fco, quiet=True, label=labels, mode=mode
434 )
435 )
@@ -532,7 +533,9 b' def _imerge3(repo, mynode, fcd, fco, fca'
532 labels = _defaultconflictlabels
533 labels = _defaultconflictlabels
533 if len(labels) < 3:
534 if len(labels) < 3:
534 labels.append(b'base')
535 labels.append(b'base')
535 return _imerge(repo, mynode, fcd, fco, fca, toolconf, backup, labels)
536 return _merge(
537 repo, mynode, fcd, fco, fca, toolconf, backup, labels, b'merge3'
538 )
536
539
537
540
538 @internaltool(
541 @internaltool(
@@ -506,7 +506,7 b' def simplemerge(ui, localctx, basectx, o'
506 extrakwargs = {
506 extrakwargs = {
507 'minimize': True,
507 'minimize': True,
508 }
508 }
509 if name_base is not None:
509 if mode == b'merge3':
510 extrakwargs['base_marker'] = b'|||||||'
510 extrakwargs['base_marker'] = b'|||||||'
511 extrakwargs['name_base'] = name_base
511 extrakwargs['name_base'] = name_base
512 extrakwargs['minimize'] = False
512 extrakwargs['minimize'] = False
General Comments 0
You need to be logged in to leave comments. Login now