Patchwork [1,of,8] obsstore: add some documentation about the marker fields

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 19, 2014, 10:46 p.m.
Message ID <4f98bcae042935c4b513.1408488399@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5516/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 19, 2014, 10:46 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1408484528 25200
#      Tue Aug 19 14:42:08 2014 -0700
# Node ID 4f98bcae042935c4b51336dfc5971458826bbcbf
# Parent  33d51be18d45556179966cd3d66833764f4c6de2
obsstore: add some documentation about the marker fields

As the number of field growth it make sense to start documenting their content.
Pierre-Yves David - Aug. 19, 2014, 11:38 p.m.
I forgot the V3 flag on this series that just adds the documentation 
that Augie requested.

On 08/19/2014 03:46 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1408484528 25200
> #      Tue Aug 19 14:42:08 2014 -0700
> # Node ID 4f98bcae042935c4b51336dfc5971458826bbcbf
> # Parent  33d51be18d45556179966cd3d66833764f4c6de2
> obsstore: add some documentation about the marker fields
>
> As the number of field growth it make sense to start documenting their content.
>
> diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
> --- a/mercurial/obsolete.py
> +++ b/mercurial/obsolete.py
> @@ -241,10 +241,15 @@ class obsstore(object):
>       - precursors[x] -> set(markers on precursors edges of x)
>       - successors[x] -> set(markers on successors edges of x)
>       """
>
>       fields = ('prec', 'succs', 'flag', 'meta', 'date')
> +    # prec:   nodeid, precursor changesets
> +    # succes: tuple of nodeid, successors changesets (0-N length)
> +    # flag:   integer, flag field carrying modifier for the markers (see doc)
> +    # meta:   binary blob, encoded metadata dictionnary
> +    # date:   (float, int) tuple, date of markers creation
>
>       def __init__(self, sopener):
>           # caches for various obsolescence related cache
>           self.caches = {}
>           self._all = []
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -241,10 +241,15 @@  class obsstore(object):
     - precursors[x] -> set(markers on precursors edges of x)
     - successors[x] -> set(markers on successors edges of x)
     """
 
     fields = ('prec', 'succs', 'flag', 'meta', 'date')
+    # prec:   nodeid, precursor changesets
+    # succes: tuple of nodeid, successors changesets (0-N length)
+    # flag:   integer, flag field carrying modifier for the markers (see doc)
+    # meta:   binary blob, encoded metadata dictionnary
+    # date:   (float, int) tuple, date of markers creation
 
     def __init__(self, sopener):
         # caches for various obsolescence related cache
         self.caches = {}
         self._all = []