Cleanup and reapply uprevs in PublishUprev in CQ.

Currently the CQ reuses old uprevs from the Uprev stage and this is
error-prone because the SHA1s can be out of date. We have robust
logic for fixing this but it only executes when the commit queue
fails. This has the nice side effect of also making the commit queue
more robust to conflicting with other changes, since it resyncs and
reapplies all changes from scratch at the end, rather than trying to
do a complex rebase that could run into conflicts.

This logic is quite well tested and has been in use for a long time,
so it's time we switch to it.

I've also deleted the old UpdateCommitHashesForChanges function. This
logic wasn't working (due to the fact that it was running on the wrong
branch after phobbs' changes) and with my change above, is now

BUG=chromium:549839, chromium:547541
TEST=Unit tests.

Change-Id: I9174504db4f468e04ec7a1c60091c16077be32c1
Trybot-Ready: David James <>
Reviewed-by: Mike Frysinger <>
Tested-by: David James <>
3 files changed