OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 try: | 10 import breakpad |
11 import breakpad | |
12 except ImportError: | |
13 pass | |
14 | 11 |
15 from scm import GIT | 12 from scm import GIT |
16 import trychange | 13 import trychange |
17 | 14 |
18 | 15 |
19 def GetRietveldIssueNumber(): | 16 def GetRietveldIssueNumber(): |
20 return GIT.Capture( | 17 return GIT.Capture( |
21 ['config', 'branch.%s.rietveldissue' % GIT.GetBranch(None)], | 18 ['config', 'branch.%s.rietveldissue' % GIT.GetBranch(None)], |
22 error_ok=True)[0] | 19 error_ok=True)[0] |
23 | 20 |
(...skipping 17 matching lines...) Expand all Loading... |
41 '--issue', GetRietveldIssueNumber(), | 38 '--issue', GetRietveldIssueNumber(), |
42 '--patchset', patchset, | 39 '--patchset', patchset, |
43 ]) | 40 ]) |
44 else: | 41 else: |
45 rietveld_url = GetRietveldServerUrl() | 42 rietveld_url = GetRietveldServerUrl() |
46 if rietveld_url: | 43 if rietveld_url: |
47 args.extend(['--rietveld_url', GetRietveldServerUrl()]) | 44 args.extend(['--rietveld_url', GetRietveldServerUrl()]) |
48 # Hack around a limitation in logging. | 45 # Hack around a limitation in logging. |
49 logging.getLogger().handlers = [] | 46 logging.getLogger().handlers = [] |
50 sys.exit(trychange.TryChange(args, [], False, 'git-try')) | 47 sys.exit(trychange.TryChange(args, [], False, 'git-try')) |
OLD | NEW |