comparison contrib/convert-repo @ 1386:a1040345fdda

convert-repo: retrieve the commit hash from the tag object for tag import
author Matt Mackall <mpm@selenic.com>
date Wed, 05 Oct 2005 17:11:06 -0700
parents adb3de56635b
children 0c7e8d345564
comparison
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