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

Side by Side Diff: drover.py

Issue 3368007: Update branch path-finding regex to work directly with WebKit repository.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 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) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 import optparse 6 import optparse
7 import os 7 import os
8 import re 8 import re
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 def checkoutRevision(url, revision, branch_url, revert=False): 169 def checkoutRevision(url, revision, branch_url, revert=False):
170 files_info = getFileInfo(url, revision) 170 files_info = getFileInfo(url, revision)
171 paths = getBestMergePaths2(files_info, revision) 171 paths = getBestMergePaths2(files_info, revision)
172 export_map = getBestExportPathsMap2(files_info, revision) 172 export_map = getBestExportPathsMap2(files_info, revision)
173 173
174 command = 'svn checkout -N ' + branch_url 174 command = 'svn checkout -N ' + branch_url
175 print command 175 print command
176 os.system(command) 176 os.system(command)
177 177
178 match = re.search(r"svn://.*/(.*)", branch_url) 178 match = re.search(r"^[a-z]+://.*/(.*)", branch_url)
179 179
180 if match: 180 if match:
181 os.chdir(match.group(1)) 181 os.chdir(match.group(1))
182 182
183 # This line is extremely important due to the way svn behaves in the 183 # This line is extremely important due to the way svn behaves in the
184 # set-depths action. If parents aren't handled before children, the child 184 # set-depths action. If parents aren't handled before children, the child
185 # directories get clobbered and the merge step fails. 185 # directories get clobbered and the merge step fails.
186 paths.sort() 186 paths.sort()
187 187
188 # Checkout the directories that already exist 188 # Checkout the directories that already exist
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 if options.local and (options.revert or options.branch): 551 if options.local and (options.revert or options.branch):
552 option_parser.error("--local cannot be used with --revert or --branch") 552 option_parser.error("--local cannot be used with --revert or --branch")
553 return 1 553 return 1
554 554
555 return drover(options, args) 555 return drover(options, args)
556 556
557 557
558 if __name__ == "__main__": 558 if __name__ == "__main__":
559 sys.exit(main()) 559 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