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

Side by Side Diff: checkout.py

Issue 11038002: Enforce the checkout object to use an absolute path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 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 | « apply_issue.py ('k') | 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 self.project_name = project_name 95 self.project_name = project_name
96 if self.project_name is None: 96 if self.project_name is None:
97 self.project_path = self.root_dir 97 self.project_path = self.root_dir
98 else: 98 else:
99 self.project_path = os.path.join(self.root_dir, self.project_name) 99 self.project_path = os.path.join(self.root_dir, self.project_name)
100 # Only used for logging purposes. 100 # Only used for logging purposes.
101 self._last_seen_revision = None 101 self._last_seen_revision = None
102 self.post_processors = post_processors 102 self.post_processors = post_processors
103 assert self.root_dir 103 assert self.root_dir
104 assert self.project_path 104 assert self.project_path
105 assert os.path.isabs(self.project_path)
105 106
106 def get_settings(self, key): 107 def get_settings(self, key):
107 return get_code_review_setting(self.project_path, key) 108 return get_code_review_setting(self.project_path, key)
108 109
109 def prepare(self, revision): 110 def prepare(self, revision):
110 """Checks out a clean copy of the tree and removes any local modification. 111 """Checks out a clean copy of the tree and removes any local modification.
111 112
112 This function shouldn't throw unless the remote repository is inaccessible, 113 This function shouldn't throw unless the remote repository is inaccessible,
113 there is no free disk space or hard issues like that. 114 there is no free disk space or hard issues like that.
114 115
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 def revisions(self, rev1, rev2): 723 def revisions(self, rev1, rev2):
723 return self.checkout.revisions(rev1, rev2) 724 return self.checkout.revisions(rev1, rev2)
724 725
725 @property 726 @property
726 def project_name(self): 727 def project_name(self):
727 return self.checkout.project_name 728 return self.checkout.project_name
728 729
729 @property 730 @property
730 def project_path(self): 731 def project_path(self):
731 return self.checkout.project_path 732 return self.checkout.project_path
OLDNEW
« no previous file with comments | « apply_issue.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698