D3499: revlog: use node tree (native code) for shortest() calculation
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Thu May 10 09:08:32 EDT 2018
yuja added a comment.
Looks generally good, but can you fix your editor to not do Google indent?
I'm not sure if we should bump the module version in this case, but I would
do that just for sanity.
> +static int nt_shortest(indexObject *self, const char *node)
> +{
> + if (nt_init(self) == -1)
> + return -3;
> + if (nt_populate(self) == -1)
> + return -3;
> +
> + int level, off;
Declaration has to be moved to top.
> + for (level = off = 0; level < 40; level++) {
> + int k = nt_level(node, level);
> + nodetree *n = &self->nt[off];
> + int v = n->children[k];
> + if (v < 0) {
> + v = -(v + 1);
> + const char *n = index_node(self, v);
Here, too.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3499
To: martinvonz, indygreg, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list