changeset 22221:e75b1a3c1dbc

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 12 Aug 2014 01:49:38 -0700
parents 908c76e84ec5
children 883e8b6bd461
files mercurial/obsolete.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 = {}