##// END OF EJS Templates
rust-revlog: rename `start` to `data_start`...
Raphaël Gomès -
r53193:e2319309 default
parent child Browse files
Show More
@@ -222,7 +222,7 impl InnerRevlog {
222
222
223 /// The offset of the data chunk for this revision
223 /// The offset of the data chunk for this revision
224 #[inline(always)]
224 #[inline(always)]
225 pub fn start(&self, rev: Revision) -> usize {
225 pub fn data_start(&self, rev: Revision) -> usize {
226 self.index.start(
226 self.index.start(
227 rev,
227 rev,
228 &self
228 &self
@@ -244,7 +244,7 impl InnerRevlog {
244 /// The end of the data chunk for this revision
244 /// The end of the data chunk for this revision
245 #[inline(always)]
245 #[inline(always)]
246 pub fn end(&self, rev: Revision) -> usize {
246 pub fn end(&self, rev: Revision) -> usize {
247 self.start(rev) + self.data_compressed_length(rev)
247 self.data_start(rev) + self.data_compressed_length(rev)
248 }
248 }
249
249
250 /// Return the delta parent of the given revision
250 /// Return the delta parent of the given revision
@@ -563,7 +563,7 impl InnerRevlog {
563 let revs_chunk = &revs_chunk[..=last_rev_idx];
563 let revs_chunk = &revs_chunk[..=last_rev_idx];
564
564
565 for rev in revs_chunk {
565 for rev in revs_chunk {
566 let chunk_start = self.start(*rev);
566 let chunk_start = self.data_start(*rev);
567 let chunk_length = self.data_compressed_length(*rev);
567 let chunk_length = self.data_compressed_length(*rev);
568 // TODO revlogv2 should check the compression mode
568 // TODO revlogv2 should check the compression mode
569 let bytes = &data[chunk_start - offset..][..chunk_length];
569 let bytes = &data[chunk_start - offset..][..chunk_length];
@@ -660,7 +660,7 impl InnerRevlog {
660 revs: &'a [Revision],
660 revs: &'a [Revision],
661 target_size: Option<u64>,
661 target_size: Option<u64>,
662 ) -> Result<Vec<&'a [Revision]>, RevlogError> {
662 ) -> Result<Vec<&'a [Revision]>, RevlogError> {
663 let mut start_data = self.start(revs[0]);
663 let mut start_data = self.data_start(revs[0]);
664 let end_data = self.end(revs[revs.len() - 1]);
664 let end_data = self.end(revs[revs.len() - 1]);
665 let full_span = end_data - start_data;
665 let full_span = end_data - start_data;
666
666
@@ -689,7 +689,7 impl InnerRevlog {
689 chunks.push(chunk);
689 chunks.push(chunk);
690 }
690 }
691 start_rev_idx = idx;
691 start_rev_idx = idx;
692 start_data = self.start(*rev);
692 start_data = self.data_start(*rev);
693 end_rev_idx = idx + 1;
693 end_rev_idx = idx + 1;
694 }
694 }
695 if !is_snapshot {
695 if !is_snapshot {
@@ -726,7 +726,7 impl InnerRevlog {
726 chunks.push(chunk);
726 chunks.push(chunk);
727 }
727 }
728 start_rev_idx = end_rev_idx;
728 start_rev_idx = end_rev_idx;
729 start_data = self.start(revs[start_rev_idx]);
729 start_data = self.data_start(revs[start_rev_idx]);
730 }
730 }
731
731
732 let chunk = self.trim_chunk(revs, start_rev_idx, None);
732 let chunk = self.trim_chunk(revs, start_rev_idx, None);
General Comments 0
You need to be logged in to leave comments. Login now