D2680: [PoC] obsolete: make markers database writable if local-only mode enabled
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Mon Mar 5 00:43:00 UTC 2018
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2680
AFFECTED FILES
mercurial/obsolete.py
CHANGE DETAILS
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')
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list