@log_calls
  def resolve_rev(self, scope, srev, expect=True):
    '''Convert a possibly symbolic revision to a raw revision.'''
    # To improve speed, don't resolve if it's already a raw revision
    if Repo._is_rev(srev):
      return srev

    if srev == "tip":
      rev = self.get_tip(scope)
    else:
      rev = srev
    tags = dict(self.get_tags(scope))
    if tags and srev in tags:
      rev = tags[srev]
      log.debug("resolved srev '%s' to %s", srev, rev)
    # TODO validate rev is a known revision
    if expect and not rev:
      raise InvalidArgument((srev, scope) % "unknown revision '%s' for scope '%s'")
    return rev
dataset/ETHPy150Open bloomreach/zinc/zinc.py/Repo.resolve_rev/swapped operands of `%`