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

Side by Side Diff: drover.py

Issue 553108: Fix branching regex to match .*? and not /d+ so that it will match "249s" in... (Closed) Base URL: svn://chrome-svn/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
« 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 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import optparse 5 import optparse
6 import os 6 import os
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import webbrowser 10 import webbrowser
(...skipping 21 matching lines...) Expand all
32 Example: %(app)s --revert 12345 32 Example: %(app)s --revert 12345
33 33
34 [Revert from branch] 34 [Revert from branch]
35 --revert <revision> --branch <branch_num> 35 --revert <revision> --branch <branch_num>
36 Example: %(app)s --revert 12345 --branch 187 36 Example: %(app)s --revert 12345 --branch 187
37 """ 37 """
38 38
39 export_map_ = None 39 export_map_ = None
40 files_info_ = None 40 files_info_ = None
41 delete_map_ = None 41 delete_map_ = None
42 file_pattern_ = r"[ ]+([MADUC])[ ]+/((?:trunk|branches/\d+)/src(.*)/(.*))" 42 file_pattern_ = r"[ ]+([MADUC])[ ]+/((?:trunk|branches/.*?)/src(.*)/(.*))"
43 43
44 def deltree(root): 44 def deltree(root):
45 """Removes a given directory""" 45 """Removes a given directory"""
46 if (not os.path.exists(root)): 46 if (not os.path.exists(root)):
47 return 47 return
48 48
49 if sys.platform == 'win32': 49 if sys.platform == 'win32':
50 os.system('rmdir /S /Q ' + root.replace('/','\\')) 50 os.system('rmdir /S /Q ' + root.replace('/','\\'))
51 else: 51 else:
52 for name in os.listdir(root): 52 for name in os.listdir(root):
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 548
549 if not options.merge and not options.revert: 549 if not options.merge and not options.revert:
550 option_parser.error("You need at least --merge or --revert") 550 option_parser.error("You need at least --merge or --revert")
551 sys.exit(1) 551 sys.exit(1)
552 552
553 if options.merge and not options.branch: 553 if options.merge and not options.branch:
554 option_parser.error("--merge requires a --branch") 554 option_parser.error("--merge requires a --branch")
555 sys.exit(1) 555 sys.exit(1)
556 556
557 sys.exit(main(options, args)) 557 sys.exit(main(options, args))
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