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

Side by Side Diff: checkout.py

Issue 11232069: patch can be None in the exception, causing a secondary exception. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 1 month 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 # coding=utf8 1 # coding=utf8
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Manages a project checkout. 5 """Manages a project checkout.
6 6
7 Includes support for svn, git-svn and git. 7 Includes support for svn, git-svn and git.
8 """ 8 """
9 9
10 import ConfigParser 10 import ConfigParser
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 def filename(self): 69 def filename(self):
70 if self.patch: 70 if self.patch:
71 return self.patch.filename 71 return self.patch.filename
72 72
73 def __str__(self): 73 def __str__(self):
74 out = [] 74 out = []
75 if self.filename: 75 if self.filename:
76 out.append('Failed to apply patch for %s:' % self.filename) 76 out.append('Failed to apply patch for %s:' % self.filename)
77 if self.status: 77 if self.status:
78 out.append(self.status) 78 out.append(self.status)
79 out.append('Patch: %s' % self.patch.dump()) 79 if self.patch:
80 out.append('Patch: %s' % self.patch.dump())
80 return '\n'.join(out) 81 return '\n'.join(out)
81 82
82 83
83 class CheckoutBase(object): 84 class CheckoutBase(object):
84 # Set to None to have verbose output. 85 # Set to None to have verbose output.
85 VOID = subprocess2.VOID 86 VOID = subprocess2.VOID
86 87
87 def __init__(self, root_dir, project_name, post_processors): 88 def __init__(self, root_dir, project_name, post_processors):
88 """ 89 """
89 Args: 90 Args:
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 def revisions(self, rev1, rev2): 724 def revisions(self, rev1, rev2):
724 return self.checkout.revisions(rev1, rev2) 725 return self.checkout.revisions(rev1, rev2)
725 726
726 @property 727 @property
727 def project_name(self): 728 def project_name(self):
728 return self.checkout.project_name 729 return self.checkout.project_name
729 730
730 @property 731 @property
731 def project_path(self): 732 def project_path(self):
732 return self.checkout.project_path 733 return self.checkout.project_path
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