build: actually run import-patches on gclient sync (#17885)

This commit is contained in:
Jeremy Apthorp 2019-04-23 10:28:26 -07:00 committed by Charles Kerr
parent bb9e92a5d9
commit 341592119f
3 changed files with 13 additions and 8 deletions

View file

@ -86,6 +86,17 @@ def apply_patch(repo, patch_path, directory=None, index=False, reverse=False):
return applied_successfully
def import_patches(repo, **kwargs):
"""same as am(), but we save the upstream HEAD so we can refer to it when we
later export patches"""
update_ref(
repo=repo,
ref='refs/patches/upstream-head',
newvalue='HEAD'
)
am(repo=repo, **kwargs)
def get_patch(repo, commit_hash):
args = ['git', '-C', repo, 'diff-tree',
'-p',