diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -783,7 +783,9 @@ kwargs = {} if defaultformat is not None: kwargs[r'defaultformat'] = defaultformat - readonly = not isenabled(repo, createmarkersopt) + + obsopts = getoptions(repo) + readonly = not obsopts[createmarkersopt] and not obsopts[localonlymodeopt] store = obsstore(repo.svfs, readonly=readonly, **kwargs) if store and readonly: ui.warn(_('obsolete feature not enabled but %i markers found!\n')