Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/revlog/filelog.rs @ 47969:87e3f878e65f
rust: Rename get_node methods to data_for_node, get_rev to data_for_rev
These are respective methods of Changelog, Manifestlog, and Filelog;
three Rust structs that that wrap a Revlog struct.
This rename clarifies that node IDs or revision numbers are parameters,
not return values.
Also reword doc-comments in Manifestlog and Filelog to separate node IDs
and revision numbers that are local to a given (non-changelog) revlog
from those of a changeset.
Differential Revision: https://phab.mercurial-scm.org/D11416
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Tue, 14 Sep 2021 18:25:51 +0200 |
parents | 6f579618ea7b |
children | 027ebad952ac |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/filelog.rs Tue Sep 14 18:10:35 2021 +0200 +++ b/rust/hg-core/src/revlog/filelog.rs Tue Sep 14 18:25:51 2021 +0200 @@ -26,17 +26,17 @@ /// The given node ID is that of the file as found in a manifest, not of a /// changeset. - pub fn get_node( + pub fn data_for_node( &self, file_node: impl Into<NodePrefix>, ) -> Result<FilelogEntry, RevlogError> { let file_rev = self.revlog.rev_from_node(file_node.into())?; - self.get_rev(file_rev) + self.data_for_rev(file_rev) } /// The given revision is that of the file as found in a manifest, not of a /// changeset. - pub fn get_rev( + pub fn data_for_rev( &self, file_rev: Revision, ) -> Result<FilelogEntry, RevlogError> {