fix up revision-finding code
add new script; update docs