Show More
@@ -229,7 +229,7 b' class mercurial_sink(common.converter_si' | |||||
229 | followcopies=False, |
|
229 | followcopies=False, | |
230 | ) |
|
230 | ) | |
231 |
|
231 | |||
232 |
for file, (action, info, msg) in |
|
232 | for file, (action, info, msg) in mresult.filemap(): | |
233 | if source.targetfilebelongstosource(file): |
|
233 | if source.targetfilebelongstosource(file): | |
234 | # If the file belongs to the source repo, ignore the p2 |
|
234 | # If the file belongs to the source repo, ignore the p2 | |
235 | # since it will be covered by the existing fileset. |
|
235 | # since it will be covered by the existing fileset. |
@@ -497,7 +497,7 b' def checkunknownfiles(orig, repo, wctx, ' | |||||
497 | if isenabled(repo): |
|
497 | if isenabled(repo): | |
498 | files = [] |
|
498 | files = [] | |
499 | sparsematch = repo.maybesparsematch(mctx.rev()) |
|
499 | sparsematch = repo.maybesparsematch(mctx.rev()) | |
500 |
for f, (m, actionargs, msg) in |
|
500 | for f, (m, actionargs, msg) in mresult.filemap(): | |
501 | if sparsematch and not sparsematch(f): |
|
501 | if sparsematch and not sparsematch(f): | |
502 | continue |
|
502 | continue | |
503 | if m in ( |
|
503 | if m in ( |
@@ -541,7 +541,7 b' def _filternarrowactions(narrowmatch, br' | |||||
541 | } |
|
541 | } | |
542 | # We mutate the items in the dict during iteration, so iterate |
|
542 | # We mutate the items in the dict during iteration, so iterate | |
543 | # over a copy. |
|
543 | # over a copy. | |
544 |
for f, action in |
|
544 | for f, action in mresult.filemap(): | |
545 | if narrowmatch(f): |
|
545 | if narrowmatch(f): | |
546 | pass |
|
546 | pass | |
547 | elif not branchmerge: |
|
547 | elif not branchmerge: | |
@@ -668,9 +668,13 b' class mergeresult(object):' | |||||
668 |
|
668 | |||
669 | return sum(len(self._actionmapping[a]) for a in actions) |
|
669 | return sum(len(self._actionmapping[a]) for a in actions) | |
670 |
|
670 | |||
671 | @property |
|
671 | def filemap(self, sort=False): | |
672 | def actions(self): |
|
672 | if sorted: | |
673 | return self._filemapping |
|
673 | for key, val in sorted(pycompat.iteritems(self._filemapping)): | |
|
674 | yield key, val | |||
|
675 | else: | |||
|
676 | for key, val in pycompat.iteritems(self._filemapping): | |||
|
677 | yield key, val | |||
674 |
|
678 | |||
675 | @property |
|
679 | @property | |
676 | def diverge(self): |
|
680 | def diverge(self): | |
@@ -1137,7 +1141,7 b' def calculateupdates(' | |||||
1137 | ): |
|
1141 | ): | |
1138 | renamedelete = mresult1.renamedelete |
|
1142 | renamedelete = mresult1.renamedelete | |
1139 |
|
1143 | |||
1140 |
for f, a in |
|
1144 | for f, a in mresult1.filemap(sort=True): | |
1141 | m, args, msg = a |
|
1145 | m, args, msg = a | |
1142 | repo.ui.debug(b' %s: %s -> %s\n' % (f, msg, m)) |
|
1146 | repo.ui.debug(b' %s: %s -> %s\n' % (f, msg, m)) | |
1143 | if f in fbids: |
|
1147 | if f in fbids: |
@@ -388,7 +388,7 b' def filterupdatesactions(repo, wctx, mct' | |||||
388 | sparsematch = matcher(repo, [mctx.rev()]) |
|
388 | sparsematch = matcher(repo, [mctx.rev()]) | |
389 |
|
389 | |||
390 | temporaryfiles = [] |
|
390 | temporaryfiles = [] | |
391 |
for file, action in |
|
391 | for file, action in mresult.filemap(): | |
392 | type, args, msg = action |
|
392 | type, args, msg = action | |
393 | files.add(file) |
|
393 | files.add(file) | |
394 | if sparsematch(file): |
|
394 | if sparsematch(file): |
General Comments 0
You need to be logged in to leave comments.
Login now