diff hgsubversion/layouts/standard.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/layouts/standard.py
+++ b/hgsubversion/layouts/standard.py
@@ -56,3 +56,11 @@ class StandardLayout(base.BaseLayout):
             self._tag_locations.reverse()
 
         return self._tag_locations
+
+    def get_path_tag(self, path, taglocations):
+        for tagspath in taglocations:
+            if path.startswith(tagspath + '/'):
+                    tag = path[len(tagspath) + 1:]
+                    if tag:
+                        return tag
+        return None