equal
deleted
inserted
replaced
519 Raise an exception if the merge cannot be completed because the repo is |
519 Raise an exception if the merge cannot be completed because the repo is |
520 narrowed. |
520 narrowed. |
521 """ |
521 """ |
522 # We mutate the items in the dict during iteration, so iterate |
522 # We mutate the items in the dict during iteration, so iterate |
523 # over a copy. |
523 # over a copy. |
524 for f, action in mresult.filemap(): |
524 for f, action in list(mresult.filemap()): |
525 if narrowmatch(f): |
525 if narrowmatch(f): |
526 pass |
526 pass |
527 elif not branchmerge: |
527 elif not branchmerge: |
528 mresult.removefile(f) # just updating, ignore changes outside clone |
528 mresult.removefile(f) # just updating, ignore changes outside clone |
529 elif action[0].no_op: |
529 elif action[0].no_op: |
660 return len(self._filemapping) |
660 return len(self._filemapping) |
661 |
661 |
662 return sum(len(self._actionmapping[a]) for a in actions) |
662 return sum(len(self._actionmapping[a]) for a in actions) |
663 |
663 |
664 def filemap(self, sort=False): |
664 def filemap(self, sort=False): |
665 if sorted: |
665 if sort: |
666 for key, val in sorted(self._filemapping.items()): |
666 for key, val in sorted(self._filemapping.items()): |
667 yield key, val |
667 yield key, val |
668 else: |
668 else: |
669 for key, val in self._filemapping.items(): |
669 for key, val in self._filemapping.items(): |
670 yield key, val |
670 yield key, val |