changeset 4536:9837e8d378de stable

topic: only wrap gettopicrepo for repo with topic This helps repository with and without topic to coexist in the same process.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 18 Apr 2019 12:36:11 +0200
parents 8dae14cd076a
children db3e17adee3e
files hgext3rd/topic/topicmap.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/topicmap.py	Thu Apr 18 11:13:49 2019 +0200
+++ b/hgext3rd/topic/topicmap.py	Thu Apr 18 12:36:11 2019 +0200
@@ -12,6 +12,10 @@
     util,
 )
 
+from . import (
+    common,
+)
+
 basefilter = set(['base', 'immutable'])
 def topicfilter(name):
     """return a "topic" version of a filter level"""
@@ -30,6 +34,8 @@
     return filtername.endswith('-topic')
 
 def gettopicrepo(repo):
+    if not common.hastopicext(repo):
+        return repo
     filtername = topicfilter(repo.filtername)
     if filtername == repo.filtername:
         return repo