'Parses output of `hg tags`, eg:
tip                              278:c4b2d21db51a
0.2.2                            152:6b0364d98837
0.2.1                            117:a14b7b6ffa03
0.1                               50:30c2c6b3a055
maintenance release 1             10:f83c32fe8126
Into VCSVersion objects with the tag name as verbose_name and the
commit hash as identifier.'

def parse_tags(self, data):

    vcs_tags = []
    tag_lines = [line.strip() for line in data.splitlines()]
    tag_pairs = [line.rsplit(None, 1) for line in tag_lines]
    for row in tag_pairs:
        if (len(row) != 2):
            continue
        (name, commit) = row
        if (name == 'tip'):
            continue
        (_, commit_hash) = commit.split(':')
        vcs_tags.append(VCSVersion(self, commit_hash, name))
    return vcs_tags
