Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 51875:454feddab720
brancing: merge stable into default
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 06 Sep 2024 02:12:19 +0200 |
parents | 278af66e6595 23116aefe786 |
children | f4733654f144 |
comparison
equal
deleted
inserted
replaced
51874:4eccb65e444f | 51875:454feddab720 |
---|---|
526 Raise an exception if the merge cannot be completed because the repo is | 526 Raise an exception if the merge cannot be completed because the repo is |
527 narrowed. | 527 narrowed. |
528 """ | 528 """ |
529 # We mutate the items in the dict during iteration, so iterate | 529 # We mutate the items in the dict during iteration, so iterate |
530 # over a copy. | 530 # over a copy. |
531 for f, action in mresult.filemap(): | 531 for f, action in list(mresult.filemap()): |
532 if narrowmatch(f): | 532 if narrowmatch(f): |
533 pass | 533 pass |
534 elif not branchmerge: | 534 elif not branchmerge: |
535 mresult.removefile(f) # just updating, ignore changes outside clone | 535 mresult.removefile(f) # just updating, ignore changes outside clone |
536 elif action[0].no_op: | 536 elif action[0].no_op: |
667 return len(self._filemapping) | 667 return len(self._filemapping) |
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 def filemap(self, sort=False): | 671 def filemap(self, sort=False): |
672 if sorted: | 672 if sort: |
673 for key, val in sorted(self._filemapping.items()): | 673 for key, val in sorted(self._filemapping.items()): |
674 yield key, val | 674 yield key, val |
675 else: | 675 else: |
676 for key, val in self._filemapping.items(): | 676 for key, val in self._filemapping.items(): |
677 yield key, val | 677 yield key, val |