obsstore: make the readonly attribute accessible
We want to gracefully handle the read only case in some case (current target:
advisory obsmarkers parts in bundle2). So we expose the attribute in a clean
way.
--- a/mercurial/obsolete.py Mon Oct 05 04:26:26 2015 -0700
+++ b/mercurial/obsolete.py Thu Oct 15 12:45:34 2015 +0100
@@ -542,6 +542,13 @@
pass
return bool(self._all)
+ @property
+ def readonly(self):
+ """True if marker creation is disabled
+
+ Remove me in the future when obsolete marker is always on."""
+ return self._readonly
+
def create(self, transaction, prec, succs=(), flag=0, parents=None,
date=None, metadata=None):
"""obsolete: add a new obsolete marker