| 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 import json | 10 import json |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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:])) |
| OLD | NEW |