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

Side by Side Diff: trychange.py

Issue 538009: Fix case sensitivity issues and svn move patches for --sub_rep on Windows.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 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
« scm.py ('K') | « tests/scm_unittest.py ('k') | 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) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 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 """Client-side script to send a try job to the try server. It communicates to 5 """Client-side script to send a try job to the try server. It communicates to
6 the try server by either writting to a svn repository or by directly connecting 6 the try server by either writting to a svn repository or by directly connecting
7 to the server by HTTP. 7 to the server by HTTP.
8 """ 8 """
9 9
10 import datetime 10 import datetime
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 else: 561 else:
562 # Use this as the base. 562 # Use this as the base.
563 root = checkouts[0].checkout_root 563 root = checkouts[0].checkout_root
564 diffs = [] 564 diffs = []
565 for checkout in checkouts: 565 for checkout in checkouts:
566 diff = checkout.GenerateDiff().splitlines(True) 566 diff = checkout.GenerateDiff().splitlines(True)
567 # Munge it. 567 # Munge it.
568 path_diff = gclient_utils.PathDifference(root, checkout.checkout_root) 568 path_diff = gclient_utils.PathDifference(root, checkout.checkout_root)
569 for i in range(len(diff)): 569 for i in range(len(diff)):
570 if diff[i].startswith('--- ') or diff[i].startswith('+++ '): 570 if diff[i].startswith('--- ') or diff[i].startswith('+++ '):
571 diff[i] = diff[i][0:4] + posixpath.join(path_diff, diff[i][4:]) 571 new_file = posixpath.join(path_diff, diff[i][4:]).replace('\\', '/')
572 diff[i] = diff[i][0:4] + new_file
572 diffs.extend(diff) 573 diffs.extend(diff)
573 options.diff = ''.join(diffs) 574 options.diff = ''.join(diffs)
574 575
575 if not options.bot: 576 if not options.bot:
576 # Get try slaves from PRESUBMIT.py files if not specified. 577 # Get try slaves from PRESUBMIT.py files if not specified.
577 # Even if the diff comes from options.url, use the local checkout for bot 578 # Even if the diff comes from options.url, use the local checkout for bot
578 # selection. 579 # selection.
579 try: 580 try:
580 import presubmit_support 581 import presubmit_support
581 root_presubmit = checkouts[0].ReadRootFile('PRESUBMIT.py') 582 root_presubmit = checkouts[0].ReadRootFile('PRESUBMIT.py')
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 except (InvalidScript, NoTryServerAccess), e: 623 except (InvalidScript, NoTryServerAccess), e:
623 if swallow_exception: 624 if swallow_exception:
624 return 1 625 return 1
625 print e 626 print e
626 return 1 627 return 1
627 return 0 628 return 0
628 629
629 630
630 if __name__ == "__main__": 631 if __name__ == "__main__":
631 sys.exit(TryChange(None, [], False)) 632 sys.exit(TryChange(None, [], False))
OLDNEW
« scm.py ('K') | « tests/scm_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698