Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 31809:35b8bb1ef02b
revset: stop supporting predicate that returns plain list (API)
It's said to be removed after 3.9.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 02 Apr 2017 22:01:32 +0900 |
parents | 080734cd2440 |
children | 81abd0d12c86 |
comparison
equal
deleted
inserted
replaced
31808:ca3b4a2b7e54 | 31809:35b8bb1ef02b |
---|---|
167 # helpers | 167 # helpers |
168 | 168 |
169 def getset(repo, subset, x): | 169 def getset(repo, subset, x): |
170 if not x: | 170 if not x: |
171 raise error.ParseError(_("missing argument")) | 171 raise error.ParseError(_("missing argument")) |
172 s = methods[x[0]](repo, subset, *x[1:]) | 172 return methods[x[0]](repo, subset, *x[1:]) |
173 if util.safehasattr(s, 'isascending'): | |
174 return s | |
175 # else case should not happen, because all non-func are internal, | |
176 # ignoring for now. | |
177 if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols: | |
178 repo.ui.deprecwarn('revset "%s" uses list instead of smartset' | |
179 % x[1][1], | |
180 '3.9') | |
181 return baseset(s) | |
182 | 173 |
183 def _getrevsource(repo, r): | 174 def _getrevsource(repo, r): |
184 extra = repo[r].extra() | 175 extra = repo[r].extra() |
185 for label in ('source', 'transplant_source', 'rebase_source'): | 176 for label in ('source', 'transplant_source', 'rebase_source'): |
186 if label in extra: | 177 if label in extra: |