changeset 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 aa8b72bd1320
children 54d42e59b29c
files hgsubversion/svnmeta.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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')