Show More
@@ -22,7 +22,7 b' impl Changelog {' | |||||
22 | &self, |
|
22 | &self, | |
23 | node: NodePrefix, |
|
23 | node: NodePrefix, | |
24 | ) -> Result<ChangelogEntry, RevlogError> { |
|
24 | ) -> Result<ChangelogEntry, RevlogError> { | |
25 |
let rev = self.revlog. |
|
25 | let rev = self.revlog.rev_from_node(node)?; | |
26 | self.get_rev(rev) |
|
26 | self.get_rev(rev) | |
27 | } |
|
27 | } | |
28 |
|
28 |
@@ -30,7 +30,7 b' impl Filelog {' | |||||
30 | &self, |
|
30 | &self, | |
31 | file_node: impl Into<NodePrefix>, |
|
31 | file_node: impl Into<NodePrefix>, | |
32 | ) -> Result<FilelogEntry, RevlogError> { |
|
32 | ) -> Result<FilelogEntry, RevlogError> { | |
33 |
let file_rev = self.revlog. |
|
33 | let file_rev = self.revlog.rev_from_node(file_node.into())?; | |
34 | self.get_rev(file_rev) |
|
34 | self.get_rev(file_rev) | |
35 | } |
|
35 | } | |
36 |
|
36 |
@@ -20,7 +20,7 b' impl Manifestlog {' | |||||
20 |
|
20 | |||
21 | /// Return the `ManifestEntry` of a given node id. |
|
21 | /// Return the `ManifestEntry` of a given node id. | |
22 | pub fn get_node(&self, node: NodePrefix) -> Result<Manifest, RevlogError> { |
|
22 | pub fn get_node(&self, node: NodePrefix) -> Result<Manifest, RevlogError> { | |
23 |
let rev = self.revlog. |
|
23 | let rev = self.revlog.rev_from_node(node)?; | |
24 | self.get_rev(rev) |
|
24 | self.get_rev(rev) | |
25 | } |
|
25 | } | |
26 |
|
26 |
@@ -124,9 +124,9 b' impl Revlog {' | |||||
124 | Some(self.index.get_entry(rev)?.hash()) |
|
124 | Some(self.index.get_entry(rev)?.hash()) | |
125 | } |
|
125 | } | |
126 |
|
126 | |||
127 | /// Return the full data associated to a node. |
|
127 | /// Return the revision number for the given node ID, if it exists in this revlog | |
128 | #[timed] |
|
128 | #[timed] | |
129 |
pub fn |
|
129 | pub fn rev_from_node( | |
130 | &self, |
|
130 | &self, | |
131 | node: NodePrefix, |
|
131 | node: NodePrefix, | |
132 | ) -> Result<Revision, RevlogError> { |
|
132 | ) -> Result<Revision, RevlogError> { |
@@ -61,7 +61,7 b' pub fn resolve_rev_number_or_hex_prefix(' | |||||
61 | { |
|
61 | { | |
62 | return Err(RevlogError::WDirUnsupported); |
|
62 | return Err(RevlogError::WDirUnsupported); | |
63 | } |
|
63 | } | |
64 |
return revlog. |
|
64 | return revlog.rev_from_node(prefix); | |
65 | } |
|
65 | } | |
66 | Err(RevlogError::InvalidRevision) |
|
66 | Err(RevlogError::InvalidRevision) | |
67 | } |
|
67 | } |
General Comments 0
You need to be logged in to leave comments.
Login now