mercurial/templatekw.py
changeset 44712 a825bfbf6642
parent 44589 fc1fa3a07af6
child 44728 59ad165f6cdb
--- a/mercurial/templatekw.py	Wed Apr 15 19:24:21 2020 +0900
+++ b/mercurial/templatekw.py	Wed Apr 15 23:11:55 2020 +0900
@@ -417,13 +417,15 @@
     if ctx.node() in wpnodes:
         return b'@'
     else:
-        merge_nodes = cache.get(b'merge_nodes', ())
-        if not merge_nodes:
+        merge_nodes = cache.get(b'merge_nodes')
+        if merge_nodes is None:
             from . import merge
 
             mergestate = merge.mergestate.read(repo)
             if mergestate.active():
                 merge_nodes = (mergestate.local, mergestate.other)
+            else:
+                merge_nodes = ()
             cache[b'merge_nodes'] = merge_nodes
 
         if ctx.node() in merge_nodes: