Parse project revisions in a single pass.

Previously we iterated over stdout to parse each project/build
revision. This changes to code so that a single pass is used
to parse the revisions.

Adds extra tests on parsing revision too.