OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 # TODO(hinoka): Use logging. | 6 # TODO(hinoka): Use logging. |
7 | 7 |
8 import cStringIO | 8 import cStringIO |
9 import codecs | 9 import codecs |
10 import copy | 10 import copy |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 first_sln = dir_names[0] | 934 first_sln = dir_names[0] |
935 | 935 |
936 # Split all the revision specifications into a nice dict. | 936 # Split all the revision specifications into a nice dict. |
937 print 'Revisions: %s' % options.revision | 937 print 'Revisions: %s' % options.revision |
938 revisions = parse_revisions(options.revision, first_sln) | 938 revisions = parse_revisions(options.revision, first_sln) |
939 print 'Fetching Git checkout at %s@%s' % (first_sln, revisions[first_sln]) | 939 print 'Fetching Git checkout at %s@%s' % (first_sln, revisions[first_sln]) |
940 return revisions, step_text, shallow | 940 return revisions, step_text, shallow |
941 | 941 |
942 | 942 |
943 def checkout(options, git_slns, specs, revisions, step_text, shallow): | 943 def checkout(options, git_slns, specs, revisions, step_text, shallow): |
| 944 print 'Checking git version...' |
| 945 ver = git('version').strip() |
| 946 print 'Using %s' % ver |
| 947 |
944 first_sln = git_slns[0]['name'] | 948 first_sln = git_slns[0]['name'] |
945 dir_names = [sln.get('name') for sln in git_slns if 'name' in sln] | 949 dir_names = [sln.get('name') for sln in git_slns if 'name' in sln] |
946 try: | 950 try: |
947 # Outer try is for catching patch failures and exiting gracefully. | 951 # Outer try is for catching patch failures and exiting gracefully. |
948 # Inner try is for catching gclient failures and retrying gracefully. | 952 # Inner try is for catching gclient failures and retrying gracefully. |
949 try: | 953 try: |
950 checkout_parameters = dict( | 954 checkout_parameters = dict( |
951 # First, pass in the base of what we want to check out. | 955 # First, pass in the base of what we want to check out. |
952 solutions=git_slns, | 956 solutions=git_slns, |
953 revisions=revisions, | 957 revisions=revisions, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 # download patch failure is still an infra problem. | 1080 # download patch failure is still an infra problem. |
1077 if e.code == 3: | 1081 if e.code == 3: |
1078 # Patch download problem. | 1082 # Patch download problem. |
1079 return 87 | 1083 return 87 |
1080 # Genuine patch problem. | 1084 # Genuine patch problem. |
1081 return 88 | 1085 return 88 |
1082 | 1086 |
1083 | 1087 |
1084 if __name__ == '__main__': | 1088 if __name__ == '__main__': |
1085 sys.exit(main()) | 1089 sys.exit(main()) |
OLD | NEW |