| 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 4382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4393 """True if retrying push won't help.""" | 4393 """True if retrying push won't help.""" |
| 4394 return '(prohibited by Gerrit)' in push_stdout | 4394 return '(prohibited by Gerrit)' in push_stdout |
| 4395 | 4395 |
| 4396 | 4396 |
| 4397 @subcommand.usage('[upstream branch to apply against]') | 4397 @subcommand.usage('[upstream branch to apply against]') |
| 4398 def CMDdcommit(parser, args): | 4398 def CMDdcommit(parser, args): |
| 4399 """Commits the current changelist via git-svn.""" | 4399 """Commits the current changelist via git-svn.""" |
| 4400 if not settings.GetIsGitSvn(): | 4400 if not settings.GetIsGitSvn(): |
| 4401 if git_footers.get_footer_svn_id(): | 4401 if git_footers.get_footer_svn_id(): |
| 4402 # If it looks like previous commits were mirrored with git-svn. | 4402 # If it looks like previous commits were mirrored with git-svn. |
| 4403 message = """This repository appears to be a git-svn mirror, but no | 4403 message = """This repository appears to be a git-svn mirror, but we |
| 4404 upstream SVN master is set. You probably need to run 'git auto-svn' once.""" | 4404 don't support git-svn mirrors anymore.""" |
| 4405 else: | 4405 else: |
| 4406 message = """This doesn't appear to be an SVN repository. | 4406 message = """This doesn't appear to be an SVN repository. |
| 4407 If your project has a true, writeable git repository, you probably want to run | 4407 If your project has a true, writeable git repository, you probably want to run |
| 4408 'git cl land' instead. | 4408 'git cl land' instead. |
| 4409 If your project has a git mirror of an upstream SVN master, you probably need | 4409 If your project has a git mirror of an upstream SVN master, you probably need |
| 4410 to run 'git svn init'. | 4410 to run 'git svn init'. |
| 4411 | 4411 |
| 4412 Using the wrong command might cause your commit to appear to succeed, and the | 4412 Using the wrong command might cause your commit to appear to succeed, and the |
| 4413 review to be closed, without actually landing upstream. If you choose to | 4413 review to be closed, without actually landing upstream. If you choose to |
| 4414 proceed, please verify that the commit lands upstream as expected.""" | 4414 proceed, please verify that the commit lands upstream as expected.""" |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5296 if __name__ == '__main__': | 5296 if __name__ == '__main__': |
| 5297 # These affect sys.stdout so do it outside of main() to simplify mocks in | 5297 # These affect sys.stdout so do it outside of main() to simplify mocks in |
| 5298 # unit testing. | 5298 # unit testing. |
| 5299 fix_encoding.fix_encoding() | 5299 fix_encoding.fix_encoding() |
| 5300 setup_color.init() | 5300 setup_color.init() |
| 5301 try: | 5301 try: |
| 5302 sys.exit(main(sys.argv[1:])) | 5302 sys.exit(main(sys.argv[1:])) |
| 5303 except KeyboardInterrupt: | 5303 except KeyboardInterrupt: |
| 5304 sys.stderr.write('interrupted\n') | 5304 sys.stderr.write('interrupted\n') |
| 5305 sys.exit(1) | 5305 sys.exit(1) |
| OLD | NEW |