##// END OF EJS Templates
mergeresult: rename _actions to _filemapping...
Pulkit Goyal -
r45848:26fa2eeb default
parent child Browse files
Show More
@@ -557,7 +557,7 b' class mergeresult(object):'
557 557
558 558 def __init__(self):
559 559 """
560 actions: dict of filename as keys and action related info as values
560 filemapping: dict of filename as keys and action related info as values
561 561 diverge: mapping of source name -> list of dest name for
562 562 divergent renames
563 563 renamedelete: mapping of source name -> list of destinations for files
@@ -565,7 +565,7 b' class mergeresult(object):'
565 565 commitinfo: dict containing data which should be used on commit
566 566 contains a filename -> info mapping
567 567 """
568 self._actions = {}
568 self._filemapping = {}
569 569 self._diverge = {}
570 570 self._renamedelete = {}
571 571 self._commitinfo = {}
@@ -583,16 +583,16 b' class mergeresult(object):'
583 583 data: a tuple of information like fctx and ctx related to this merge
584 584 message: a message about the merge
585 585 """
586 self._actions[filename] = (action, data, message)
586 self._filemapping[filename] = (action, data, message)
587 587
588 588 def removefile(self, filename):
589 589 """ removes a file from the mergeresult object as the file might
590 590 not merging anymore """
591 del self._actions[filename]
591 del self._filemapping[filename]
592 592
593 593 @property
594 594 def actions(self):
595 return self._actions
595 return self._filemapping
596 596
597 597 @property
598 598 def diverge(self):
@@ -612,7 +612,7 b' class mergeresult(object):'
612 612 and a list of files and related arguments as values """
613 613 # Convert to dictionary-of-lists format
614 614 actions = emptyactions()
615 for f, (m, args, msg) in pycompat.iteritems(self._actions):
615 for f, (m, args, msg) in pycompat.iteritems(self._filemapping):
616 616 if m not in actions:
617 617 actions[m] = []
618 618 actions[m].append((f, args, msg))
@@ -620,15 +620,15 b' class mergeresult(object):'
620 620 return actions
621 621
622 622 def setactions(self, actions):
623 self._actions = actions
623 self._filemapping = actions
624 624
625 625 def updateactions(self, updates):
626 self._actions.update(updates)
626 self._filemapping.update(updates)
627 627
628 628 def hasconflicts(self):
629 629 """ tells whether this merge resulted in some actions which can
630 630 result in conflicts or not """
631 for _f, (m, _unused, _unused) in pycompat.iteritems(self._actions):
631 for _f, (m, _unused, _unused) in pycompat.iteritems(self._filemapping):
632 632 if m not in (
633 633 mergestatemod.ACTION_GET,
634 634 mergestatemod.ACTION_KEEP,
General Comments 0
You need to be logged in to leave comments. Login now