D5443: ancestor: uniformity of calling lazyancestors classes
Yuya Nishihara
yuya at tcha.org
Sat Dec 15 23:44:56 EST 2018
> +def parentsfunc(index):
> + def parentrevs(rev):
> + try:
> + entry = index[rev]
> + except IndexError:
> + if rev == wdirrev:
> + raise error.WdirUnsupported
> + raise
> +
> + return entry[5], entry[6]
> + return parentrevs
It doesn't seem correct that the ancestor module handles the revlog's
internals. Instead, can't we add a factory function which takes both
`index` and `pfunc`?
More information about the Mercurial-devel
mailing list