diff hgsubversion/svnmeta.py @ 1027:16045f6f3fef

layouts: pull svn path -> potential tag name mapping into layouts
author David Schleimer <dschleimer@fb.com>
date Wed, 26 Jun 2013 14:40:31 -0500
parents 66395f232b7c
children 513f2b607b06
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -251,14 +251,9 @@ class SVNMeta(object):
         Note that it's only a tag if it was copied from the path '' in a branch
         (or tag) we have, for our purposes.
         """
-        if self.layout != 'single':
-            path = self.normalize(path)
-            for tagspath in self.layoutobj.taglocations(self.meta_data_dir):
-                if path.startswith(tagspath + '/'):
-                    tag = path[len(tagspath) + 1:]
-                    if tag:
-                        return tag
-        return None
+        path = self.normalize(path)
+        taglocations = self.layoutobj.taglocations(self.meta_data_dir)
+        return self.layoutobj.get_path_tag(path, taglocations)
 
     def split_branch_path(self, path, existing=True):
         """Figure out which branch inside our repo this path represents, and