2022-01-10 21:47:55 +00:00
|
|
|
#!/usr/bin/env python
|
2018-10-24 18:24:11 +00:00
|
|
|
|
|
|
|
import argparse
|
|
|
|
import sys
|
|
|
|
|
2020-04-08 15:59:14 +00:00
|
|
|
from lib import git
|
2018-10-24 18:24:11 +00:00
|
|
|
|
|
|
|
def main(argv):
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
parser.add_argument("-o", "--output",
|
2019-03-07 23:59:17 +00:00
|
|
|
help="directory into which exported patches will be written",
|
|
|
|
required=True)
|
2018-10-24 18:24:11 +00:00
|
|
|
parser.add_argument("patch_range",
|
|
|
|
nargs='?',
|
|
|
|
help="range of patches to export. Defaults to all commits since the "
|
|
|
|
"most recent tag or remote branch.")
|
|
|
|
args = parser.parse_args(argv)
|
|
|
|
|
2020-04-08 15:59:14 +00:00
|
|
|
git.export_patches('.', args.output, patch_range=args.patch_range)
|
2018-10-24 18:24:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main(sys.argv[1:])
|