rust/hg-core/src/repo.rs
changeset 47969 87e3f878e65f
parent 47964 796206e74b10
child 47981 d1d9510f73f0
equal deleted inserted replaced
47968:6f579618ea7b 47969:87e3f878e65f
   334 
   334 
   335     pub fn manifestlog_mut(&self) -> Result<RefMut<Manifestlog>, HgError> {
   335     pub fn manifestlog_mut(&self) -> Result<RefMut<Manifestlog>, HgError> {
   336         self.manifestlog.get_mut_or_init(self)
   336         self.manifestlog.get_mut_or_init(self)
   337     }
   337     }
   338 
   338 
   339     /// Returns the manifest of the given node ID
   339     /// Returns the manifest of the *changeset* with the given node ID
   340     pub fn manifest_for_node(
   340     pub fn manifest_for_node(
   341         &self,
   341         &self,
   342         node: impl Into<NodePrefix>,
   342         node: impl Into<NodePrefix>,
   343     ) -> Result<Manifest, RevlogError> {
   343     ) -> Result<Manifest, RevlogError> {
   344         self.manifestlog()?.get_node(
   344         self.manifestlog()?.data_for_node(
   345             self.changelog()?
   345             self.changelog()?
   346                 .get_node(node.into())?
   346                 .data_for_node(node.into())?
   347                 .manifest_node()?
   347                 .manifest_node()?
   348                 .into(),
   348                 .into(),
   349         )
   349         )
   350     }
   350     }
   351 
   351 
   352     /// Returns the manifest of the given revision
   352     /// Returns the manifest of the *changeset* with the given revision number
   353     pub fn manifest_for_rev(
   353     pub fn manifest_for_rev(
   354         &self,
   354         &self,
   355         revision: Revision,
   355         revision: Revision,
   356     ) -> Result<Manifest, RevlogError> {
   356     ) -> Result<Manifest, RevlogError> {
   357         self.manifestlog()?.get_node(
   357         self.manifestlog()?.data_for_node(
   358             self.changelog()?.get_rev(revision)?.manifest_node()?.into(),
   358             self.changelog()?
       
   359                 .data_for_rev(revision)?
       
   360                 .manifest_node()?
       
   361                 .into(),
   359         )
   362         )
   360     }
   363     }
   361 
   364 
   362     pub fn filelog(&self, path: &HgPath) -> Result<Filelog, HgError> {
   365     pub fn filelog(&self, path: &HgPath) -> Result<Filelog, HgError> {
   363         Filelog::open(self, path)
   366         Filelog::open(self, path)