/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to refs.py

  • Committer: Jelmer Vernooij
  • Date: 2010-06-23 19:07:06 UTC
  • mfrom: (0.200.930 trunk)
  • mto: (0.200.951 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20100623190706-t2mqoj2o304ni80f
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    for k,v in refs.iteritems():
36
36
        if k.startswith("refs/tags/") and not k.endswith("^{}"):
37
37
            v = refs.get(k+"^{}", v)
38
 
            try:
39
 
                tagname = ref_to_tag_name(k)
40
 
            except UnicodeDecodeError:
41
 
                pass
42
 
            else:
43
 
                ret[tagname] = v
 
38
            ret[k[len("refs/tags/"):]] = v
44
39
    return ret
45
40
 
46
41
 
84
79
 
85
80
def ref_to_tag_name(ref):
86
81
    if ref.startswith("refs/tags/"):
87
 
        return ref[len('refs/tags/'):].decode("utf-8")
 
82
        return ref[len('refs/tags/'):]
88
83
    raise ValueError("unable to map ref %s back to branch name" % ref)
89
84
 
90
85