comparison rust/hg-core/src/repo.rs @ 52294:a3fa37bdb7ec

rust: normalize `_for_unchecked_rev` naming among revlogs and the index This normalizes the naming scheme between the `Revlog`, `Changelog`, etc. which is less suprising, though no real bugs could stem from this because of the type signature mismatch. The very high-level `Repo` object still uses an `UncheckedRevision` parameter for its methods because that's what most callers will want.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 29 Oct 2024 11:00:04 +0100
parents bd8081e9fd62
children db065b33fa56
comparison
equal deleted inserted replaced
52293:77b38c86915d 52294:a3fa37bdb7ec
618 &self, 618 &self,
619 revision: UncheckedRevision, 619 revision: UncheckedRevision,
620 ) -> Result<Manifest, RevlogError> { 620 ) -> Result<Manifest, RevlogError> {
621 self.manifestlog()?.data_for_node( 621 self.manifestlog()?.data_for_node(
622 self.changelog()? 622 self.changelog()?
623 .data_for_rev(revision)? 623 .data_for_unchecked_rev(revision)?
624 .manifest_node()? 624 .manifest_node()?
625 .into(), 625 .into(),
626 ) 626 )
627 } 627 }
628 628
793 } 793 }
794 794
795 pub fn node(&self, rev: UncheckedRevision) -> Option<crate::Node> { 795 pub fn node(&self, rev: UncheckedRevision) -> Option<crate::Node> {
796 self.changelog() 796 self.changelog()
797 .ok() 797 .ok()
798 .and_then(|c| c.node_from_rev(rev).copied()) 798 .and_then(|c| c.node_from_unchecked_rev(rev).copied())
799 } 799 }
800 800
801 /// Change the current working directory parents cached in the repo. 801 /// Change the current working directory parents cached in the repo.
802 /// 802 ///
803 /// TODO 803 /// TODO