Mercurial > hg
changeset 41239:26b0a7514f01
revset: transparently forward _intlist argument in all case
We took a safe approach for the first take, we can get bolder now.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 15 Jan 2019 20:24:17 +0100 |
parents | 8c366af085f4 |
children | ff333620a4cc |
files | mercurial/revsetlang.py |
diffstat | 1 files changed, 6 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revsetlang.py Sun Dec 30 00:15:38 2018 -0800 +++ b/mercurial/revsetlang.py Tue Jan 15 20:24:17 2019 +0100 @@ -757,19 +757,12 @@ except IndexError: raise error.ParseError(_('incomplete revspec format character')) if islist and d == 'd' and arg: - # special case, we might be able to speedup the list of int case - # - # We have been very conservative here for the first version. - # Other types (eg: generator) are probably fine, but we did not - # wanted to take any risk> - safeinputtype = (list, tuple, set, smartset.abstractsmartset) - if isinstance(arg, safeinputtype): - # we don't create a baseset yet, because it come with an - # extra cost. If we are going to serialize it we better - # skip it. - ret.append(('baseset', arg)) - pos += 1 - continue + # we don't create a baseset yet, because it come with an + # extra cost. If we are going to serialize it we better + # skip it. + ret.append(('baseset', arg)) + pos += 1 + continue try: ret.append((None, f(list(arg), d))) except (TypeError, ValueError):