Patchwork D10647: revlog: use `format_version` to dispatch different version in index_get

login
register
mail settings
Submitter phabricator
Date May 4, 2021, 2:19 p.m.
Message ID <differential-rev-PHID-DREV-hykteykupm7tmnmx6grd-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48965/
State Superseded
Headers show

Comments

phabricator - May 4, 2021, 2:19 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is semantically more correct.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cext/revlog.c

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -335,7 +335,7 @@ 
 	parent_2 = getbe32(data + 28);
 	c_node_id = data + 32;
 
-	if (self->entry_size == v1_entry_size) {
+	if (self->format_version == format_v1) {
 		sidedata_offset = 0;
 		sidedata_comp_len = 0;
 	} else {