comparison mercurial/filemerge.py @ 48604:f970bc616ebc

filemerge: remove unused arguments from `_merge()` Differential Revision: https://phab.mercurial-scm.org/D12014
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 20 Jan 2022 11:17:09 -0800
parents 77e24ee8994b
children a809f1465a76
comparison
equal deleted inserted replaced
48603:77e24ee8994b 48604:f970bc616ebc
462 ) 462 )
463 return False 463 return False
464 return True 464 return True
465 465
466 466
467 def _merge(repo, mynode, fcd, fco, fca, toolconf, backup, labels, mode): 467 def _merge(repo, fcd, fco, fca, labels, mode):
468 """ 468 """
469 Uses the internal non-interactive simple merge algorithm for merging 469 Uses the internal non-interactive simple merge algorithm for merging
470 files. It will fail if there are any conflicts and leave markers in 470 files. It will fail if there are any conflicts and leave markers in
471 the partially merged file. Markers will have two sections, one for each side 471 the partially merged file. Markers will have two sections, one for each side
472 of merge, unless mode equals 'union' which suppresses the markers.""" 472 of merge, unless mode equals 'union' which suppresses the markers."""
497 def _iunion(repo, mynode, fcd, fco, fca, toolconf, backup, labels=None): 497 def _iunion(repo, mynode, fcd, fco, fca, toolconf, backup, labels=None):
498 """ 498 """
499 Uses the internal non-interactive simple merge algorithm for merging 499 Uses the internal non-interactive simple merge algorithm for merging
500 files. It will use both left and right sides for conflict regions. 500 files. It will use both left and right sides for conflict regions.
501 No markers are inserted.""" 501 No markers are inserted."""
502 return _merge( 502 return _merge(repo, fcd, fco, fca, labels, b'union')
503 repo, mynode, fcd, fco, fca, toolconf, backup, labels, b'union'
504 )
505 503
506 504
507 @internaltool( 505 @internaltool(
508 b'merge', 506 b'merge',
509 fullmerge, 507 fullmerge,
517 """ 515 """
518 Uses the internal non-interactive simple merge algorithm for merging 516 Uses the internal non-interactive simple merge algorithm for merging
519 files. It will fail if there are any conflicts and leave markers in 517 files. It will fail if there are any conflicts and leave markers in
520 the partially merged file. Markers will have two sections, one for each side 518 the partially merged file. Markers will have two sections, one for each side
521 of merge.""" 519 of merge."""
522 return _merge( 520 return _merge(repo, fcd, fco, fca, labels, b'merge')
523 repo, mynode, fcd, fco, fca, toolconf, backup, labels, b'merge'
524 )
525 521
526 522
527 @internaltool( 523 @internaltool(
528 b'merge3', 524 b'merge3',
529 fullmerge, 525 fullmerge,
541 side of the merge and one for the base content.""" 537 side of the merge and one for the base content."""
542 if not labels: 538 if not labels:
543 labels = _defaultconflictlabels 539 labels = _defaultconflictlabels
544 if len(labels) < 3: 540 if len(labels) < 3:
545 labels.append(b'base') 541 labels.append(b'base')
546 return _merge( 542 return _merge(repo, fcd, fco, fca, labels, b'merge3')
547 repo, mynode, fcd, fco, fca, toolconf, backup, labels, b'merge3'
548 )
549 543
550 544
551 @internaltool( 545 @internaltool(
552 b'merge3-lie-about-conflicts', 546 b'merge3-lie-about-conflicts',
553 fullmerge, 547 fullmerge,
585 content to the content on the other side. (experimental)""" 579 content to the content on the other side. (experimental)"""
586 if not labels: 580 if not labels:
587 labels = _defaultconflictlabels 581 labels = _defaultconflictlabels
588 if len(labels) < 3: 582 if len(labels) < 3:
589 labels.append(b'base') 583 labels.append(b'base')
590 return _merge( 584 return _merge(repo, fcd, fco, fca, labels, b'mergediff')
591 repo, mynode, fcd, fco, fca, toolconf, backup, labels, b'mergediff'
592 )
593 585
594 586
595 @internaltool(b'merge-local', mergeonly, precheck=_mergecheck) 587 @internaltool(b'merge-local', mergeonly, precheck=_mergecheck)
596 def _imergelocal(repo, mynode, fcd, fco, fca, toolconf, backup, labels=None): 588 def _imergelocal(repo, mynode, fcd, fco, fca, toolconf, backup, labels=None):
597 """ 589 """
598 Like :merge, but resolve all conflicts non-interactively in favor 590 Like :merge, but resolve all conflicts non-interactively in favor
599 of the local `p1()` changes.""" 591 of the local `p1()` changes."""
600 return _merge( 592 return _merge(repo, fcd, fco, fca, labels, b'local')
601 repo, mynode, fcd, fco, fca, toolconf, backup, labels, b'local'
602 )
603 593
604 594
605 @internaltool(b'merge-other', mergeonly, precheck=_mergecheck) 595 @internaltool(b'merge-other', mergeonly, precheck=_mergecheck)
606 def _imergeother(repo, mynode, fcd, fco, fca, toolconf, backup, labels=None): 596 def _imergeother(repo, mynode, fcd, fco, fca, toolconf, backup, labels=None):
607 """ 597 """
608 Like :merge, but resolve all conflicts non-interactively in favor 598 Like :merge, but resolve all conflicts non-interactively in favor
609 of the other `p2()` changes.""" 599 of the other `p2()` changes."""
610 return _merge( 600 return _merge(repo, fcd, fco, fca, labels, b'other')
611 repo, mynode, fcd, fco, fca, toolconf, backup, labels, b'other'
612 )
613 601
614 602
615 @internaltool( 603 @internaltool(
616 b'tagmerge', 604 b'tagmerge',
617 mergeonly, 605 mergeonly,