comparison 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
comparison
equal deleted inserted replaced
41309:ee943a920606 41310:ab0d762d89ef
899 """ 899 """
900 if common is None: 900 if common is None:
901 common = [nullrev] 901 common = [nullrev]
902 902
903 if rustext is not None: 903 if rustext is not None:
904 # TODO: WdirUnsupported should be raised instead of GraphError
905 # if common includes wdirrev
906 return rustext.ancestor.MissingAncestors(self.index, common) 904 return rustext.ancestor.MissingAncestors(self.index, common)
907 return ancestor.incrementalmissingancestors(self.parentrevs, common) 905 return ancestor.incrementalmissingancestors(self.parentrevs, common)
908 906
909 def findmissingrevs(self, common=None, heads=None): 907 def findmissingrevs(self, common=None, heads=None):
910 """Return the revision numbers of the ancestors of heads that 908 """Return the revision numbers of the ancestors of heads that