OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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.4' | 9 __version__ = '1.4' |
10 | 10 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 self.basename = os.path.basename | 250 self.basename = os.path.basename |
251 self.cPickle = cPickle | 251 self.cPickle = cPickle |
252 self.cStringIO = cStringIO | 252 self.cStringIO = cStringIO |
253 self.json = json | 253 self.json = json |
254 self.os_path = os.path | 254 self.os_path = os.path |
255 self.pickle = pickle | 255 self.pickle = pickle |
256 self.marshal = marshal | 256 self.marshal = marshal |
257 self.re = re | 257 self.re = re |
258 self.subprocess = subprocess | 258 self.subprocess = subprocess |
259 self.tempfile = tempfile | 259 self.tempfile = tempfile |
| 260 self.time = time |
260 self.traceback = traceback | 261 self.traceback = traceback |
261 self.unittest = unittest | 262 self.unittest = unittest |
262 self.urllib2 = urllib2 | 263 self.urllib2 = urllib2 |
263 | 264 |
264 # To easily fork python. | 265 # To easily fork python. |
265 self.python_executable = sys.executable | 266 self.python_executable = sys.executable |
266 self.environ = os.environ | 267 self.environ = os.environ |
267 | 268 |
268 # InputApi.platform is the platform you're currently running on. | 269 # InputApi.platform is the platform you're currently running on. |
269 self.platform = sys.platform | 270 self.platform = sys.platform |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 sys.stdout, | 1189 sys.stdout, |
1189 sys.stdin, | 1190 sys.stdin, |
1190 options.default_presubmit, | 1191 options.default_presubmit, |
1191 options.may_prompt) | 1192 options.may_prompt) |
1192 return not results.should_continue() | 1193 return not results.should_continue() |
1193 | 1194 |
1194 | 1195 |
1195 if __name__ == '__main__': | 1196 if __name__ == '__main__': |
1196 fix_encoding.fix_encoding() | 1197 fix_encoding.fix_encoding() |
1197 sys.exit(Main(None)) | 1198 sys.exit(Main(None)) |
OLD | NEW |