OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/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 """Wrapper for trychange.py for git checkout.""" | 5 """Wrapper for trychange.py for git checkout.""" |
6 | 6 |
7 import logging | 7 import logging |
8 import sys | 8 import sys |
9 | 9 |
10 import breakpad # pylint: disable=W0611 | 10 import breakpad # pylint: disable=W0611 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 else: | 50 else: |
51 rietveld_url = GetRietveldServerUrl() | 51 rietveld_url = GetRietveldServerUrl() |
52 if rietveld_url: | 52 if rietveld_url: |
53 args.extend(['--rietveld_url', GetRietveldServerUrl()]) | 53 args.extend(['--rietveld_url', GetRietveldServerUrl()]) |
54 # Hack around a limitation in logging. | 54 # Hack around a limitation in logging. |
55 logging.getLogger().handlers = [] | 55 logging.getLogger().handlers = [] |
56 try: | 56 try: |
57 cl = git_cl.Changelist() | 57 cl = git_cl.Changelist() |
58 change = cl.GetChange(cl.GetUpstreamBranch(), None) | 58 change = cl.GetChange(cl.GetUpstreamBranch(), None) |
59 sys.exit(trychange.TryChange( | 59 sys.exit(trychange.TryChange( |
60 args, change, file_list=[], swallow_exception=False, | 60 args, change, swallow_exception=False, |
61 prog='git try', | 61 prog='git try', |
62 extra_epilog='\n' | 62 extra_epilog='\n' |
63 'git try will diff against your tracked branch and will ' | 63 'git try will diff against your tracked branch and will ' |
64 'detect your rietveld\n' | 64 'detect your rietveld\n' |
65 'code review if you are using git-cl\n')) | 65 'code review if you are using git-cl\n')) |
66 except third_party.upload.ClientLoginError, e: | 66 except third_party.upload.ClientLoginError, e: |
67 print('Got an exception while trying to log in to Rietveld.') | 67 print('Got an exception while trying to log in to Rietveld.') |
68 print(str(e)) | 68 print(str(e)) |
OLD | NEW |