2022-04-12 11:21:55 +00:00
|
|
|
#!/usr/bin/env python3
|
2018-10-24 18:24:11 +00:00
|
|
|
|
|
|
|
import argparse
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from lib import git
|
|
|
|
from lib.patches import patch_from_dir
|
|
|
|
|
|
|
|
|
|
|
|
def main(argv):
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
parser.add_argument("patch_dir",
|
|
|
|
help="directory containing patches to apply")
|
|
|
|
parser.add_argument("-3", "--3way",
|
|
|
|
action="store_true", dest='threeway',
|
|
|
|
help="use 3-way merge to resolve conflicts")
|
|
|
|
args = parser.parse_args(argv)
|
|
|
|
|
2019-04-23 17:28:26 +00:00
|
|
|
git.import_patches(
|
2018-10-24 18:24:11 +00:00
|
|
|
repo='.',
|
|
|
|
patch_data=patch_from_dir(args.patch_dir),
|
|
|
|
threeway=args.threeway
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main(sys.argv[1:])
|