hgext3rd/topic/discovery.py
branchstable
changeset 4540 22cde12d9467
parent 4263 35130e428ebd
child 4541 7e98faf278d6
--- a/hgext3rd/topic/discovery.py	Thu Apr 18 12:41:41 2019 +0200
+++ b/hgext3rd/topic/discovery.py	Thu Apr 18 13:01:39 2019 +0200
@@ -12,6 +12,9 @@
     extensions,
     util,
 )
+from . import (
+    common,
+)
 
 try:
     from mercurial import wireproto
@@ -26,7 +29,10 @@
 
     publishing = ('phases' not in remote.listkeys('namespaces')
                   or bool(remote.listkeys('phases').get('publishing', False)))
-    if ((publishing or not remote.capable('topics'))
+
+    if not common.hastopicext(pushop.repo):
+        return orig(pushop, *args, **kwargs)
+    elif ((publishing or not remote.capable('topics'))
             and not getattr(pushop, 'publish', False)):
         return orig(pushop, *args, **kwargs)