Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 22870:970d78f3f47c
revset-limit: remove usage of `set()`
All smartset classes have fast lookup, so this function will be removed soon.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 08 Oct 2014 02:48:24 -0700 |
parents | a9fb3d598ca2 |
children | 9b73ab9bcbfb |
comparison
equal
deleted
inserted
replaced
22869:a9fb3d598ca2 | 22870:970d78f3f47c |
---|---|
1013 # i18n: "limit" is a keyword | 1013 # i18n: "limit" is a keyword |
1014 lim = int(getstring(l[1], _("limit requires a number"))) | 1014 lim = int(getstring(l[1], _("limit requires a number"))) |
1015 except (TypeError, ValueError): | 1015 except (TypeError, ValueError): |
1016 # i18n: "limit" is a keyword | 1016 # i18n: "limit" is a keyword |
1017 raise error.ParseError(_("limit expects a number")) | 1017 raise error.ParseError(_("limit expects a number")) |
1018 ss = subset.set() | 1018 ss = subset |
1019 os = getset(repo, spanset(repo), l[0]) | 1019 os = getset(repo, spanset(repo), l[0]) |
1020 result = [] | 1020 result = [] |
1021 it = iter(os) | 1021 it = iter(os) |
1022 for x in xrange(lim): | 1022 for x in xrange(lim): |
1023 try: | 1023 try: |