| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Enables directory-specific presubmit checks to run at upload and/or commit. | 6 """Enables directory-specific presubmit checks to run at upload and/or commit. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 __version__ = '1.8.0' | 9 __version__ = '1.8.0' |
| 10 | 10 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 self.basename = os.path.basename | 285 self.basename = os.path.basename |
| 286 self.cPickle = cPickle | 286 self.cPickle = cPickle |
| 287 self.cpplint = cpplint | 287 self.cpplint = cpplint |
| 288 self.cStringIO = cStringIO | 288 self.cStringIO = cStringIO |
| 289 self.glob = glob.glob | 289 self.glob = glob.glob |
| 290 self.json = json | 290 self.json = json |
| 291 self.logging = logging.getLogger('PRESUBMIT') | 291 self.logging = logging.getLogger('PRESUBMIT') |
| 292 self.os_listdir = os.listdir | 292 self.os_listdir = os.listdir |
| 293 self.os_walk = os.walk | 293 self.os_walk = os.walk |
| 294 self.os_path = os.path | 294 self.os_path = os.path |
| 295 self.os_stat = os.stat |
| 295 self.pickle = pickle | 296 self.pickle = pickle |
| 296 self.marshal = marshal | 297 self.marshal = marshal |
| 297 self.re = re | 298 self.re = re |
| 298 self.subprocess = subprocess | 299 self.subprocess = subprocess |
| 299 self.tempfile = tempfile | 300 self.tempfile = tempfile |
| 300 self.time = time | 301 self.time = time |
| 301 self.traceback = traceback | 302 self.traceback = traceback |
| 302 self.unittest = unittest | 303 self.unittest = unittest |
| 303 self.urllib2 = urllib2 | 304 self.urllib2 = urllib2 |
| 304 | 305 |
| (...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 except PresubmitFailure, e: | 1669 except PresubmitFailure, e: |
| 1669 print >> sys.stderr, e | 1670 print >> sys.stderr, e |
| 1670 print >> sys.stderr, 'Maybe your depot_tools is out of date?' | 1671 print >> sys.stderr, 'Maybe your depot_tools is out of date?' |
| 1671 print >> sys.stderr, 'If all fails, contact maruel@' | 1672 print >> sys.stderr, 'If all fails, contact maruel@' |
| 1672 return 2 | 1673 return 2 |
| 1673 | 1674 |
| 1674 | 1675 |
| 1675 if __name__ == '__main__': | 1676 if __name__ == '__main__': |
| 1676 fix_encoding.fix_encoding() | 1677 fix_encoding.fix_encoding() |
| 1677 sys.exit(Main(None)) | 1678 sys.exit(Main(None)) |
| OLD | NEW |