OLD | NEW |
| (Empty) |
1 #!/usr/bin/env python | |
2 # Copyright (c) 2012 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 """Analyse commits.""" | |
6 | |
7 import json | |
8 import logging | |
9 import optparse | |
10 import sys | |
11 | |
12 | |
13 def main(): | |
14 parser = optparse.OptionParser( | |
15 description=sys.modules['__main__'].__doc__) | |
16 parser.add_option('-v', '--verbose', action='store_true') | |
17 options, args = parser.parse_args(None) | |
18 if options.verbose: | |
19 logging.basicConfig(level=logging.DEBUG) | |
20 else: | |
21 logging.basicConfig(level=logging.ERROR) | |
22 if len(args) != 1: | |
23 parser.error('Need 1 arg') | |
24 | |
25 data = json.load(open(args[0])) or {} | |
26 revs = sorted( | |
27 k for k, v in data.iteritems() if v['revprops'] and k != '24079') | |
28 print '\n'.join(sorted(revs)) | |
29 return 0 | |
30 | |
31 | |
32 if __name__ == '__main__': | |
33 sys.exit(main()) | |
OLD | NEW |