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 distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 # reverse on its side. | 2446 # reverse on its side. |
2447 if '_' in options.title: | 2447 if '_' in options.title: |
2448 print('WARNING: underscores in title will be converted to spaces.') | 2448 print('WARNING: underscores in title will be converted to spaces.') |
2449 refspec_opts.append('m=' + options.title.replace(' ', '_')) | 2449 refspec_opts.append('m=' + options.title.replace(' ', '_')) |
2450 | 2450 |
2451 cc = self.GetCCList().split(',') | 2451 cc = self.GetCCList().split(',') |
2452 if options.cc: | 2452 if options.cc: |
2453 cc.extend(options.cc) | 2453 cc.extend(options.cc) |
2454 cc = filter(None, cc) | 2454 cc = filter(None, cc) |
2455 if cc: | 2455 if cc: |
2456 refspec_opts.extend('cc=' + email.strip() for email in cc) | 2456 # refspec_opts.extend('cc=' + email.strip() for email in cc) |
| 2457 # TODO(tandrii): enable this back. http://crbug.com/604377 |
| 2458 print('WARNING: Gerrit doesn\'t yet support cc-ing arbitrary emails.\n' |
| 2459 ' Ignoring cc-ed emails. See http://crbug.com/604377.') |
2457 | 2460 |
2458 if change_desc.get_reviewers(): | 2461 if change_desc.get_reviewers(): |
2459 refspec_opts.extend('r=' + email.strip() | 2462 refspec_opts.extend('r=' + email.strip() |
2460 for email in change_desc.get_reviewers()) | 2463 for email in change_desc.get_reviewers()) |
2461 | 2464 |
2462 | 2465 |
2463 refspec_suffix = '' | 2466 refspec_suffix = '' |
2464 if refspec_opts: | 2467 if refspec_opts: |
2465 refspec_suffix = '%' + ','.join(refspec_opts) | 2468 refspec_suffix = '%' + ','.join(refspec_opts) |
2466 assert ' ' not in refspec_suffix, ( | 2469 assert ' ' not in refspec_suffix, ( |
(...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4825 if __name__ == '__main__': | 4828 if __name__ == '__main__': |
4826 # These affect sys.stdout so do it outside of main() to simplify mocks in | 4829 # These affect sys.stdout so do it outside of main() to simplify mocks in |
4827 # unit testing. | 4830 # unit testing. |
4828 fix_encoding.fix_encoding() | 4831 fix_encoding.fix_encoding() |
4829 setup_color.init() | 4832 setup_color.init() |
4830 try: | 4833 try: |
4831 sys.exit(main(sys.argv[1:])) | 4834 sys.exit(main(sys.argv[1:])) |
4832 except KeyboardInterrupt: | 4835 except KeyboardInterrupt: |
4833 sys.stderr.write('interrupted\n') | 4836 sys.stderr.write('interrupted\n') |
4834 sys.exit(1) | 4837 sys.exit(1) |
OLD | NEW |