convert-repo: retrieve the commit hash from the tag object for tag import
authorMatt Mackall <mpm@selenic.com>
Wed, 05 Oct 2005 17:11:06 -0700
changeset 1386 a1040345fdda
parent 1385 adb3de56635b
child 1387 0c7e8d345564
convert-repo: retrieve the commit hash from the tag object for tag import
contrib/convert-repo
--- a/contrib/convert-repo	Wed Oct 05 17:09:51 2005 -0700
+++ b/contrib/convert-repo	Wed Oct 05 17:11:06 2005 -0700
@@ -82,6 +82,8 @@
         for f in os.listdir(self.path + "/refs/tags"):
             try:
                 h = file(self.path + "/refs/tags/" + f).read().strip()
+                c = self.catfile(h, "tag") # read the commit hash
+                h = c.splitlines()[0].split()[1]
                 tags[f] = h
             except:
                 pass