Patchwork D12563: rust-revlog: change default version from 2 to 1 in test builder

login
register
mail settings
Submitter phabricator
Date April 16, 2022, 5:47 a.m.
Message ID <differential-rev-PHID-DREV-qgvqv6q46fitsslu33wp-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50911/
State New
Headers show

Comments

phabricator - April 16, 2022, 5:47 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Version 1 is the only version we support, so it seems like the natural
  choice for making it easy to create valid revlogs.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/hg-core/src/revlog/index.rs

CHANGE DETAILS




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

Patch

diff --git a/rust/hg-core/src/revlog/index.rs b/rust/hg-core/src/revlog/index.rs
--- a/rust/hg-core/src/revlog/index.rs
+++ b/rust/hg-core/src/revlog/index.rs
@@ -323,7 +323,7 @@ 
                 is_first: false,
                 is_inline: false,
                 is_general_delta: true,
-                version: 2,
+                version: 1,
                 offset: 0,
                 compressed_len: 0,
                 uncompressed_len: 0,
@@ -517,10 +517,10 @@ 
     fn version_test() {
         let bytes = IndexEntryBuilder::new()
             .is_first(true)
-            .with_version(1)
+            .with_version(2)
             .build();
 
-        assert_eq!(get_version(&bytes), 1)
+        assert_eq!(get_version(&bytes), 2)
     }
 }