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 and Gerrit.""" | 8 """A git-command for integrating reviews on Rietveld and Gerrit.""" |
9 | 9 |
10 from __future__ import print_function | 10 from __future__ import print_function |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 import presubmit_support | 56 import presubmit_support |
57 import rietveld | 57 import rietveld |
58 import scm | 58 import scm |
59 import subcommand | 59 import subcommand |
60 import subprocess2 | 60 import subprocess2 |
61 import watchlists | 61 import watchlists |
62 | 62 |
63 __version__ = '2.0' | 63 __version__ = '2.0' |
64 | 64 |
65 COMMIT_BOT_EMAIL = 'commit-bot@chromium.org' | 65 COMMIT_BOT_EMAIL = 'commit-bot@chromium.org' |
66 DEFAULT_SERVER = 'https://codereview.appspot.com' | 66 DEFAULT_SERVER = 'https://codereview.chromium.org' |
67 POSTUPSTREAM_HOOK_PATTERN = '.git/hooks/post-cl-%s' | 67 POSTUPSTREAM_HOOK_PATTERN = '.git/hooks/post-cl-%s' |
68 DESCRIPTION_BACKUP_FILE = '~/.git_cl_description_backup' | 68 DESCRIPTION_BACKUP_FILE = '~/.git_cl_description_backup' |
69 GIT_INSTRUCTIONS_URL = 'http://code.google.com/p/chromium/wiki/UsingGit' | 69 GIT_INSTRUCTIONS_URL = 'http://code.google.com/p/chromium/wiki/UsingGit' |
70 REFS_THAT_ALIAS_TO_OTHER_REFS = { | 70 REFS_THAT_ALIAS_TO_OTHER_REFS = { |
71 'refs/remotes/origin/lkgr': 'refs/remotes/origin/master', | 71 'refs/remotes/origin/lkgr': 'refs/remotes/origin/master', |
72 'refs/remotes/origin/lkcr': 'refs/remotes/origin/master', | 72 'refs/remotes/origin/lkcr': 'refs/remotes/origin/master', |
73 } | 73 } |
74 | 74 |
75 # Valid extensions for files we want to lint. | 75 # Valid extensions for files we want to lint. |
76 DEFAULT_LINT_REGEX = r"(.*\.cpp|.*\.cc|.*\.h)" | 76 DEFAULT_LINT_REGEX = r"(.*\.cpp|.*\.cc|.*\.h)" |
(...skipping 5026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5103 if __name__ == '__main__': | 5103 if __name__ == '__main__': |
5104 # These affect sys.stdout so do it outside of main() to simplify mocks in | 5104 # These affect sys.stdout so do it outside of main() to simplify mocks in |
5105 # unit testing. | 5105 # unit testing. |
5106 fix_encoding.fix_encoding() | 5106 fix_encoding.fix_encoding() |
5107 setup_color.init() | 5107 setup_color.init() |
5108 try: | 5108 try: |
5109 sys.exit(main(sys.argv[1:])) | 5109 sys.exit(main(sys.argv[1:])) |
5110 except KeyboardInterrupt: | 5110 except KeyboardInterrupt: |
5111 sys.stderr.write('interrupted\n') | 5111 sys.stderr.write('interrupted\n') |
5112 sys.exit(1) | 5112 sys.exit(1) |
OLD | NEW |