# HG changeset patch # User Raphaël Gomès # Date 1730713062 -3600 # Node ID e2319309bed45aed1f14e63961863992a237e759 # Parent 4d0c0c2554255cc7f3a05d44718c308ca3282911 rust-revlog: rename `start` to `data_start` This is more explicit. diff -r 4d0c0c255425 -r e2319309bed4 rust/hg-core/src/revlog/inner_revlog.rs --- a/rust/hg-core/src/revlog/inner_revlog.rs Mon Nov 04 10:36:45 2024 +0100 +++ b/rust/hg-core/src/revlog/inner_revlog.rs Mon Nov 04 10:37:42 2024 +0100 @@ -222,7 +222,7 @@ /// The offset of the data chunk for this revision #[inline(always)] - pub fn start(&self, rev: Revision) -> usize { + pub fn data_start(&self, rev: Revision) -> usize { self.index.start( rev, &self @@ -244,7 +244,7 @@ /// The end of the data chunk for this revision #[inline(always)] pub fn end(&self, rev: Revision) -> usize { - self.start(rev) + self.data_compressed_length(rev) + self.data_start(rev) + self.data_compressed_length(rev) } /// Return the delta parent of the given revision @@ -563,7 +563,7 @@ let revs_chunk = &revs_chunk[..=last_rev_idx]; for rev in revs_chunk { - let chunk_start = self.start(*rev); + let chunk_start = self.data_start(*rev); let chunk_length = self.data_compressed_length(*rev); // TODO revlogv2 should check the compression mode let bytes = &data[chunk_start - offset..][..chunk_length]; @@ -660,7 +660,7 @@ revs: &'a [Revision], target_size: Option, ) -> Result, RevlogError> { - let mut start_data = self.start(revs[0]); + let mut start_data = self.data_start(revs[0]); let end_data = self.end(revs[revs.len() - 1]); let full_span = end_data - start_data; @@ -689,7 +689,7 @@ chunks.push(chunk); } start_rev_idx = idx; - start_data = self.start(*rev); + start_data = self.data_start(*rev); end_rev_idx = idx + 1; } if !is_snapshot { @@ -726,7 +726,7 @@ chunks.push(chunk); } start_rev_idx = end_rev_idx; - start_data = self.start(revs[start_rev_idx]); + start_data = self.data_start(revs[start_rev_idx]); } let chunk = self.trim_chunk(revs, start_rev_idx, None);