Clean up code duplication for revision parsing and fix previous commit to not
treeb4c6d20f66dd92dfa04c72ab8b2968c807a35d96
drwxr-xr-x - contrib