build: optionally exclude some parts of patches from being applied (#17625)

This commit is contained in:
Alexey Kuzmin 2019-04-03 21:42:49 +02:00 коммит произвёл Samuel Attard
Родитель 8c8eac88a4
Коммит cd8402fc9f
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -40,13 +40,17 @@ def get_repo_root(path):
return get_repo_root(parent_path) return get_repo_root(parent_path)
def am(repo, patch_data, threeway=False, directory=None, def am(repo, patch_data, threeway=False, directory=None, exclude=None,
committer_name=None, committer_email=None): committer_name=None, committer_email=None):
args = [] args = []
if threeway: if threeway:
args += ['--3way'] args += ['--3way']
if directory is not None: if directory is not None:
args += ['--directory', directory] args += ['--directory', directory]
if exclude is not None:
for path_pattern in exclude:
args += ['--exclude', path_pattern]
root_args = ['-C', repo] root_args = ['-C', repo]
if committer_name is not None: if committer_name is not None:
root_args += ['-c', 'user.name=' + committer_name] root_args += ['-c', 'user.name=' + committer_name]