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

Side by Side Diff: drover.py

Issue 3811001: Fix finding path to gcl when drover is run with a relative path.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 years, 2 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 28 matching lines...) Expand all
39 39
40 [Revert from branch] 40 [Revert from branch]
41 --revert <revision> --branch <branch_num> 41 --revert <revision> --branch <branch_num>
42 Example: %(app)s --revert 12345 --branch 187 42 Example: %(app)s --revert 12345 --branch 187
43 """ 43 """
44 44
45 export_map_ = None 45 export_map_ = None
46 files_info_ = None 46 files_info_ = None
47 delete_map_ = None 47 delete_map_ = None
48 file_pattern_ = r"[ ]+([MADUC])[ ]+/((?:trunk|branches/.*?)/src(.*)/(.*))" 48 file_pattern_ = r"[ ]+([MADUC])[ ]+/((?:trunk|branches/.*?)/src(.*)/(.*))"
49 depot_tools_dir_ = os.path.dirname(os.path.abspath(__file__))
49 50
50 51
51 def runGcl(subcommand): 52 def runGcl(subcommand):
52 gcl_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gcl") 53 gcl_path = os.path.join(depot_tools_dir_, "gcl")
53 if not os.path.exists(gcl_path): 54 if not os.path.exists(gcl_path):
54 print "WARNING: gcl not found beside drover.py. Using system gcl instead..." 55 print "WARNING: gcl not found beside drover.py. Using system gcl instead..."
55 gcl_path = 'gcl' 56 gcl_path = 'gcl'
56 57
57 command = "%s %s" % (gcl_path, subcommand) 58 command = "%s %s" % (gcl_path, subcommand)
58 return os.system(command) 59 return os.system(command)
59 60
60 def gclUpload(revision, author): 61 def gclUpload(revision, author):
61 command = ("upload " + str(revision) + 62 command = ("upload " + str(revision) +
62 " --send_mail --no_presubmit --reviewers=" + author) 63 " --send_mail --no_presubmit --reviewers=" + author)
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 552
552 if options.local and (options.revert or options.branch): 553 if options.local and (options.revert or options.branch):
553 option_parser.error("--local cannot be used with --revert or --branch") 554 option_parser.error("--local cannot be used with --revert or --branch")
554 return 1 555 return 1
555 556
556 return drover(options, args) 557 return drover(options, args)
557 558
558 559
559 if __name__ == "__main__": 560 if __name__ == "__main__":
560 sys.exit(main()) 561 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