mercurial/merge.py
changeset 52692 45dc0f874b8c
parent 52644 e627cc25b6f3
child 52697 f3762eafed66
equal deleted inserted replaced
52691:279e217d6041 52692:45dc0f874b8c
     9 
     9 
    10 import collections
    10 import collections
    11 import os
    11 import os
    12 import struct
    12 import struct
    13 import typing
    13 import typing
    14 from typing import Dict, Optional, Tuple
    14 from typing import Dict, Iterator, Optional, Tuple
    15 
    15 
    16 from .i18n import _
    16 from .i18n import _
    17 from .node import nullrev
    17 from .node import nullrev
    18 from .thirdparty import attr
    18 from .thirdparty import attr
    19 
    19 
   671         if actions is None:
   671         if actions is None:
   672             return len(self._filemapping)
   672             return len(self._filemapping)
   673 
   673 
   674         return sum(len(self._actionmapping[a]) for a in actions)
   674         return sum(len(self._actionmapping[a]) for a in actions)
   675 
   675 
   676     def filemap(self, sort=False):
   676     def filemap(self, sort=False) -> Iterator[tuple]:  # TODO: fill out tuple
   677         if sort:
   677         if sort:
   678             yield from sorted(self._filemapping.items())
   678             yield from sorted(self._filemapping.items())
   679         else:
   679         else:
   680             yield from self._filemapping.items()
   680             yield from self._filemapping.items()
   681 
   681