rust/hg-core/src/revlog/manifest.rs
changeset 47969 87e3f878e65f
parent 47968 6f579618ea7b
child 48342 10c32e1b892a
--- a/rust/hg-core/src/revlog/manifest.rs	Tue Sep 14 18:10:35 2021 +0200
+++ b/rust/hg-core/src/revlog/manifest.rs	Tue Sep 14 18:25:51 2021 +0200
@@ -18,14 +18,31 @@
         Ok(Self { revlog })
     }
 
-    /// Return the `ManifestEntry` of a given node id.
-    pub fn get_node(&self, node: NodePrefix) -> Result<Manifest, RevlogError> {
+    /// Return the `Manifest` for the given node ID.
+    ///
+    /// Note: this is a node ID in the manifestlog, typically found through
+    /// `ChangelogEntry::manifest_node`. It is *not* the node ID of any
+    /// changeset.
+    ///
+    /// See also `Repo::manifest_for_node`
+    pub fn data_for_node(
+        &self,
+        node: NodePrefix,
+    ) -> Result<Manifest, RevlogError> {
         let rev = self.revlog.rev_from_node(node)?;
-        self.get_rev(rev)
+        self.data_for_rev(rev)
     }
 
-    /// Return the `ManifestEntry` of a given node revision.
-    pub fn get_rev(&self, rev: Revision) -> Result<Manifest, RevlogError> {
+    /// Return the `Manifest` of a given revision number.
+    ///
+    /// Note: this is a revision number in the manifestlog, *not* of any
+    /// changeset.
+    ///
+    /// See also `Repo::manifest_for_rev`
+    pub fn data_for_rev(
+        &self,
+        rev: Revision,
+    ) -> Result<Manifest, RevlogError> {
         let bytes = self.revlog.get_rev_data(rev)?;
         Ok(Manifest { bytes })
     }