D5309: match: remove obsolete catching of OverflowError

Yuya Nishihara yuya at tcha.org
Thu Nov 29 06:51:30 EST 2018


Queued, thanks.

>          regex = '(?:%s)' % '|'.join([_regex(k, p, globsuffix)
>                                       for (k, p, s) in kindpats])
> -        if len(regex) > 20000:
> -            raise OverflowError
> -        return regex, _rematcher(regex)
> -    except OverflowError:
> +        if len(regex) < 20000:
> +            return regex, _rematcher(regex)

`s/</<=/` to make sure no behavior changed.


More information about the Mercurial-devel mailing list