Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: git-try

Issue 3433011: Make git-try behave like calling trychange.py directly. (Closed)
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 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 import breakpad 10 import breakpad
(...skipping 20 matching lines...) Expand all
31 31
32 32
33 def GetRietveldServerUrl(): 33 def GetRietveldServerUrl():
34 try: 34 try:
35 return GIT.Capture(['config', 'rietveld.server']).strip() 35 return GIT.Capture(['config', 'rietveld.server']).strip()
36 except gclient_utils.Error: 36 except gclient_utils.Error:
37 return None 37 return None
38 38
39 39
40 if __name__ == '__main__': 40 if __name__ == '__main__':
41 args = sys.argv[:] 41 args = sys.argv[1:]
42 patchset = GetRietveldPatchsetNumber() 42 patchset = GetRietveldPatchsetNumber()
43 if patchset: 43 if patchset:
44 args.extend([ 44 args.extend([
45 '--issue', GetRietveldIssueNumber(), 45 '--issue', GetRietveldIssueNumber(),
46 '--patchset', patchset, 46 '--patchset', patchset,
47 ]) 47 ])
48 else: 48 else:
49 rietveld_url = GetRietveldServerUrl() 49 rietveld_url = GetRietveldServerUrl()
50 if rietveld_url: 50 if rietveld_url:
51 args.extend(['--rietveld_url', GetRietveldServerUrl()]) 51 args.extend(['--rietveld_url', GetRietveldServerUrl()])
52 # Hack around a limitation in logging. 52 # Hack around a limitation in logging.
53 logging.getLogger().handlers = [] 53 logging.getLogger().handlers = []
54 sys.exit(trychange.TryChange( 54 sys.exit(trychange.TryChange(
55 args, file_list=[], swallow_exception=False, 55 args, file_list=[], swallow_exception=False,
56 prog='git-try', 56 prog='git-try',
57 extra_epilog='\n' 57 extra_epilog='\n'
58 'git-try will diff against your tracked branch and will ' 58 'git-try will diff against your tracked branch and will '
59 'detect your rietveld\n' 59 'detect your rietveld\n'
60 'code review if you are using git-cl\n')) 60 'code review if you are using git-cl\n'))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698