hgext3rd/topic/destination.py
changeset 2653 13313d0cab71
parent 2017 dd1055f38397
child 2891 b18d2b2f18a6
--- a/hgext3rd/topic/destination.py	Thu Jun 22 09:47:14 2017 +0200
+++ b/hgext3rd/topic/destination.py	Thu Jun 22 10:13:29 2017 +0200
@@ -89,14 +89,14 @@
     # but that is expensive
     #
     # we should write plain code instead
-    with topicmap.usetopicmap(repo):
-        tmap = repo.branchmap()
-        if branch not in tmap:
-            return []
-        elif all:
-            return tmap.branchheads(branch)
-        else:
-            return [tmap.branchtip(branch)]
+
+    tmap = topicmap.gettopicrepo(repo).branchmap()
+    if branch not in tmap:
+        return []
+    elif all:
+        return tmap.branchheads(branch)
+    else:
+        return [tmap.branchtip(branch)]
 
 def modsetup(ui):
     """run a uisetup time to install all destinations wrapping"""