changeset 1079:c1077b223648

svnmeta: factor out a property for obtaining the tag locations
author Dan Villiom Podlaski Christiansen <dan@cabo.dk>
date Fri, 09 Aug 2013 15:56:24 +0200
parents 1afd308b8f46
children 661f4065bfbf
files hgsubversion/svnmeta.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -244,6 +244,10 @@ class SVNMeta(object):
             path = path[1:]
         return path
 
+    @property
+    def taglocations(self):
+        return self.layoutobj.taglocations(self.meta_data_dir)
+
     def get_path_tag(self, path):
         """If path could represent the path to a tag, returns the
         potential (non-empty) tag name. Otherwise, returns None
@@ -252,8 +256,7 @@ class SVNMeta(object):
         (or tag) we have, for our purposes.
         """
         path = self.normalize(path)
-        taglocations = self.layoutobj.taglocations(self.meta_data_dir)
-        return self.layoutobj.get_path_tag(path, taglocations)
+        return self.layoutobj.get_path_tag(path, self.taglocations)
 
     def split_branch_path(self, path, existing=True):
         """Figure out which branch inside our repo this path represents, and