[Updated] D10104: pure-parsers: document index class constants
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Fri Mar 5 09:34:19 UTC 2021
Closed by commit rHGe83327af26f1: pure-parsers: document index class constants (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10104?vs=26080&id=26101
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10104/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10104
AFFECTED FILES
mercurial/pure/parsers.py
CHANGE DETAILS
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"
- big_int_size = struct.calcsize(b'Q')
- int_size = struct.calcsize(b'i')
+ # Size of a C unsigned long long int, platform independent
+ big_int_size = struct.calcsize(b'>Q')
+ # Size of a C long int, platform independent
+ int_size = struct.calcsize(b'>i')
+ # Size of the entire index format
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
To: Alphare, #hg-reviewers, pulkit
Cc: SimonSapin, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210305/443f775c/attachment-0002.html>
More information about the Mercurial-patches
mailing list