mercurial/repoview.py
branchstable
changeset 45412 aaeccdb6e654
parent 45115 672ad1f6eeb8
child 45523 5ed6efedc457
--- a/mercurial/repoview.py	Wed Sep 02 12:31:37 2020 +0200
+++ b/mercurial/repoview.py	Fri Sep 04 15:21:02 2020 -0400
@@ -62,6 +62,17 @@
         rev = cl.index.get_rev
         pinned.update(rev(t[0]) for t in tags.values())
         pinned.discard(None)
+
+    # Avoid cycle: mercurial.filemerge -> mercurial.templater ->
+    # mercurial.templatefuncs -> mercurial.revset -> mercurial.repoview ->
+    # mercurial.mergestate -> mercurial.filemerge
+    from . import mergestate
+
+    ms = mergestate.mergestate.read(repo)
+    if ms.active():
+        pinned.add(ms.localctx.rev())
+        pinned.add(ms.otherctx.rev())
+
     return pinned