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

Side by Side Diff: gcl.py

Issue 517005: After much refactory, finally add significant functionalities to trychanges.py (Closed)
Patch Set: Created 11 years 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
« no previous file with comments | « no previous file | gclient_utils.py » ('j') | gclient_utils.py » ('J')
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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 def TryChange(change_info, args, swallow_exception): 813 def TryChange(change_info, args, swallow_exception):
814 """Create a diff file of change_info and send it to the try server.""" 814 """Create a diff file of change_info and send it to the try server."""
815 try: 815 try:
816 import trychange 816 import trychange
817 except ImportError: 817 except ImportError:
818 if swallow_exception: 818 if swallow_exception:
819 return 819 return
820 ErrorExit("You need to install trychange.py to use the try server.") 820 ErrorExit("You need to install trychange.py to use the try server.")
821 821
822 trychange_args = [] 822 trychange_args = []
823 settings = {
824 'port': GetCodeReviewSetting('TRYSERVER_HTTP_PORT'),
825 'host': GetCodeReviewSetting('TRYSERVER_HTTP_HOST'),
826 'svn_repo': GetCodeReviewSetting('TRYSERVER_SVN_URL'),
827 'project': GetCodeReviewSetting('TRYSERVER_PROJECT'),
828 'root': GetCodeReviewSetting('TRYSERVER_ROOT'),
829 'patchlevel': GetCodeReviewSetting('TRYSERVER_PATCHLEVEL'),
830 }
831 for (k, v) in settings.iteritems():
832 if v:
833 trychange_args.extend(['--' + k, v])
834
835 gclient_root = gclient_utils.FindGclientRoot(GetRepositoryRoot())
836 if gclient_root:
837 trychange_args.extend(['--root',
838 gclient_utils.PathDifference(gclient_root,
839 GetRepositoryRoot())])
840 if change_info: 823 if change_info:
841 trychange_args.extend(['--name', change_info.name]) 824 trychange_args.extend(['--name', change_info.name])
842 if change_info.issue: 825 if change_info.issue:
843 trychange_args.extend(["--issue", str(change_info.issue)]) 826 trychange_args.extend(["--issue", str(change_info.issue)])
844 if change_info.patchset: 827 if change_info.patchset:
845 trychange_args.extend(["--patchset", str(change_info.patchset)]) 828 trychange_args.extend(["--patchset", str(change_info.patchset)])
846 trychange_args.extend(args) 829 trychange_args.extend(args)
847 file_list = change_info.GetFileNames() 830 file_list = change_info.GetFileNames()
848 else: 831 else:
849 trychange_args.extend(args) 832 trychange_args.extend(args)
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 return 0 1201 return 0
1219 args =["svn", command] 1202 args =["svn", command]
1220 root = GetRepositoryRoot() 1203 root = GetRepositoryRoot()
1221 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()]) 1204 args.extend([os.path.join(root, x) for x in change_info.GetFileNames()])
1222 RunShell(args, True) 1205 RunShell(args, True)
1223 return 0 1206 return 0
1224 1207
1225 1208
1226 if __name__ == "__main__": 1209 if __name__ == "__main__":
1227 sys.exit(main()) 1210 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | gclient_utils.py » ('j') | gclient_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698