Show More
@@ -582,10 +582,9 b' class mergeresult(object):' | |||
|
582 | 582 | self._commitinfo = collections.defaultdict(dict) |
|
583 | 583 | self._actionmapping = collections.defaultdict(dict) |
|
584 | 584 | |
|
585 |
def updatevalues(self, diverge, renamedelete |
|
|
585 | def updatevalues(self, diverge, renamedelete): | |
|
586 | 586 | self._diverge = diverge |
|
587 | 587 | self._renamedelete = renamedelete |
|
588 | self._commitinfo = commitinfo | |
|
589 | 588 | |
|
590 | 589 | def addfile(self, filename, action, data, message): |
|
591 | 590 | """ adds a new file to the mergeresult object |
@@ -671,6 +670,11 b' class mergeresult(object):' | |||
|
671 | 670 | for key, val in pycompat.iteritems(self._filemapping): |
|
672 | 671 | yield key, val |
|
673 | 672 | |
|
673 | def addcommitinfo(self, filename, key, value): | |
|
674 | """ adds key-value information about filename which will be required | |
|
675 | while committing this merge """ | |
|
676 | self._commitinfo[filename][key] = value | |
|
677 | ||
|
674 | 678 | @property |
|
675 | 679 | def diverge(self): |
|
676 | 680 | return self._diverge |
@@ -756,7 +760,6 b' def manifestmerge(' | |||
|
756 | 760 | # information from merge which is needed at commit time |
|
757 | 761 | # for example choosing filelog of which parent to commit |
|
758 | 762 | # TODO: use specific constants in future for this mapping |
|
759 | commitinfo = collections.defaultdict(dict) | |
|
760 | 763 | if followcopies: |
|
761 | 764 | branch_copies1, branch_copies2, diverge = copies.mergecopies( |
|
762 | 765 | repo, wctx, p2, pa |
@@ -844,7 +847,9 b' def manifestmerge(' | |||
|
844 | 847 | b'remote is newer', |
|
845 | 848 | ) |
|
846 | 849 | if branchmerge: |
|
847 |
commitinfo |
|
|
850 | mresult.addcommitinfo( | |
|
851 | f, b'filenode-source', b'other' | |
|
852 | ) | |
|
848 | 853 | elif nol and n2 == a: # remote only changed 'x' |
|
849 | 854 | mresult.addfile( |
|
850 | 855 | f, |
@@ -860,7 +865,7 b' def manifestmerge(' | |||
|
860 | 865 | b'remote is newer', |
|
861 | 866 | ) |
|
862 | 867 | if branchmerge: |
|
863 |
commitinfo |
|
|
868 | mresult.addcommitinfo(f, b'filenode-source', b'other') | |
|
864 | 869 | else: # both changed something |
|
865 | 870 | mresult.addfile( |
|
866 | 871 | f, |
@@ -1027,7 +1032,7 b' def manifestmerge(' | |||
|
1027 | 1032 | renamedelete = branch_copies1.renamedelete |
|
1028 | 1033 | renamedelete.update(branch_copies2.renamedelete) |
|
1029 | 1034 | |
|
1030 |
mresult.updatevalues(diverge, renamedelete |
|
|
1035 | mresult.updatevalues(diverge, renamedelete) | |
|
1031 | 1036 | return mresult |
|
1032 | 1037 | |
|
1033 | 1038 | |
@@ -1183,8 +1188,7 b' def calculateupdates(' | |||
|
1183 | 1188 | mresult.addfile(f, *l[0]) |
|
1184 | 1189 | continue |
|
1185 | 1190 | repo.ui.note(_(b'end of auction\n\n')) |
|
1186 | # TODO: think about commitinfo when bid merge is used | |
|
1187 | mresult.updatevalues(diverge, renamedelete, {}) | |
|
1191 | mresult.updatevalues(diverge, renamedelete) | |
|
1188 | 1192 | |
|
1189 | 1193 | if wctx.rev() is None: |
|
1190 | 1194 | _forgetremoved(wctx, mctx, branchmerge, mresult) |
General Comments 0
You need to be logged in to leave comments.
Login now