Rework how revision can be looked up, and add a method to get revision for pair