Show More
@@ -166,14 +166,13 b" impl<'a> ListRevTrackedFiles<'a> {" | |||
|
166 | 166 | let changelog_entry = match self.rev.parse::<Revision>() { |
|
167 | 167 | Ok(rev) => self.changelog.get_rev(rev)?, |
|
168 | 168 | _ => { |
|
169 |
let changelog_node = hex::decode(&self.rev) |
|
|
170 | ListRevTrackedFilesErrorKind::InvalidRevision | |
|
171 | })?; | |
|
169 | let changelog_node = hex::decode(&self.rev) | |
|
170 | .or(Err(ListRevTrackedFilesErrorKind::InvalidRevision))?; | |
|
172 | 171 | self.changelog.get_node(&changelog_node)? |
|
173 | 172 | } |
|
174 | 173 | }; |
|
175 | 174 | let manifest_node = hex::decode(&changelog_entry.manifest_node()?) |
|
176 |
. |
|
|
175 | .or(Err(ListRevTrackedFilesErrorKind::CorruptedRevlog))?; | |
|
177 | 176 | |
|
178 | 177 | self.manifest_entry = Some(self.manifest.get_node(&manifest_node)?); |
|
179 | 178 |
@@ -111,9 +111,8 b' impl Revlog {' | |||
|
111 | 111 | let mut delta_chain = vec![]; |
|
112 | 112 | while let Some(base_rev) = entry.base_rev { |
|
113 | 113 | delta_chain.push(entry); |
|
114 |
entry = |
|
|
115 | .get_entry(base_rev) | |
|
116 | .map_err(|_| RevlogError::Corrupted)?; | |
|
114 | entry = | |
|
115 | self.get_entry(base_rev).or(Err(RevlogError::Corrupted))?; | |
|
117 | 116 | } |
|
118 | 117 | |
|
119 | 118 | // TODO do not look twice in the index |
General Comments 0
You need to be logged in to leave comments.
Login now