Mercurial > hg
diff rust/hg-core/src/revlog/index.rs @ 51198:51cc12158f97
rust-index: add `pack_header` support
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Thu, 03 Aug 2023 10:28:10 +0200 |
parents | 4e6620b7fbbb |
children | 7434747343ab |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/index.rs Mon Oct 30 10:34:48 2023 +0100 +++ b/rust/hg-core/src/revlog/index.rs Thu Aug 03 10:28:10 2023 +0200 @@ -426,6 +426,10 @@ Ok(()) } + pub fn pack_header(&self, header: i32) -> [u8; 4] { + header.to_be_bytes() + } + pub fn remove(&mut self, rev: Revision) -> Result<(), RevlogError> { let offsets = self.get_offsets().clone(); self.bytes.remove(rev, offsets.as_deref())?;