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 """\ | 6 """\ |
7 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
8 of files. | 8 of files. |
9 """ | 9 """ |
10 | 10 |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 os.write(handle, change_info.description) | 871 os.write(handle, change_info.description) |
872 os.close(handle) | 872 os.close(handle) |
873 | 873 |
874 # Watchlist processing -- CC people interested in this changeset | 874 # Watchlist processing -- CC people interested in this changeset |
875 # http://dev.chromium.org/developers/contributing-code/watchlists | 875 # http://dev.chromium.org/developers/contributing-code/watchlists |
876 if not no_watchlists: | 876 if not no_watchlists: |
877 import watchlists | 877 import watchlists |
878 watchlist = watchlists.Watchlists(change_info.GetLocalRoot()) | 878 watchlist = watchlists.Watchlists(change_info.GetLocalRoot()) |
879 watchers = watchlist.GetWatchersForPaths(change_info.GetFileNames()) | 879 watchers = watchlist.GetWatchersForPaths(change_info.GetFileNames()) |
880 | 880 |
881 cc_list = GetCodeReviewSetting("CC_LIST") | 881 # We check this before applying the "PRIVATE" parameter of codereview |
| 882 # settings assuming that the author of the settings file has put |
| 883 # addresses which we can send private CLs to, and so we should ignore |
| 884 # CC_LIST only when --private is specified explicitly on the command |
| 885 # line. |
| 886 if "--private" in upload_arg: |
| 887 Warn("WARNING: CC_LIST is ignored since private flag is specified. " |
| 888 "You need to review and add them manually if necessary.") |
| 889 cc_list = "" |
| 890 else: |
| 891 cc_list = GetCodeReviewSetting("CC_LIST") |
882 if not no_watchlists and watchers: | 892 if not no_watchlists and watchers: |
883 # Filter out all empty elements and join by ',' | 893 # Filter out all empty elements and join by ',' |
884 cc_list = ','.join(filter(None, [cc_list] + watchers)) | 894 cc_list = ','.join(filter(None, [cc_list] + watchers)) |
885 if cc_list: | 895 if cc_list: |
886 upload_arg.append("--cc=" + cc_list) | 896 upload_arg.append("--cc=" + cc_list) |
887 upload_arg.append("--file=%s" % desc_file) | 897 upload_arg.append("--file=%s" % desc_file) |
888 | 898 |
889 if GetCodeReviewSetting("PRIVATE") == "True": | 899 if GetCodeReviewSetting("PRIVATE") == "True": |
890 upload_arg.append("--private") | 900 upload_arg.append("--private") |
891 | 901 |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 raise | 1477 raise |
1468 print >> sys.stderr, ( | 1478 print >> sys.stderr, ( |
1469 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1479 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1470 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1480 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1471 return 1 | 1481 return 1 |
1472 | 1482 |
1473 | 1483 |
1474 if __name__ == "__main__": | 1484 if __name__ == "__main__": |
1475 fix_encoding.fix_encoding() | 1485 fix_encoding.fix_encoding() |
1476 sys.exit(main(sys.argv[1:])) | 1486 sys.exit(main(sys.argv[1:])) |
OLD | NEW |