changeset 26684:74ff350c208c

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 15 Oct 2015 12:45:34 +0100
parents 634666c48b7d
children ea390d889d3a
files mercurial/obsolete.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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