[PATCH 7 of 8] obsstore: add fields attribute to track each field in a markers
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sat Aug 16 00:33:29 UTC 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1407833378 25200
# Tue Aug 12 01:49:38 2014 -0700
# Node ID 79d3a254de51f80fc32888db2465cf38350a4773
# Parent cffffb97678df7fb8530353a1c26879260c8705a
obsstore: add fields attribute to track each field in a markers
We are going to increase the amount of data explicitly stored in obsolescence
marker. This mean we are going to have a longer tuple and some value will be
shuffled around. So we add a ``fields`` attributes to the obsstore class to
keep track of what entry is what. This will be useful for extensions and for
documentation purpose.
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -236,10 +236,12 @@ class obsstore(object):
Markers can be accessed with two mappings:
- precursors[x] -> set(markers on precursors edges of x)
- successors[x] -> set(markers on successors edges of x)
"""
+ fields = ('prec', 'succs', 'flag', 'meta')
+
def __init__(self, sopener):
# caches for various obsolescence related cache
self.caches = {}
self._all = []
# new markers to serialize
More information about the Mercurial-devel
mailing list