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

Side by Side Diff: gcl.py

Issue 702001: Add ability to specify that all issues are pivate in codereview.settings... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 9 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 | tests/gcl_unittest.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/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 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 """Wrapper script around Rietveld's upload.py that groups files into 6 """Wrapper script around Rietveld's upload.py that groups files into
7 changelists.""" 7 changelists."""
8 8
9 import getpass 9 import getpass
10 import os 10 import os
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 if change_info.description: 763 if change_info.description:
764 subject = change_info.description[:77] 764 subject = change_info.description[:77]
765 if subject.find("\r\n") != -1: 765 if subject.find("\r\n") != -1:
766 subject = subject[:subject.find("\r\n")] 766 subject = subject[:subject.find("\r\n")]
767 if subject.find("\n") != -1: 767 if subject.find("\n") != -1:
768 subject = subject[:subject.find("\n")] 768 subject = subject[:subject.find("\n")]
769 if len(change_info.description) > 77: 769 if len(change_info.description) > 77:
770 subject = subject + "..." 770 subject = subject + "..."
771 upload_arg.append("--message=" + subject) 771 upload_arg.append("--message=" + subject)
772 772
773 if GetCodeReviewSetting("PRIVATE") == "True":
774 upload_arg.append("--private")
775
773 # Change the current working directory before calling upload.py so that it 776 # Change the current working directory before calling upload.py so that it
774 # shows the correct base. 777 # shows the correct base.
775 previous_cwd = os.getcwd() 778 previous_cwd = os.getcwd()
776 os.chdir(change_info.GetLocalRoot()) 779 os.chdir(change_info.GetLocalRoot())
777 780
778 # If we have a lot of files with long paths, then we won't be able to fit 781 # If we have a lot of files with long paths, then we won't be able to fit
779 # the command to "svn diff". Instead, we generate the diff manually for 782 # the command to "svn diff". Instead, we generate the diff manually for
780 # each file and concatenate them before passing it to upload.py. 783 # each file and concatenate them before passing it to upload.py.
781 if change_info.patch is None: 784 if change_info.patch is None:
782 change_info.patch = GenerateDiff(change_info.GetFileNames()) 785 change_info.patch = GenerateDiff(change_info.GetFileNames())
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 return 0 1208 return 0
1206 args =["svn", command] 1209 args =["svn", command]
1207 root = GetRepositoryRoot() 1210 root = GetRepositoryRoot()
1208 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) 1211 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()])
1209 RunShell(args, True) 1212 RunShell(args, True)
1210 return 0 1213 return 0
1211 1214
1212 1215
1213 if __name__ == "__main__": 1216 if __name__ == "__main__":
1214 sys.exit(main()) 1217 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tests/gcl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698