From patchwork Sat Aug 16 00:33:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [7, of, 8] obsstore: add fields attribute to track each field in a markers From: Pierre-Yves David X-Patchwork-Id: 5441 Message-Id: <79d3a254de51f80fc328.1408149209@marginatus.alto.octopoid.net> To: mercurial-devel@selenic.com Cc: Pierre-Yves David Date: Fri, 15 Aug 2014 17:33:29 -0700 # HG changeset patch # User Pierre-Yves David # 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