def get_next_downloadable_changeset_revision(repository, repo, after_changeset_revision):
 changeset_revisions = [revision[1] for revision in get_metadata_revisions(repository, repo)]
 if (len(changeset_revisions) == 1):
  changeset_revision = changeset_revisions[0]
  if (changeset_revision == after_changeset_revision):
   return after_changeset_revision
 found_after_changeset_revision = False
 for changeset in repo.changelog:
  changeset_revision = str(repo.changectx(changeset))
  if found_after_changeset_revision:
   if (changeset_revision in changeset_revisions):
    return changeset_revision
  elif ((not found_after_changeset_revision) and (changeset_revision == after_changeset_revision)):
   found_after_changeset_revision = True
 return None

def get_next_downloadable_changeset_revision ( repository , repo , after_changeset_revision ) : changeset_revisions = [ revision [ 1 ] for revision in get_metadata_revisions ( repository , repo ) ] if ( len ( changeset_revisions ) == 1 ) : changeset_revision = changeset_revisions [ 0 ] if ( changeset_revision == after_changeset_revision ) : return after_changeset_revision found_after_changeset_revision = False for changeset in repo . changelog : changeset_revision = str ( repo . changectx ( changeset ) ) if found_after_changeset_revision : if ( changeset_revision in changeset_revisions ) : return changeset_revision elif ( ( not found_after_changeset_revision ) and ( changeset_revision == after_changeset_revision ) ) : found_after_changeset_revision = True return None
return the installable changeset_revision in the repository changelog after the changeset to which after_changeset_revision refers .