Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: gcl.py

Issue 298703003: Upload project option (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 if not no_watchlists and watchers: 904 if not no_watchlists and watchers:
905 # Filter out all empty elements and join by ',' 905 # Filter out all empty elements and join by ','
906 cc_list = ','.join(filter(None, [cc_list] + watchers)) 906 cc_list = ','.join(filter(None, [cc_list] + watchers))
907 if cc_list: 907 if cc_list:
908 upload_arg.append("--cc=" + cc_list) 908 upload_arg.append("--cc=" + cc_list)
909 upload_arg.append("--file=%s" % desc_file) 909 upload_arg.append("--file=%s" % desc_file)
910 910
911 if GetCodeReviewSetting("PRIVATE") == "True": 911 if GetCodeReviewSetting("PRIVATE") == "True":
912 upload_arg.append("--private") 912 upload_arg.append("--private")
913 913
914 project = GetCodeReviewSetting("PROJECT")
915 if project:
916 upload_arg.append("--project=%s" % project)
917
914 # If we have a lot of files with long paths, then we won't be able to fit 918 # If we have a lot of files with long paths, then we won't be able to fit
915 # the command to "svn diff". Instead, we generate the diff manually for 919 # the command to "svn diff". Instead, we generate the diff manually for
916 # each file and concatenate them before passing it to upload.py. 920 # each file and concatenate them before passing it to upload.py.
917 if change_info.patch is None: 921 if change_info.patch is None:
918 change_info.patch = GenerateDiff(change_info.GetFileNames()) 922 change_info.patch = GenerateDiff(change_info.GetFileNames())
919 923
920 # Change the current working directory before calling upload.py so that it 924 # Change the current working directory before calling upload.py so that it
921 # shows the correct base. 925 # shows the correct base.
922 previous_cwd = os.getcwd() 926 previous_cwd = os.getcwd()
923 os.chdir(change_info.GetLocalRoot()) 927 os.chdir(change_info.GetLocalRoot())
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 raise 1496 raise
1493 print >> sys.stderr, ( 1497 print >> sys.stderr, (
1494 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 1498 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
1495 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) 1499 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))
1496 return 1 1500 return 1
1497 1501
1498 1502
1499 if __name__ == "__main__": 1503 if __name__ == "__main__":
1500 fix_encoding.fix_encoding() 1504 fix_encoding.fix_encoding()
1501 sys.exit(main(sys.argv[1:])) 1505 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698