contrib/convert-repo
changeset 1386 a1040345fdda
parent 1385 adb3de56635b
child 1387 0c7e8d345564
equal deleted inserted replaced
1385:adb3de56635b 1386:a1040345fdda
    80     def gettags(self):
    80     def gettags(self):
    81         tags = {}
    81         tags = {}
    82         for f in os.listdir(self.path + "/refs/tags"):
    82         for f in os.listdir(self.path + "/refs/tags"):
    83             try:
    83             try:
    84                 h = file(self.path + "/refs/tags/" + f).read().strip()
    84                 h = file(self.path + "/refs/tags/" + f).read().strip()
       
    85                 c = self.catfile(h, "tag") # read the commit hash
       
    86                 h = c.splitlines()[0].split()[1]
    85                 tags[f] = h
    87                 tags[f] = h
    86             except:
    88             except:
    87                 pass
    89                 pass
    88         return tags
    90         return tags
    89 
    91