| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 """\ | 6 """\ |
| 7 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
| 8 of files. | 8 of files. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 | 1212 |
| 1213 | 1213 |
| 1214 def DoPresubmitChecks(change_info, committing, may_prompt): | 1214 def DoPresubmitChecks(change_info, committing, may_prompt): |
| 1215 """Imports presubmit, then calls presubmit.DoPresubmitChecks.""" | 1215 """Imports presubmit, then calls presubmit.DoPresubmitChecks.""" |
| 1216 root_presubmit = GetCachedFile('PRESUBMIT.py', use_root=True) | 1216 root_presubmit = GetCachedFile('PRESUBMIT.py', use_root=True) |
| 1217 change = presubmit_support.SvnChange(change_info.name, | 1217 change = presubmit_support.SvnChange(change_info.name, |
| 1218 change_info.description, | 1218 change_info.description, |
| 1219 change_info.GetLocalRoot(), | 1219 change_info.GetLocalRoot(), |
| 1220 change_info.GetFiles(), | 1220 change_info.GetFiles(), |
| 1221 change_info.issue, | 1221 change_info.issue, |
| 1222 change_info.patchset) | 1222 change_info.patchset, |
| 1223 None) |
| 1223 output = presubmit_support.DoPresubmitChecks( | 1224 output = presubmit_support.DoPresubmitChecks( |
| 1224 change=change, | 1225 change=change, |
| 1225 committing=committing, | 1226 committing=committing, |
| 1226 verbose=False, | 1227 verbose=False, |
| 1227 output_stream=sys.stdout, | 1228 output_stream=sys.stdout, |
| 1228 input_stream=sys.stdin, | 1229 input_stream=sys.stdin, |
| 1229 default_presubmit=root_presubmit, | 1230 default_presubmit=root_presubmit, |
| 1230 may_prompt=may_prompt, | 1231 may_prompt=may_prompt, |
| 1231 tbr=False, | 1232 tbr=False, |
| 1232 rietveld=change_info.RpcServer()) | 1233 rietveld=change_info.RpcServer()) |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1455 raise | 1456 raise |
| 1456 print >> sys.stderr, ( | 1457 print >> sys.stderr, ( |
| 1457 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1458 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1458 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1459 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
| 1459 return 1 | 1460 return 1 |
| 1460 | 1461 |
| 1461 | 1462 |
| 1462 if __name__ == "__main__": | 1463 if __name__ == "__main__": |
| 1463 fix_encoding.fix_encoding() | 1464 fix_encoding.fix_encoding() |
| 1464 sys.exit(main(sys.argv[1:])) | 1465 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |