Comments
Patch
@@ -2319,7 +2319,7 @@ def obsexcprg(ui, *args, **kwargs):
if getattr(exchange, '_pushdiscoveryobsmarkers', None) is not None:
@eh.wrapfunction(exchange, '_pushdiscoveryobsmarkers')
def _pushdiscoveryobsmarkers(orig, pushop):
- if (obsolete._enabled
+ if (obsolete.isenabled(pushop.repo, obsolete.exchangeopt)
and pushop.repo.obsstore
and 'obsolete' in pushop.remote.listkeys('namespaces')):
repo = pushop.repo
@@ -2361,7 +2361,7 @@ if getattr(exchange, '_pushdiscoveryobsm
def discocapabilities(orig, repo, proto):
"""wrapper to advertise new capability"""
caps = orig(repo, proto)
- if obsolete._enabled:
+ if obsolete.isenabled(repo, obsolete.exchangeopt):
caps += ' _evoext_obshash_0'
return caps
@@ -2496,7 +2496,7 @@ def _pushobsolete(orig, pushop):
remote = pushop.remote
unfi = repo.unfiltered()
cl = unfi.changelog
- if (obsolete._enabled and repo.obsstore and
+ if (obsolete.isenabled(repo, obsolete.exchangeopt) and repo.obsstore and
'obsolete' in remote.listkeys('namespaces')):
markers = pushop.outobsmarkers
if not markers:
@@ -2660,7 +2660,7 @@ if getattr(exchange, '_getbundleobsmarke
@eh.wrapfunction(exchange, '_pullobsolete')
def _pullobsolete(orig, pullop):
- if not obsolete._enabled:
+ if not obsolete.isenabled(pullop.repo, obsolete.exchangeopt):
return None
if 'obsmarkers' not in getattr(pullop, 'todosteps', ['obsmarkers']):
return None
@@ -2864,7 +2864,7 @@ def debugobsconvert(ui, repo, new_format
def capabilities(orig, repo, proto):
"""wrapper to advertise new capability"""
caps = orig(repo, proto)
- if obsolete._enabled:
+ if obsolete.isenabled(repo, obsolete.exchangeopt):
caps += ' _evoext_pushobsmarkers_0'
caps += ' _evoext_pullobsmarkers_0'
caps += ' _evoext_obshash_0'