[PATCH evolve-ext V2] directaccess: make sure gethashsymbols does not return rev numbers

Yuya Nishihara yuya at tcha.org
Tue Jun 28 10:57:08 EDT 2016


On Wed, 22 Jun 2016 22:09:01 +0100, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1466616137 -3600
> #      Wed Jun 22 18:22:17 2016 +0100
> # Node ID 6cfa4cff138e8c9d65473de02d7032a2426584cc
> # Parent  00612a019547c0de2b6a88de74c4e097b99d36d8
> directaccess: make sure gethashsymbols does not return rev numbers

The patch looks good to me.

>      elif tree[0] == "func" and tree[1] == _listtuple:
>          # the optimiser will group sequence of hash request
> -        result = []
> -        for entry in tree[2][1].split('\0'):
> -            if hashre.match(entry):
> -                result.append(entry)
> -        return result
> +        results += tree[2][1].split('\0')

FWIW, this could be avoided if the extension could access to the unoptimized
tree.


More information about the Mercurial-devel mailing list