[autotest] Make push-to-prod sync more aggressive.

Before this CL, the push-to-prod git repo sync through build_externals
would try to 'pull' the relevant repos. This would fail to pull new
branches from the remote repo.

This CL re-works the sync code to make it more aggressive. It now goes
through the more reliable fetch-and-reset path.

While there: fix unittest for unset git_repo_url. There was duplicated
code that was obviously not testing the 'fetch' path at least.

BUG=chromium:476124
TEST=(1) Synced a new remote branch to an existing repo that used to
         fail before this CL.
     (2) (updated) unittests.

Change-Id: I6d5337532aed62afd270762f21d9f496a823f2d5
Reviewed-on: https://chromium-review.googlesource.com/265351
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
3 files changed