diff mercurial/localrepo.py @ 22951:6c86c673dde6

obsolete: add createmarkers option The basic obsolete option is allowing the creation of obsolete markers. This does not enable other features, such as allowing unstable commits or exchanging obsolete markers.
author Durham Goode <durham@fb.com>
date Tue, 14 Oct 2014 13:23:52 -0700
parents bb8278b289ee
children 90f86ad3d4ff
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Oct 14 13:20:31 2014 -0700
+++ b/mercurial/localrepo.py	Tue Oct 14 13:23:52 2014 -0700
@@ -406,9 +406,10 @@
         kwargs = {}
         if defaultformat is not None:
             kwargs['defaultformat'] = defaultformat
-        store = obsolete.obsstore(self.sopener, readonly=not obsolete._enabled,
+        readonly = not obsolete.isenabled(self, obsolete.createmarkersopt)
+        store = obsolete.obsstore(self.sopener, readonly=readonly,
                                   **kwargs)
-        if store and not obsolete._enabled:
+        if store and readonly:
             # message is rare enough to not be translated
             msg = 'obsolete feature not enabled but %i markers found!\n'
             self.ui.warn(msg % len(list(store)))