comparison hgext3rd/topic/discovery.py @ 4544:75b414b298f5 stable

topic: only wrap wireprotocaps 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 13:03:01 +0200
parents 7f1e1ba3d16b
children db3e7f6b5ceb
comparison
equal deleted inserted replaced
4543:7f1e1ba3d16b 4544:75b414b298f5
196 exchange._pushb2ctxcheckheads(pushop, bundler) 196 exchange._pushb2ctxcheckheads(pushop, bundler)
197 return orig(pushop, bundler) 197 return orig(pushop, bundler)
198 198
199 def wireprotocaps(orig, repo, proto): 199 def wireprotocaps(orig, repo, proto):
200 caps = orig(repo, proto) 200 caps = orig(repo, proto)
201 if repo.peer().capable('topics'): 201 if common.hastopicext(repo) and repo.peer().capable('topics'):
202 caps.append('topics') 202 caps.append('topics')
203 return caps 203 return caps
204 204
205 def modsetup(ui): 205 def modsetup(ui):
206 """run at uisetup time to install all destinations wrapping""" 206 """run at uisetup time to install all destinations wrapping"""