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

Side by Side Diff: trychange.py

Issue 9108030: trychange.py: make --sub_rep work again (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 8 years, 11 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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 """Client-side script to send a try job to the try server. It communicates to 6 """Client-side script to send a try job to the try server. It communicates to
7 the try server by either writting to a svn repository or by directly connecting 7 the try server by either writting to a svn repository or by directly connecting
8 to the server by HTTP. 8 to the server by HTTP.
9 """ 9 """
10 10
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 file_list = [f.LocalPath() for f in change.AffectedFiles()] 689 file_list = [f.LocalPath() for f in change.AffectedFiles()]
690 690
691 if options.upstream_branch: 691 if options.upstream_branch:
692 path += '@' + options.upstream_branch 692 path += '@' + options.upstream_branch
693 # Clear file list so that the correct list will be retrieved from the 693 # Clear file list so that the correct list will be retrieved from the
694 # upstream branch. 694 # upstream branch.
695 file_list = [] 695 file_list = []
696 checkouts.append(GuessVCS(options, path, file_list)) 696 checkouts.append(GuessVCS(options, path, file_list))
697 checkouts[0].AutomagicalSettings() 697 checkouts[0].AutomagicalSettings()
698 for item in options.sub_rep: 698 for item in options.sub_rep:
699 checkout = GuessVCS(options, os.path.join(checkouts[0].checkout_root, 699 # Pass file_list=None because we don't know the sub repo's file list.
700 item), file_list) 700 checkout = GuessVCS(options,
701 os.path.join(checkouts[0].checkout_root, item),
702 None)
701 if checkout.checkout_root in [c.checkout_root for c in checkouts]: 703 if checkout.checkout_root in [c.checkout_root for c in checkouts]:
702 parser.error('Specified the root %s two times.' % 704 parser.error('Specified the root %s two times.' %
703 checkout.checkout_root) 705 checkout.checkout_root)
704 checkouts.append(checkout) 706 checkouts.append(checkout)
705 707
706 can_http = options.port and options.host 708 can_http = options.port and options.host
707 can_svn = options.svn_repo 709 can_svn = options.svn_repo
708 # If there was no transport selected yet, now we must have enough data to 710 # If there was no transport selected yet, now we must have enough data to
709 # select one. 711 # select one.
710 if not options.send_patch and not (can_http or can_svn): 712 if not options.send_patch and not (can_http or can_svn):
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 return 1 812 return 1
811 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 813 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
812 print >> sys.stderr, e 814 print >> sys.stderr, e
813 return 1 815 return 1
814 return 0 816 return 0
815 817
816 818
817 if __name__ == "__main__": 819 if __name__ == "__main__":
818 fix_encoding.fix_encoding() 820 fix_encoding.fix_encoding()
819 sys.exit(TryChange(None, None, False)) 821 sys.exit(TryChange(None, None, False))
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