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

Side by Side Diff: trychange.py

Issue 528003: Using the root codereview.settings seems to be a problem for NACL... (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 #!/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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 self.checkout_root = scm.SVN.GetCheckoutRoot(self.checkout_root) 145 self.checkout_root = scm.SVN.GetCheckoutRoot(self.checkout_root)
146 if not self.options.email: 146 if not self.options.email:
147 # Assumes the svn credential is an email address. 147 # Assumes the svn credential is an email address.
148 self.options.email = scm.SVN.GetEmail(self.checkout_root) 148 self.options.email = scm.SVN.GetEmail(self.checkout_root)
149 logging.info("SVN(%s)" % self.checkout_root) 149 logging.info("SVN(%s)" % self.checkout_root)
150 150
151 def ReadRootFile(self, filename): 151 def ReadRootFile(self, filename):
152 try: 152 try:
153 # Try to search on the subversion repository for the file. 153 # Try to search on the subversion repository for the file.
154 import gcl 154 import gcl
155 data = gcl.GetCachedFile(filename, use_root=True) 155 data = gcl.GetCachedFile(filename)
156 logging.debug('%s:\n%s' % (filename, data)) 156 logging.debug('%s:\n%s' % (filename, data))
157 return data 157 return data
158 except ImportError: 158 except ImportError:
159 try: 159 try:
160 data = gclient_utils.FileRead(os.path.join(self.checkout_root, 160 data = gclient_utils.FileRead(os.path.join(self.checkout_root,
161 filename)) 161 filename))
162 logging.debug('%s:\n%s' % (filename, data)) 162 logging.debug('%s:\n%s' % (filename, data))
163 return data 163 return data
164 except (IOError, OSError): 164 except (IOError, OSError):
165 logging.debug('%s:\nNone' % filename) 165 logging.debug('%s:\nNone' % filename)
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 except (InvalidScript, NoTryServerAccess), e: 611 except (InvalidScript, NoTryServerAccess), e:
612 if swallow_exception: 612 if swallow_exception:
613 return 1 613 return 1
614 print e 614 print e
615 return 1 615 return 1
616 return 0 616 return 0
617 617
618 618
619 if __name__ == "__main__": 619 if __name__ == "__main__":
620 sys.exit(TryChange(None, [], False)) 620 sys.exit(TryChange(None, [], False))
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