# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1376114539 -7200 # Node ID 32166f55751810b5475232f8178cbc72ce7a491a # Parent 1a4d0f1563d0b2935c981e81d519479ad3d914e1 svnmeta: add utility method for generating a tag path diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -461,6 +461,13 @@ class SVNMeta(object): path = self.normalize(path) return self.layoutobj.get_path_tag(path, self.layoutobj.taglocations) + def get_tag_path(self, name): + """Return a path corresponding to the given tag name""" + try: + return self.layoutobj.taglocations[0] + '/' + name + except IndexError: + return None + def split_branch_path(self, path, existing=True): """Figure out which branch inside our repo this path represents, and also figure out which path inside that branch it is.