@staticmethod
def _build_legacy_tag(format, version):
    """
        Legacy tags (prior to 0.5.5) dropped epochs and didn't honor the '~'

        >>> DebianGitRepository._build_legacy_tag('upstream/%(version)s', '1:2.0~3')
        'upstream/2.0.3'
        """
    if ':' in version:
        version = version.split(':', 1)[1]
    version = version.replace('~', '.')
    return format % dict(version=version)
