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

Side by Side Diff: gcl.py

Issue 200103: Making gcl upload do tryupload from the same place as gcl try.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 3 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 | no next file » | 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 change_info.patchset = int(patchset) 846 change_info.patchset = int(patchset)
847 change_info.Save() 847 change_info.Save()
848 848
849 if desc_file: 849 if desc_file:
850 os.remove(desc_file) 850 os.remove(desc_file)
851 851
852 # Do background work on Rietveld to lint the file so that the results are 852 # Do background work on Rietveld to lint the file so that the results are
853 # ready when the issue is viewed. 853 # ready when the issue is viewed.
854 SendToRietveld("/lint/issue%s_%s" % (issue, patchset), timeout=0.5) 854 SendToRietveld("/lint/issue%s_%s" % (issue, patchset), timeout=0.5)
855 855
856 # Move back before considering try, so GetCodeReviewSettings is
857 # consistent.
858 os.chdir(previous_cwd)
859
856 # Once uploaded to Rietveld, send it to the try server. 860 # Once uploaded to Rietveld, send it to the try server.
857 if not no_try: 861 if not no_try:
858 try_on_upload = GetCodeReviewSetting('TRY_ON_UPLOAD') 862 try_on_upload = GetCodeReviewSetting('TRY_ON_UPLOAD')
859 if try_on_upload and try_on_upload.lower() == 'true': 863 if try_on_upload and try_on_upload.lower() == 'true':
860 trychange_args = [] 864 trychange_args = []
861 if clobber: 865 if clobber:
862 trychange_args.append('--clobber') 866 trychange_args.append('--clobber')
863 TryChange(change_info, trychange_args, swallow_exception=True) 867 TryChange(change_info, trychange_args, swallow_exception=True)
864 868
865 os.chdir(previous_cwd)
866 869
867 870
868 def PresubmitCL(change_info): 871 def PresubmitCL(change_info):
869 """Reports what presubmit checks on the change would report.""" 872 """Reports what presubmit checks on the change would report."""
870 if not change_info.GetFiles(): 873 if not change_info.GetFiles():
871 print "Nothing to presubmit check, changelist is empty." 874 print "Nothing to presubmit check, changelist is empty."
872 return 875 return
873 876
874 print "*** Presubmit checks for UPLOAD would report: ***" 877 print "*** Presubmit checks for UPLOAD would report: ***"
875 DoPresubmitChecks(change_info, False, False) 878 DoPresubmitChecks(change_info, False, False)
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 # the files. This allows commands such as 'gcl diff xxx' to work. 1239 # the files. This allows commands such as 'gcl diff xxx' to work.
1237 args =["svn", command] 1240 args =["svn", command]
1238 root = GetRepositoryRoot() 1241 root = GetRepositoryRoot()
1239 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) 1242 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()])
1240 RunShell(args, True) 1243 RunShell(args, True)
1241 return 0 1244 return 0
1242 1245
1243 1246
1244 if __name__ == "__main__": 1247 if __name__ == "__main__":
1245 sys.exit(main()) 1248 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698