Code

update_rev_graph: move code to prepare_rev_graph