# HG changeset patch # User Sean Farley # Date 1395678047 18000 # Node ID 20c28c51155139ad7a5014ecc76c664b578b0672 # Parent 54d42e59b29c025d7a9c59fd6815781bd5402c96 svnmeta: turn tagmap into a lazy property diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -56,7 +56,7 @@ class SVNMeta(object): if branchmap: self.branchmap.load(branchmap) - self.tagmap = maps.TagMap(self.ui, self.tagmap_file) + self._tagmap = None self.filemap = maps.FileMap(self.ui, self.filemap_file) if filemap: @@ -258,6 +258,12 @@ class SVNMeta(object): # called tag-renames for backwards compatibility return os.path.join(self.metapath, 'tag-renames') + @property + def tagmap(self): + if self._tagmap is None: + self._tagmap = maps.TagMap(self.ui, self.tagmap_file) + return self._tagmap + @property def revmap_file(self): return os.path.join(self.metapath, 'rev_map')