view hgsubversion/layouts/single.py @ 1292:7bbe120be193

layouts: turn taglocations method into a property We no longer need to pass the meta path since we have an internal reference to the meta object, so we remove the parameter from the taglocations method.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:53 -0500
parents c3c4518e00aa
children 10c87b1dd653
line wrap: on
line source



import base

class SingleLayout(base.BaseLayout):
    """A layout with only the default branch"""

    def localname(self, path):
        return None

    def remotename(self, branch):
        return ''

    def remotepath(self, branch, subdir='/'):
        return subdir or '/'

    @property
    def taglocations(self):
        return []

    def get_path_tag(self, path, taglocations):
        return None

    def split_remote_name(self, path, known_branches):
        return '', path