# HG changeset patch # User Sean Farley # Date 1395678046 18000 # Node ID 9fc3557ce85e860000da40b08d8bb8c682a7b51a # Parent aa8b72bd1320a4a339fb2b43868df520edce7528 svnmeta: turn authors into a lazy property diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -51,7 +51,7 @@ class SVNMeta(object): ui=self.repo.ui) self._layoutobj = None - self.authors = maps.AuthorMap(self) + self._authors = None self.branchmap = maps.BranchMap(self.ui, self.branchmap_file) if branchmap: @@ -231,6 +231,12 @@ class SVNMeta(object): def authors_file(self): return os.path.join(self.metapath, 'authors') + @property + def authors(self): + if self._authors is None: + self._authors = maps.AuthorMap(self) + return self._authors + @property def filemap_file(self): return os.path.join(self.metapath, 'filemap')