OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
7 | 7 |
8 """A git-command for integrating reviews on Rietveld.""" | 8 """A git-command for integrating reviews on Rietveld.""" |
9 | 9 |
10 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1012 RunGit(['config', '--unset-all', fullname], error_ok=unset_error_ok) | 1012 RunGit(['config', '--unset-all', fullname], error_ok=unset_error_ok) |
1013 | 1013 |
1014 SetProperty('server', 'CODE_REVIEW_SERVER') | 1014 SetProperty('server', 'CODE_REVIEW_SERVER') |
1015 # Only server setting is required. Other settings can be absent. | 1015 # Only server setting is required. Other settings can be absent. |
1016 # In that case, we ignore errors raised during option deletion attempt. | 1016 # In that case, we ignore errors raised during option deletion attempt. |
1017 SetProperty('cc', 'CC_LIST', unset_error_ok=True) | 1017 SetProperty('cc', 'CC_LIST', unset_error_ok=True) |
1018 SetProperty('private', 'PRIVATE', unset_error_ok=True) | 1018 SetProperty('private', 'PRIVATE', unset_error_ok=True) |
1019 SetProperty('tree-status-url', 'STATUS', unset_error_ok=True) | 1019 SetProperty('tree-status-url', 'STATUS', unset_error_ok=True) |
1020 SetProperty('viewvc-url', 'VIEW_VC', unset_error_ok=True) | 1020 SetProperty('viewvc-url', 'VIEW_VC', unset_error_ok=True) |
1021 | 1021 |
1022 if 'GERRIT_HOST' in keyvals and 'GERRIT_PORT' in keyvals: | 1022 if 'GERRIT_HOST' in keyvals: |
szager1
2013/11/27 09:13:07
We have not yet migrated off gerrit.chromium.org,
| |
1023 RunGit(['config', 'gerrit.host', keyvals['GERRIT_HOST']]) | 1023 RunGit(['config', 'gerrit.host', keyvals['GERRIT_HOST']]) |
1024 RunGit(['config', 'gerrit.port', keyvals['GERRIT_PORT']]) | |
1025 | 1024 |
1026 if 'PUSH_URL_CONFIG' in keyvals and 'ORIGIN_URL_CONFIG' in keyvals: | 1025 if 'PUSH_URL_CONFIG' in keyvals and 'ORIGIN_URL_CONFIG' in keyvals: |
1027 #should be of the form | 1026 #should be of the form |
1028 #PUSH_URL_CONFIG: url.ssh://gitrw.chromium.org.pushinsteadof | 1027 #PUSH_URL_CONFIG: url.ssh://gitrw.chromium.org.pushinsteadof |
1029 #ORIGIN_URL_CONFIG: http://src.chromium.org/git | 1028 #ORIGIN_URL_CONFIG: http://src.chromium.org/git |
1030 RunGit(['config', keyvals['PUSH_URL_CONFIG'], | 1029 RunGit(['config', keyvals['PUSH_URL_CONFIG'], |
1031 keyvals['ORIGIN_URL_CONFIG']]) | 1030 keyvals['ORIGIN_URL_CONFIG']]) |
1032 | 1031 |
1033 | 1032 |
1034 def urlretrieve(source, destination): | 1033 def urlretrieve(source, destination): |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2333 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 2332 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
2334 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 2333 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
2335 | 2334 |
2336 | 2335 |
2337 if __name__ == '__main__': | 2336 if __name__ == '__main__': |
2338 # These affect sys.stdout so do it outside of main() to simplify mocks in | 2337 # These affect sys.stdout so do it outside of main() to simplify mocks in |
2339 # unit testing. | 2338 # unit testing. |
2340 fix_encoding.fix_encoding() | 2339 fix_encoding.fix_encoding() |
2341 colorama.init() | 2340 colorama.init() |
2342 sys.exit(main(sys.argv[1:])) | 2341 sys.exit(main(sys.argv[1:])) |
OLD | NEW |