| 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 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 """Commits the current changelist via git.""" | 1852 """Commits the current changelist via git.""" |
| 1853 if settings.GetIsGitSvn(): | 1853 if settings.GetIsGitSvn(): |
| 1854 print('This appears to be an SVN repository.') | 1854 print('This appears to be an SVN repository.') |
| 1855 print('Are you sure you didn\'t mean \'git cl dcommit\'?') | 1855 print('Are you sure you didn\'t mean \'git cl dcommit\'?') |
| 1856 ask_for_data('[Press enter to push or ctrl-C to quit]') | 1856 ask_for_data('[Press enter to push or ctrl-C to quit]') |
| 1857 return SendUpstream(parser, args, 'push') | 1857 return SendUpstream(parser, args, 'push') |
| 1858 | 1858 |
| 1859 | 1859 |
| 1860 @subcommand.usage('<patch url or issue id>') | 1860 @subcommand.usage('<patch url or issue id>') |
| 1861 def CMDpatch(parser, args): | 1861 def CMDpatch(parser, args): |
| 1862 """Patchs in a code review.""" | 1862 """Patches in a code review.""" |
| 1863 parser.add_option('-b', dest='newbranch', | 1863 parser.add_option('-b', dest='newbranch', |
| 1864 help='create a new branch off trunk for the patch') | 1864 help='create a new branch off trunk for the patch') |
| 1865 parser.add_option('-f', action='store_true', dest='force', | 1865 parser.add_option('-f', action='store_true', dest='force', |
| 1866 help='with -b, clobber any existing branch') | 1866 help='with -b, clobber any existing branch') |
| 1867 parser.add_option('--reject', action='store_true', dest='reject', | 1867 parser.add_option('--reject', action='store_true', dest='reject', |
| 1868 help='failed patches spew .rej files rather than ' | 1868 help='failed patches spew .rej files rather than ' |
| 1869 'attempting a 3-way merge') | 1869 'attempting a 3-way merge') |
| 1870 parser.add_option('-n', '--no-commit', action='store_true', dest='nocommit', | 1870 parser.add_option('-n', '--no-commit', action='store_true', dest='nocommit', |
| 1871 help="don't commit after patch applies") | 1871 help="don't commit after patch applies") |
| 1872 (options, args) = parser.parse_args(args) | 1872 (options, args) = parser.parse_args(args) |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2302 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 2302 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 2303 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 2303 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
| 2304 | 2304 |
| 2305 | 2305 |
| 2306 if __name__ == '__main__': | 2306 if __name__ == '__main__': |
| 2307 # These affect sys.stdout so do it outside of main() to simplify mocks in | 2307 # These affect sys.stdout so do it outside of main() to simplify mocks in |
| 2308 # unit testing. | 2308 # unit testing. |
| 2309 fix_encoding.fix_encoding() | 2309 fix_encoding.fix_encoding() |
| 2310 colorama.init() | 2310 colorama.init() |
| 2311 sys.exit(main(sys.argv[1:])) | 2311 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |