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 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 parser.add_option('-m', dest='message', help='message for patchset') | 1711 parser.add_option('-m', dest='message', help='message for patchset') |
1712 parser.add_option('-t', dest='title', help='title for patchset') | 1712 parser.add_option('-t', dest='title', help='title for patchset') |
1713 parser.add_option('-r', '--reviewers', | 1713 parser.add_option('-r', '--reviewers', |
1714 action='append', default=[], | 1714 action='append', default=[], |
1715 help='reviewer email addresses') | 1715 help='reviewer email addresses') |
1716 parser.add_option('--cc', | 1716 parser.add_option('--cc', |
1717 action='append', default=[], | 1717 action='append', default=[], |
1718 help='cc email addresses') | 1718 help='cc email addresses') |
1719 parser.add_option('-s', '--send-mail', action='store_true', | 1719 parser.add_option('-s', '--send-mail', action='store_true', |
1720 help='send email to reviewer immediately') | 1720 help='send email to reviewer immediately') |
1721 parser.add_option("--emulate_svn_auto_props", action="store_true", | 1721 parser.add_option('--emulate_svn_auto_props', |
| 1722 '--emulate-svn-auto-props', |
| 1723 action="store_true", |
1722 dest="emulate_svn_auto_props", | 1724 dest="emulate_svn_auto_props", |
1723 help="Emulate Subversion's auto properties feature.") | 1725 help="Emulate Subversion's auto properties feature.") |
1724 parser.add_option('-c', '--use-commit-queue', action='store_true', | 1726 parser.add_option('-c', '--use-commit-queue', action='store_true', |
1725 help='tell the commit queue to commit this patchset') | 1727 help='tell the commit queue to commit this patchset') |
1726 parser.add_option('--private', action='store_true', | 1728 parser.add_option('--private', action='store_true', |
1727 help='set the review private (rietveld only)') | 1729 help='set the review private (rietveld only)') |
1728 parser.add_option('--target_branch', | 1730 parser.add_option('--target_branch', |
| 1731 '--target-branch', |
1729 help='When uploading to gerrit, remote branch to ' | 1732 help='When uploading to gerrit, remote branch to ' |
1730 'use for CL. Default: master') | 1733 'use for CL. Default: master') |
1731 parser.add_option('--email', default=None, | 1734 parser.add_option('--email', default=None, |
1732 help='email address to use to connect to Rietveld') | 1735 help='email address to use to connect to Rietveld') |
1733 parser.add_option('--auto-bots', default=False, action='store_true', | 1736 parser.add_option('--auto-bots', default=False, action='store_true', |
1734 help='Autogenerate which trybots to use for this CL') | 1737 help='Autogenerate which trybots to use for this CL') |
1735 | 1738 |
1736 add_git_similarity(parser) | 1739 add_git_similarity(parser) |
1737 (options, args) = parser.parse_args(args) | 1740 (options, args) = parser.parse_args(args) |
1738 | 1741 |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2633 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 2636 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
2634 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 2637 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
2635 | 2638 |
2636 | 2639 |
2637 if __name__ == '__main__': | 2640 if __name__ == '__main__': |
2638 # These affect sys.stdout so do it outside of main() to simplify mocks in | 2641 # These affect sys.stdout so do it outside of main() to simplify mocks in |
2639 # unit testing. | 2642 # unit testing. |
2640 fix_encoding.fix_encoding() | 2643 fix_encoding.fix_encoding() |
2641 colorama.init() | 2644 colorama.init() |
2642 sys.exit(main(sys.argv[1:])) | 2645 sys.exit(main(sys.argv[1:])) |
OLD | NEW |