[Autotest] Git pull instead of fetch/reset when building externals.

Build externals will now perform a git pull -r when a repo
is already present. Previously we attempted to fetch --all and
reset --hard HEAD, for this to achieve what was intended
we need to figure out the name of the upstream branch the
current branch is tracking. This change makes it so
we just fail to build externals when there's a local rebase
conflict (which there shouldn't be in site-packages anyway).

BUG=chromium:222144
TEST=Ran build externals with and without site-packages and imported
     git dependent modules. Ran the revision_control unittests.

Change-Id: I1d41f9eea44a86386a28392c315c8802368ccb2f
Reviewed-on: https://gerrit.chromium.org/gerrit/45912
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>
3 files changed