diff mercurial/revlog.py @ 41310:ab0d762d89ef stable

rust-cpython: raising error.WdirUnsupported The Graph implementation of hg-cpython returns the appropriate error upon encounter with the working directory special revision number, and this gives us in particular a code path to test from test-rust-ancestors.py In the current implementation, the exception is actually raised from the iterator instantiation; we are nonetheless consuming the iterator in the test with `list()` in order not to depend on implementation details.
author Georges Racinet <georges.racinet@octobus.net>
date Wed, 23 Jan 2019 07:49:36 -0500
parents c953c2a94d68
children 189e06b2d719 e2e815e3c4ae
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Jan 23 07:47:04 2019 -0500
+++ b/mercurial/revlog.py	Wed Jan 23 07:49:36 2019 -0500
@@ -901,8 +901,6 @@
             common = [nullrev]
 
         if rustext is not None:
-            # TODO: WdirUnsupported should be raised instead of GraphError
-            # if common includes wdirrev
             return rustext.ancestor.MissingAncestors(self.index, common)
         return ancestor.incrementalmissingancestors(self.parentrevs, common)