Chromium Code Reviews| 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 """Client-side script to send a try job to the try server. It communicates to | 6 """Client-side script to send a try job to the try server. It communicates to |
| 7 the try server by either writting to a svn repository or by directly connecting | 7 the try server by either writting to a svn repository or by directly connecting |
| 8 to the server by HTTP. | 8 to the server by HTTP. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 689 file_list = [f.LocalPath() for f in change.AffectedFiles()] | 689 file_list = [f.LocalPath() for f in change.AffectedFiles()] |
| 690 | 690 |
| 691 if options.upstream_branch: | 691 if options.upstream_branch: |
| 692 path += '@' + options.upstream_branch | 692 path += '@' + options.upstream_branch |
| 693 # Clear file list so that the correct list will be retrieved from the | 693 # Clear file list so that the correct list will be retrieved from the |
| 694 # upstream branch. | 694 # upstream branch. |
| 695 file_list = [] | 695 file_list = [] |
| 696 checkouts.append(GuessVCS(options, path, file_list)) | 696 checkouts.append(GuessVCS(options, path, file_list)) |
| 697 checkouts[0].AutomagicalSettings() | 697 checkouts[0].AutomagicalSettings() |
| 698 for item in options.sub_rep: | 698 for item in options.sub_rep: |
| 699 # Pass file_list=None because we don't know the sub repo's file list. | |
| 699 checkout = GuessVCS(options, os.path.join(checkouts[0].checkout_root, | 700 checkout = GuessVCS(options, os.path.join(checkouts[0].checkout_root, |
|
Marc-Antoine Ruel (Google)
2012/01/06 02:41:38
Wouha, alignment is not nice; please rewrite as
ch
| |
| 700 item), file_list) | 701 item), file_list=None) |
| 701 if checkout.checkout_root in [c.checkout_root for c in checkouts]: | 702 if checkout.checkout_root in [c.checkout_root for c in checkouts]: |
| 702 parser.error('Specified the root %s two times.' % | 703 parser.error('Specified the root %s two times.' % |
| 703 checkout.checkout_root) | 704 checkout.checkout_root) |
| 704 checkouts.append(checkout) | 705 checkouts.append(checkout) |
| 705 | 706 |
| 706 can_http = options.port and options.host | 707 can_http = options.port and options.host |
| 707 can_svn = options.svn_repo | 708 can_svn = options.svn_repo |
| 708 # If there was no transport selected yet, now we must have enough data to | 709 # If there was no transport selected yet, now we must have enough data to |
| 709 # select one. | 710 # select one. |
| 710 if not options.send_patch and not (can_http or can_svn): | 711 if not options.send_patch and not (can_http or can_svn): |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 810 return 1 | 811 return 1 |
| 811 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 812 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 812 print >> sys.stderr, e | 813 print >> sys.stderr, e |
| 813 return 1 | 814 return 1 |
| 814 return 0 | 815 return 0 |
| 815 | 816 |
| 816 | 817 |
| 817 if __name__ == "__main__": | 818 if __name__ == "__main__": |
| 818 fix_encoding.fix_encoding() | 819 fix_encoding.fix_encoding() |
| 819 sys.exit(TryChange(None, None, False)) | 820 sys.exit(TryChange(None, None, False)) |
| OLD | NEW |