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

Side by Side Diff: git_cl.py

Issue 10915190: Fix git_cl diffstat to use -l100000 to match upload.py (Closed) Base URL: https://git.chromium.org/chromium/tools/depot_tools.git@master
Patch Set: Created 8 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 | tests/git_cl_test.py » ('j') | 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/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 import json 10 import json
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 def print_stats(args): 137 def print_stats(args):
138 """Prints statistics about the change to the user.""" 138 """Prints statistics about the change to the user."""
139 # --no-ext-diff is broken in some versions of Git, so try to work around 139 # --no-ext-diff is broken in some versions of Git, so try to work around
140 # this by overriding the environment (but there is still a problem if the 140 # this by overriding the environment (but there is still a problem if the
141 # git config key "diff.external" is used). 141 # git config key "diff.external" is used).
142 env = os.environ.copy() 142 env = os.environ.copy()
143 if 'GIT_EXTERNAL_DIFF' in env: 143 if 'GIT_EXTERNAL_DIFF' in env:
144 del env['GIT_EXTERNAL_DIFF'] 144 del env['GIT_EXTERNAL_DIFF']
145 return subprocess2.call( 145 return subprocess2.call(
146 ['git', 'diff', '--no-ext-diff', '--stat', '--find-copies-harder'] + args, 146 ['git', 'diff', '--no-ext-diff', '--stat', '--find-copies-harder',
147 env=env) 147 '-l100000'] + args, env=env)
148 148
149 149
150 class Settings(object): 150 class Settings(object):
151 def __init__(self): 151 def __init__(self):
152 self.default_server = None 152 self.default_server = None
153 self.cc = None 153 self.cc = None
154 self.root = None 154 self.root = None
155 self.is_git_svn = None 155 self.is_git_svn = None
156 self.svn_branch = None 156 self.svn_branch = None
157 self.tree_status_url = None 157 self.tree_status_url = None
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1699 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1700 1700
1701 # Not a known command. Default to help. 1701 # Not a known command. Default to help.
1702 GenUsage(parser, 'help') 1702 GenUsage(parser, 'help')
1703 return CMDhelp(parser, argv) 1703 return CMDhelp(parser, argv)
1704 1704
1705 1705
1706 if __name__ == '__main__': 1706 if __name__ == '__main__':
1707 fix_encoding.fix_encoding() 1707 fix_encoding.fix_encoding()
1708 sys.exit(main(sys.argv[1:])) 1708 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698