rust/hg-cpython/src/cindex.rs
changeset 50975 3aca98a35727
parent 48853 4346be456875
child 50979 4c5f6e95df84
--- a/rust/hg-cpython/src/cindex.rs	Mon Aug 07 12:53:43 2023 +0200
+++ b/rust/hg-cpython/src/cindex.rs	Mon Aug 07 15:07:48 2023 +0200
@@ -15,7 +15,7 @@
     PyObject, PyResult, PyTuple, Python, PythonObject,
 };
 use hg::revlog::{Node, RevlogIndex};
-use hg::{Graph, GraphError, Revision, WORKING_DIRECTORY_REVISION};
+use hg::{Graph, GraphError, Revision};
 use libc::{c_int, ssize_t};
 
 const REVLOG_CABI_VERSION: c_int = 3;
@@ -141,9 +141,6 @@
 impl Graph for Index {
     /// wrap a call to the C extern parents function
     fn parents(&self, rev: Revision) -> Result<[Revision; 2], GraphError> {
-        if rev == WORKING_DIRECTORY_REVISION {
-            return Err(GraphError::WorkingDirectoryUnsupported);
-        }
         let mut res: [c_int; 2] = [0; 2];
         let code = unsafe {
             (self.capi.index_parents)(
@@ -170,9 +167,6 @@
             Err(GraphError::ParentOutOfRange(rev)) => {
                 Err(vcsgraph::graph::GraphReadError::KeyedInvalidKey(rev))
             }
-            Err(GraphError::WorkingDirectoryUnsupported) => Err(
-                vcsgraph::graph::GraphReadError::WorkingDirectoryUnsupported,
-            ),
         }
     }
 }