diff mercurial/tags.py @ 19646:335a558f81dc stable 2.7.1

tags: write tag overwriting history also into tag cache file (issue3911) Before this patch, tag overwriting history is not written into tag cache file ".hg/cache/tags". This may give higher priority to local tag than global one, even if the former is overwritten by the latter, because tag overwriting history is used to compare priorities of them (as "rank"). In such cases, "hg tags" invocations using tag cache file shows incorrect tag information. This patch writes tag overwriting history also into tag cache file.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 28 Aug 2013 22:09:53 +0900
parents cb95716da5fe
children 9ea132aee96c
line wrap: on
line diff
--- a/mercurial/tags.py	Mon Aug 26 16:11:21 2013 +0900
+++ b/mercurial/tags.py	Wed Aug 28 22:09:53 2013 +0900
@@ -290,6 +290,8 @@
     # the cache.
     cachefile.write('\n')
     for (name, (node, hist)) in cachetags.iteritems():
+        for n in hist:
+            cachefile.write("%s %s\n" % (hex(n), name))
         cachefile.write("%s %s\n" % (hex(node), name))
 
     try: