mercurial/logcmdutil.py
changeset 43701 c9301ac73b95
parent 43648 4093fc1777c2
child 43773 7b14d649af1b
equal deleted inserted replaced
43700:a58d2361b231 43701:c9301ac73b95
    38 )
    38 )
    39 from .utils import (
    39 from .utils import (
    40     dateutil,
    40     dateutil,
    41     stringutil,
    41     stringutil,
    42 )
    42 )
       
    43 
       
    44 
       
    45 if not globals():
       
    46     from typing import (
       
    47         Any,
       
    48         Tuple,
       
    49     )
       
    50 
       
    51     for t in (Any, Tuple):
       
    52         assert t
    43 
    53 
    44 
    54 
    45 def getlimit(opts):
    55 def getlimit(opts):
    46     """get the log limit according to option -l/--limit"""
    56     """get the log limit according to option -l/--limit"""
    47     limit = opts.get(b'limit')
    57     limit = opts.get(b'limit')
   841         revs.reverse()
   851         revs.reverse()
   842     return revs
   852     return revs
   843 
   853 
   844 
   854 
   845 def getrevs(repo, pats, opts):
   855 def getrevs(repo, pats, opts):
       
   856     # type: (Any, Any, Any) -> Tuple[smartset.BaseSet, changesetdiffer]
   846     """Return (revs, differ) where revs is a smartset
   857     """Return (revs, differ) where revs is a smartset
   847 
   858 
   848     differ is a changesetdiffer with pre-configured file matcher.
   859     differ is a changesetdiffer with pre-configured file matcher.
   849     """
   860     """
   850     follow = opts.get(b'follow') or opts.get(b'follow_first')
   861     follow = opts.get(b'follow') or opts.get(b'follow_first')