versions: improve performance of rev_list