Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 22884:4584eec9aead
getset: check if an object is a baseset using `isascending` instead of `set`
The `set()` method is going away.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 10 Oct 2014 14:22:23 -0700 |
parents | e7b8cf352614 |
children | e02b16f496f2 |
comparison
equal
deleted
inserted
replaced
22883:e7b8cf352614 | 22884:4584eec9aead |
---|---|
233 | 233 |
234 def getset(repo, subset, x): | 234 def getset(repo, subset, x): |
235 if not x: | 235 if not x: |
236 raise error.ParseError(_("missing argument")) | 236 raise error.ParseError(_("missing argument")) |
237 s = methods[x[0]](repo, subset, *x[1:]) | 237 s = methods[x[0]](repo, subset, *x[1:]) |
238 if util.safehasattr(s, 'set'): | 238 if util.safehasattr(s, 'isascending'): |
239 return s | 239 return s |
240 return baseset(s) | 240 return baseset(s) |
241 | 241 |
242 def _getrevsource(repo, r): | 242 def _getrevsource(repo, r): |
243 extra = repo[r].extra() | 243 extra = repo[r].extra() |