| 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 | 
 |   7 import sys | 
 |   8  | 
 |   9 import bot_update  # pylint: disable=relative-import | 
 |  10  | 
 |  11  | 
 |  12 if __name__ == '__main__': | 
 |  13   parse = optparse.OptionParser() | 
 |  14  | 
 |  15   parse.add_option('--gerrit_repo', | 
 |  16                    help='Gerrit repository to pull the ref from.') | 
 |  17   parse.add_option('--gerrit_ref', help='Gerrit ref to apply.') | 
 |  18   parse.add_option('--root', help='The location of the checkout.') | 
 |  19   parse.add_option('--gerrit_no_reset', action='store_true', | 
 |  20                    help='Bypass calling reset after applying a gerrit ref.') | 
 |  21   parse.add_option('--gerrit_rebase_patch_ref', action='store_true', | 
 |  22                    help='Rebase Gerrit patch ref after of checking it out.') | 
 |  23  | 
 |  24   options, _ = parse.parse_args() | 
 |  25  | 
 |  26   sys.exit( | 
 |  27       bot_update.apply_gerrit_ref( | 
 |  28           options.gerrit_repo, | 
 |  29           options.gerrit_ref, | 
 |  30           options.root, | 
 |  31           not options.gerrit_no_reset, | 
 |  32           options.gerrit_rebase_patch_ref) | 
 |  33   ) | 
| OLD | NEW |