def get_tip(self, scope, expect=True):
    '''
    Return the tip revision.  Returns None if expect is false and scope is not valid.
    '''
    revs = self.get_revs(scope)
    if revs:
      tip = revs[-1]
    else:
      tip = None
    if expect and tip is None:
      raise InvalidArgument("invalid scope: '%s'" % scope)
    return tip
dataset/ETHPy150Open bloomreach/zinc/zinc.py/Repo.get_tip/original