| 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 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4173 If your project has a true, writeable git repository, you probably want to run | 4173 If your project has a true, writeable git repository, you probably want to run |
| 4174 'git cl land' instead. | 4174 'git cl land' instead. |
| 4175 If your project has a git mirror of an upstream SVN master, you probably need | 4175 If your project has a git mirror of an upstream SVN master, you probably need |
| 4176 to run 'git svn init'. | 4176 to run 'git svn init'. |
| 4177 | 4177 |
| 4178 Using the wrong command might cause your commit to appear to succeed, and the | 4178 Using the wrong command might cause your commit to appear to succeed, and the |
| 4179 review to be closed, without actually landing upstream. If you choose to | 4179 review to be closed, without actually landing upstream. If you choose to |
| 4180 proceed, please verify that the commit lands upstream as expected.""" | 4180 proceed, please verify that the commit lands upstream as expected.""" |
| 4181 print(message) | 4181 print(message) |
| 4182 ask_for_data('[Press enter to dcommit or ctrl-C to quit]') | 4182 ask_for_data('[Press enter to dcommit or ctrl-C to quit]') |
| 4183 # TODO(tandrii): kill this post SVN migration with |
| 4184 # https://codereview.chromium.org/2076683002 |
| 4185 print('WARNING: chrome infrastructure is migrating SVN repos to Git.\n' |
| 4186 'Please let us know of this project you are committing to:' |
| 4187 ' http://crbug.com/600451') |
| 4183 return SendUpstream(parser, args, 'dcommit') | 4188 return SendUpstream(parser, args, 'dcommit') |
| 4184 | 4189 |
| 4185 | 4190 |
| 4186 @subcommand.usage('[upstream branch to apply against]') | 4191 @subcommand.usage('[upstream branch to apply against]') |
| 4187 def CMDland(parser, args): | 4192 def CMDland(parser, args): |
| 4188 """Commits the current changelist via git.""" | 4193 """Commits the current changelist via git.""" |
| 4189 if settings.GetIsGitSvn() or git_footers.get_footer_svn_id(): | 4194 if settings.GetIsGitSvn() or git_footers.get_footer_svn_id(): |
| 4190 print('This appears to be an SVN repository.') | 4195 print('This appears to be an SVN repository.') |
| 4191 print('Are you sure you didn\'t mean \'git cl dcommit\'?') | 4196 print('Are you sure you didn\'t mean \'git cl dcommit\'?') |
| 4192 print('(Ignore if this is the first commit after migrating from svn->git)') | 4197 print('(Ignore if this is the first commit after migrating from svn->git)') |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5029 if __name__ == '__main__': | 5034 if __name__ == '__main__': |
| 5030 # These affect sys.stdout so do it outside of main() to simplify mocks in | 5035 # These affect sys.stdout so do it outside of main() to simplify mocks in |
| 5031 # unit testing. | 5036 # unit testing. |
| 5032 fix_encoding.fix_encoding() | 5037 fix_encoding.fix_encoding() |
| 5033 setup_color.init() | 5038 setup_color.init() |
| 5034 try: | 5039 try: |
| 5035 sys.exit(main(sys.argv[1:])) | 5040 sys.exit(main(sys.argv[1:])) |
| 5036 except KeyboardInterrupt: | 5041 except KeyboardInterrupt: |
| 5037 sys.stderr.write('interrupted\n') | 5042 sys.stderr.write('interrupted\n') |
| 5038 sys.exit(1) | 5043 sys.exit(1) |
| OLD | NEW |