def has_previous_repository_reviews(app, repository, changeset_revision):
 repo = hg_util.get_repo_for_repository(app, repository=repository, repo_path=None, create=False)
 reviewed_revision_hashes = [review.changeset_revision for review in repository.reviews]
 for changeset in hg_util.reversed_upper_bounded_changelog(repo, changeset_revision):
  previous_changeset_revision = str(repo.changectx(changeset))
  if (previous_changeset_revision in reviewed_revision_hashes):
   return True
 return False

def has_previous_repository_reviews ( app , repository , changeset_revision ) : repo = hg_util . get_repo_for_repository ( app , repository = repository , repo_path = None , create = False ) reviewed_revision_hashes = [ review . changeset_revision for review in repository . reviews ] for changeset in hg_util . reversed_upper_bounded_changelog ( repo , changeset_revision ) : previous_changeset_revision = str ( repo . changectx ( changeset ) ) if ( previous_changeset_revision in reviewed_revision_hashes ) : return True return False
determine if a repository has a changeset revision review prior to the received changeset revision .