Patchwork D10104: pure-parsers: document index class constants

login
register
mail settings
Submitter phabricator
Date March 4, 2021, 8:31 a.m.
Message ID <differential-rev-PHID-DREV-syooxgnshs75pmken4rp-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48419/
State Superseded
Headers show

Comments

phabricator - March 4, 2021, 8:31 a.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10104

AFFECTED FILES
  mercurial/pure/parsers.py

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -42,10 +42,15 @@ 
 
 
 class BaseIndexObject(object):
+    # Format of an index entry according to Python's `struct` language
     index_format = b">Qiiiiii20s12x"
+    # Size of a C unsigned long long int on this platform
     big_int_size = struct.calcsize(b'Q')
+    # Size of a C long int on this platform
     int_size = struct.calcsize(b'i')
+    # Size of the entire index format on this platform
     index_size = struct.calcsize(index_format)
+    # An empty index entry, used as a default value to be overridden, or nullrev
     null_item = (0, 0, 0, -1, -1, -1, -1, nullid)
 
     @property