[PATCH FOLLOW-UP] revset: transparently forward _intlist argument in all case
Boris Feld
boris.feld at octobus.net
Tue Jan 15 19:43:39 UTC 2019
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1547580257 -3600
# Tue Jan 15 20:24:17 2019 +0100
# Node ID 7c8a8c0ea0c4cd1c1cbd0fb96342a45e9437d939
# Parent 32ef47b3c91c2913ab13cabf9efcdde3ef137987
# EXP-Topic revs-efficiency
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 7c8a8c0ea0c4
revset: transparently forward _intlist argument in all case
We took a safe approach for the first take, we can get bolder now.
diff --git a/mercurial/revsetlang.py b/mercurial/revsetlang.py
--- a/mercurial/revsetlang.py
+++ b/mercurial/revsetlang.py
@@ -757,19 +757,12 @@ def _parseargs(expr, args):
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):
More information about the Mercurial-devel
mailing list