Use three-way merge when applying Git patches.

After switching to a pure git workflow, most of the patchset we upload
to rietveld have git metadata. Apparently, however, the scripts here in
depot tools, which are used by the CQ and trybots, are ignoring that
and applying patches without taking advantage of git metadata.
In practice this causes people to rebase and reupload patches more than
necessary, even in the cases when it could be handled automatically by
means of a three way merge.
This change updates the GitCheckout class of depot_tools to use that.

BUG=416003

Review URL: https://codereview.chromium.org/577203002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292087 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/checkout.py b/checkout.py
index 5dbb375..8d5ccce 100644
--- a/checkout.py
+++ b/checkout.py
@@ -676,7 +676,7 @@
           else:
             # No need to do anything special with p.is_new or if not
             # p.diff_hunks. git apply manages all that already.
-            cmd = ['apply', '--index', '-p%s' % p.patchlevel]
+            cmd = ['apply', '--index', '-3', '-p%s' % p.patchlevel]
             if verbose:
               cmd.append('--verbose')
             stdout.append(self._check_output_git(cmd, stdin=p.get(True)))