diff options
author | David Ferguson <ferguson.david@gmail.com> | 2013-06-05 11:01:19 -0400 |
---|---|---|
committer | David Ferguson <ferguson.david@gmail.com> | 2013-06-05 11:20:08 -0400 |
commit | 29531b25e5d597178f749770fd70928aba5f9928 (patch) | |
tree | bc410b697e1b4fa79a6fca5c510803732c74a126 | |
parent | 0b55d233936659becb56cb28d182f396fb61b81e (diff) | |
download | build-29531b25e5d597178f749770fd70928aba5f9928.zip build-29531b25e5d597178f749770fd70928aba5f9928.tar.gz build-29531b25e5d597178f749770fd70928aba5f9928.tar.bz2 |
repopick: add -b shortcut option
* useful for people like me who want to pick into temp branch so
that the picks survive a repo sync
* shortcut to "--start-branch auto --abandon-first --ignore-missing"
Change-Id: Ia4d4309d27e46a15ff4b74525668d974f4251dcb
-rwxr-xr-x | tools/repopick.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/repopick.py b/tools/repopick.py index 8f77a82..3dd580b 100755 --- a/tools/repopick.py +++ b/tools/repopick.py @@ -59,11 +59,17 @@ parser.add_argument('change_number', nargs='+', help='change number to cherry pi parser.add_argument('-i', '--ignore-missing', action='store_true', help='do not error out if a patch applies to a missing directory') parser.add_argument('-s', '--start-branch', nargs=1, help='start the specified branch before cherry picking') parser.add_argument('-a', '--abandon-first', action='store_true', help='before cherry picking, abandon the branch specified in --start-branch') -parser.add_argument('-q', '--quiet', '-q', action='store_true', help='print as little as possible') -parser.add_argument('-v', '--verbose', '-v', action='store_true', help='print extra information to aid in debug') +parser.add_argument('-b', '--auto-branch', action='store_true', help='shortcut to "--start-branch auto --abandon-first --ignore-missing"') +parser.add_argument('-q', '--quiet', action='store_true', help='print as little as possible') +parser.add_argument('-v', '--verbose', action='store_true', help='print extra information to aid in debug') args = parser.parse_args() if args.start_branch == None and args.abandon_first: parser.error('if --abandon-first is set, you must also give the branch name with --start-branch') +if args.auto_branch: + args.abandon_first = True + args.ignore_missing = True + if not args.start_branch: + args.start_branch = ['auto'] if args.quiet and args.verbose: parser.error('--quiet and --verbose cannot be specified together') |