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

Side by Side Diff: drover.py

Issue 6881008: Fix drover regression introduced in r80453. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 8 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 import optparse 6 import optparse
7 import os 7 import os
8 import re 8 import re
9 import sys 9 import sys
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 command = "%s %s" % (gcl_path, subcommand) 58 command = "%s %s" % (gcl_path, subcommand)
59 return os.system(command) 59 return os.system(command)
60 60
61 def gclUpload(revision, author): 61 def gclUpload(revision, author):
62 command = ("upload " + str(revision) + 62 command = ("upload " + str(revision) +
63 " --send_mail --no_presubmit --reviewers=" + author) 63 " --send_mail --no_presubmit --reviewers=" + author)
64 return runGcl(command) 64 return runGcl(command)
65 65
66 def getSVNInfo(url, revision): 66 def getSVNInfo(url, revision):
67 svn_info = subprocess2.check_output(
68 ['svn', 'info', '%s@%s' % (url, revision)]).splitlines()
69 info = {} 67 info = {}
70 for line in svn_info: 68 try:
71 match = re.search(r"(.*?):(.*)", line) 69 svn_info = subprocess2.check_output(
72 if match: 70 ['svn', 'info', '%s@%s' % (url, revision)]).splitlines()
73 info[match.group(1).strip()]=match.group(2).strip() 71 for line in svn_info:
74 72 match = re.search(r"(.*?):(.*)", line)
73 if match:
74 info[match.group(1).strip()] = match.group(2).strip()
75 except subprocess2.CalledProcessError:
76 pass
75 return info 77 return info
76 78
77 def isSVNDirty(): 79 def isSVNDirty():
78 svn_status = subprocess2.check_output(['svn', 'status']).splitlines() 80 svn_status = subprocess2.check_output(['svn', 'status']).splitlines()
79 for line in svn_status: 81 for line in svn_status:
80 match = re.search(r"^[^X?]", line) 82 match = re.search(r"^[^X?]", line)
81 if match: 83 if match:
82 return True 84 return True
83 85
84 return False 86 return False
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 546
545 if options.local and (options.revert or options.branch): 547 if options.local and (options.revert or options.branch):
546 option_parser.error("--local cannot be used with --revert or --branch") 548 option_parser.error("--local cannot be used with --revert or --branch")
547 return 1 549 return 1
548 550
549 return drover(options, args) 551 return drover(options, args)
550 552
551 553
552 if __name__ == "__main__": 554 if __name__ == "__main__":
553 sys.exit(main()) 555 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