# HG changeset patch
# User Jun Wu <qu...@fb.com>
# Date 1496604924 25200
#      Sun Jun 04 12:35:24 2017 -0700
# Node ID 2c2cbefde423ea2537270cf5fecdf5f5d14b19e5
# Parent  df25a444c9f9f1b0860d782d6adceadd5cc810fd
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 2c2cbefde423
obsstore: make _all always calculate from _data

Now we have more advanced caching on a lower level, let's make "_all"
read-only and always calculated from its source of truth ("_data").

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -775,5 +775,5 @@ class obsstore(object):
             return self._defaultformat
 
-    @propertycache
+    @property
     def _all(self):
         markers, _offsets = self._readmarkers()
@@ -798,5 +798,4 @@ class obsstore(object):
         markers = list(markers) # to allow repeated iteration
         self._data = self._data + rawdata
-        self._all.extend(markers)
         for name in ('successors', 'precursors', 'children'):
             index = self.__dict__.get(name, None)
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to