| OLD | NEW | 
|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python | 
| 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 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.3.2' | 9 __version__ = '1.3.2' | 
| 10 | 10 | 
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 190     self.os_path = os.path | 190     self.os_path = os.path | 
| 191     self.pickle = pickle | 191     self.pickle = pickle | 
| 192     self.marshal = marshal | 192     self.marshal = marshal | 
| 193     self.re = re | 193     self.re = re | 
| 194     self.subprocess = subprocess | 194     self.subprocess = subprocess | 
| 195     self.tempfile = tempfile | 195     self.tempfile = tempfile | 
| 196     self.traceback = traceback | 196     self.traceback = traceback | 
| 197     self.unittest = unittest | 197     self.unittest = unittest | 
| 198     self.urllib2 = urllib2 | 198     self.urllib2 = urllib2 | 
| 199 | 199 | 
|  | 200     # To easily fork python. | 
|  | 201     self.python_executable = sys.executable | 
|  | 202     self.environ = os.environ | 
|  | 203 | 
| 200     # InputApi.platform is the platform you're currently running on. | 204     # InputApi.platform is the platform you're currently running on. | 
| 201     self.platform = sys.platform | 205     self.platform = sys.platform | 
| 202 | 206 | 
| 203     # The local path of the currently-being-processed presubmit script. | 207     # The local path of the currently-being-processed presubmit script. | 
| 204     self._current_presubmit_path = os.path.dirname(presubmit_path) | 208     self._current_presubmit_path = os.path.dirname(presubmit_path) | 
| 205 | 209 | 
| 206     # We carry the canned checks so presubmit scripts can easily use them. | 210     # We carry the canned checks so presubmit scripts can easily use them. | 
| 207     self.canned_checks = presubmit_canned_checks | 211     self.canned_checks = presubmit_canned_checks | 
| 208 | 212 | 
| 209   def PresubmitLocalPath(self): | 213   def PresubmitLocalPath(self): | 
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 904                                options.commit, | 908                                options.commit, | 
| 905                                options.verbose, | 909                                options.verbose, | 
| 906                                sys.stdout, | 910                                sys.stdout, | 
| 907                                sys.stdin, | 911                                sys.stdin, | 
| 908                                options.default_presubmit, | 912                                options.default_presubmit, | 
| 909                                options.may_prompt) | 913                                options.may_prompt) | 
| 910 | 914 | 
| 911 | 915 | 
| 912 if __name__ == '__main__': | 916 if __name__ == '__main__': | 
| 913   sys.exit(Main(sys.argv)) | 917   sys.exit(Main(sys.argv)) | 
| OLD | NEW | 
|---|