Flutter Engine
The Flutter Engine
Functions
tools.abandon_gerrit_cls Namespace Reference

Functions

def run_abandon_cls (args)
 
def main ()
 

Function Documentation

◆ main()

def tools.abandon_gerrit_cls.main ( )

Definition at line 34 of file abandon_gerrit_cls.py.

34def main():
35 # TODO(rmistry): Instead of attempting to keep these args in sync, defer to
36 # abandon_gerrit_cls for argument parsing.
37 d = 'Helper script for bulk abandoning gerrit CLs'
38 parser = argparse.ArgumentParser(description=d)
39 parser.add_argument(
40 '--gerrit-instance', '-g', default='https://skia-review.googlesource.com',
41 help='Name of the gerrit instance.')
42 parser.add_argument(
43 '--abandon-reason', '-a', default='',
44 help='Will be used as reason for abandoning.')
45 parser.add_argument(
46 '--last-modified-before-days', '-l', default=0,
47 help='If 3 is specified then all CLs that were modified after 3 days ago '
48 'will be returned.')
49 args = parser.parse_args()
50
51 go.check()
52 run_abandon_cls(args)
53
54

◆ run_abandon_cls()

def tools.abandon_gerrit_cls.run_abandon_cls (   args)
Bulk abandon Gerrit CLs.

Definition at line 22 of file abandon_gerrit_cls.py.

22def run_abandon_cls(args):
23 """Bulk abandon Gerrit CLs."""
24 go.mod_download()
25 go.install(go.INFRA_GO+'/scripts/abandon_gerrit_cls')
26 subprocess.check_call([
27 'abandon_gerrit_cls',
28 '--gerrit_instance', args.gerrit_instance,
29 '--abandon_reason', args.abandon_reason,
30 '--last_modified_before_days', str(args.last_modified_before_days),
31 ])
32
33