Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 import optparse | |
|
tandrii(chromium)
2016/08/19 14:00:04
nitty: argparse is nicer, but don't change now :)
rmistry
2016/08/19 14:36:08
Acknowledged.
| |
| 7 | |
| 8 import bot_update | |
| 9 | |
| 10 | |
| 11 if __name__ == '__main__': | |
| 12 parse = optparse.OptionParser() | |
| 13 | |
| 14 parse.add_option('--gerrit_repo', | |
| 15 help='Gerrit repository to pull the ref from.') | |
| 16 parse.add_option('--gerrit_ref', help='Gerrit ref to apply.') | |
| 17 parse.add_option('--root', help='The location of the checkout.') | |
| 18 parse.add_option('--gerrit_no_reset', action='store_true', | |
| 19 help='Bypass calling reset after applying a gerrit ref.') | |
| 20 parse.add_option('--gerrit_rebase_patch_ref', action='store_true', | |
| 21 help='Rebase Gerrit patch ref after of checking it out.') | |
| 22 | |
| 23 options, _ = parse.parse_args() | |
| 24 | |
| 25 sys.exit( | |
| 26 bot_update.apply_gerrit_ref( | |
| 27 options.gerrit_repo, | |
| 28 options.gerrit_ref, | |
| 29 options.root, | |
| 30 not option.gerrit_no_reset, | |
| 31 options.gerrit_rebase_patch_ref)() | |
| 32 ) | |
| OLD | NEW |