obsstore: add fields attribute to track each field in a marker
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 12 Aug 2014 01:49:38 -0700
changeset 22221 e75b1a3c1dbc
parent 22220 908c76e84ec5
child 22222 883e8b6bd461
obsstore: add fields attribute to track each field in a marker We are going to increase the amount of data explicitly stored in obsolescence markers. This mean we are going to have a longer tuple and some values will be shuffled around. So we add a ``fields`` attribute to the obsstore class to keep track of what entry is what. This will be useful for extensions and for documentation purpose.
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Wed Aug 13 23:42:36 2014 -0700
+++ b/mercurial/obsolete.py	Tue Aug 12 01:49:38 2014 -0700
@@ -238,6 +238,8 @@
     - 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 = {}