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