Mercurial > hgsubversion
comparison hgsubversion/svnmeta.py @ 1207:9fc3557ce85e
svnmeta: turn authors into a lazy property
| author | Sean Farley <sean.michael.farley@gmail.com> |
|---|---|
| date | Mon, 24 Mar 2014 11:20:46 -0500 |
| parents | 955f7173e498 |
| children | 54d42e59b29c |
comparison
equal
deleted
inserted
replaced
| 1206:aa8b72bd1320 | 1207:9fc3557ce85e |
|---|---|
| 49 self._tags = None | 49 self._tags = None |
| 50 self._layout = layouts.detect.layout_from_file(self.metapath, | 50 self._layout = layouts.detect.layout_from_file(self.metapath, |
| 51 ui=self.repo.ui) | 51 ui=self.repo.ui) |
| 52 self._layoutobj = None | 52 self._layoutobj = None |
| 53 | 53 |
| 54 self.authors = maps.AuthorMap(self) | 54 self._authors = None |
| 55 | 55 |
| 56 self.branchmap = maps.BranchMap(self.ui, self.branchmap_file) | 56 self.branchmap = maps.BranchMap(self.ui, self.branchmap_file) |
| 57 if branchmap: | 57 if branchmap: |
| 58 self.branchmap.load(branchmap) | 58 self.branchmap.load(branchmap) |
| 59 | 59 |
| 228 return os.path.join(self.metapath, 'branch_info') | 228 return os.path.join(self.metapath, 'branch_info') |
| 229 | 229 |
| 230 @property | 230 @property |
| 231 def authors_file(self): | 231 def authors_file(self): |
| 232 return os.path.join(self.metapath, 'authors') | 232 return os.path.join(self.metapath, 'authors') |
| 233 | |
| 234 @property | |
| 235 def authors(self): | |
| 236 if self._authors is None: | |
| 237 self._authors = maps.AuthorMap(self) | |
| 238 return self._authors | |
| 233 | 239 |
| 234 @property | 240 @property |
| 235 def filemap_file(self): | 241 def filemap_file(self): |
| 236 return os.path.join(self.metapath, 'filemap') | 242 return os.path.join(self.metapath, 'filemap') |
| 237 | 243 |
