def RevisionKeyName(rev_id, repository_name):
  """Compute the keyname for a revision.

  We use a keyname. This allows faster lookups. But more importantly, it
    enforces uniqueness. Each revision in a Repository exists at most once.
    This is useful, because otherwise we'd have a race condition.

  Args:
    rev_id: str, the revision id
    repository_name: str, the repository name

  Returns:
    str, the key name
  """
  return '%s:%s' % (repository_name, rev_id)