# HG changeset patch
# User Matt Mackall <mpm@selenic.com>
# Date 1166301694 21600
#      Sat Dec 16 14:41:34 2006 -0600
# Node ID fe075ddf3272c9d0e6916a100ea66960ec743183
# Parent  4bc5a2405b12bebed7c7f9f3b2a488c3f2e13894
convert-repo: avoid adding bogus value to shamap on tag update

diff --git a/contrib/convert-repo b/contrib/convert-repo
--- a/contrib/convert-repo
+++ b/contrib/convert-repo
@@ -295,7 +295,8 @@
             nrev = self.dest.puttags(ctags)
             # write another hash correspondence to override the previous
             # one so we don't end up with extra tag heads
-            file(self.mapfile, "a").write("%s %s\n" % (c, nrev))
+            if nrev:
+                file(self.mapfile, "a").write("%s %s\n" % (c, nrev))
 
 gitpath, hgpath, mapfile = sys.argv[1:]
 if os.path.isdir(gitpath + "/.git"):