mercurial/logcmdutil.py
changeset 43774 064c9a4ced4a
parent 43773 7b14d649af1b
child 43776 faa8a59f4a06
equal deleted inserted replaced
43773:7b14d649af1b 43774:064c9a4ced4a
    43 
    43 
    44 
    44 
    45 if pycompat.TYPE_CHECKING:
    45 if pycompat.TYPE_CHECKING:
    46     from typing import (
    46     from typing import (
    47         Any,
    47         Any,
       
    48         Optional,
    48         Tuple,
    49         Tuple,
    49     )
    50     )
    50 
    51 
    51     for t in (Any, Tuple):
    52     for t in (Any, Optional, Tuple):
    52         assert t
    53         assert t
    53 
    54 
    54 
    55 
    55 def getlimit(opts):
    56 def getlimit(opts):
    56     """get the log limit according to option -l/--limit"""
    57     """get the log limit according to option -l/--limit"""
   851         revs.reverse()
   852         revs.reverse()
   852     return revs
   853     return revs
   853 
   854 
   854 
   855 
   855 def getrevs(repo, pats, opts):
   856 def getrevs(repo, pats, opts):
   856     # type: (Any, Any, Any) -> Tuple[smartset.BaseSet, changesetdiffer]
   857     # type: (Any, Any, Any) -> Tuple[smartset.abstractsmartset, Optional[changesetdiffer]]
   857     """Return (revs, differ) where revs is a smartset
   858     """Return (revs, differ) where revs is a smartset
   858 
   859 
   859     differ is a changesetdiffer with pre-configured file matcher.
   860     differ is a changesetdiffer with pre-configured file matcher.
   860     """
   861     """
   861     follow = opts.get(b'follow') or opts.get(b'follow_first')
   862     follow = opts.get(b'follow') or opts.get(b'follow_first')