##// END OF EJS Templates
hg-cpython: implement vcsgraph::Graph for our Index...
pacien -
r49349:8e8737a1 default
parent child Browse files
Show More
@@ -155,6 +155,24 b' impl Graph for Index {'
155 155 }
156 156 }
157 157
158 impl vcsgraph::graph::Graph for Index {
159 fn parents(
160 &self,
161 rev: Revision,
162 ) -> Result<vcsgraph::graph::Parents, vcsgraph::graph::GraphReadError>
163 {
164 match Graph::parents(self, rev) {
165 Ok(parents) => Ok(vcsgraph::graph::Parents(parents)),
166 Err(GraphError::ParentOutOfRange(rev)) => {
167 Err(vcsgraph::graph::GraphReadError::KeyedInvalidKey(rev))
168 }
169 Err(GraphError::WorkingDirectoryUnsupported) => Err(
170 vcsgraph::graph::GraphReadError::WorkingDirectoryUnsupported,
171 ),
172 }
173 }
174 }
175
158 176 impl RevlogIndex for Index {
159 177 /// Note C return type is Py_ssize_t (hence signed), but we shall
160 178 /// force it to unsigned, because it's a length
General Comments 0
You need to be logged in to leave comments. Login now