Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 38576:152f4822d210
pycompat: move rapply() from util
I want to use rapply() in utils.* modules, but that would introduce a
reference cycle util -> utils.* -> util. Moving rapply() to pycompat
should be okay since it mostly serves as a compatibility helper.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 10 Jun 2018 17:07:29 +0900 |
parents | 6ec996e8c9bc |
children | b62000a28812 |
comparison
equal
deleted
inserted
replaced
38575:f442c9494ec7 | 38576:152f4822d210 |
---|---|
110 except error.RepoLookupError: | 110 except error.RepoLookupError: |
111 pass | 111 pass |
112 return None | 112 return None |
113 | 113 |
114 def _sortedb(xs): | 114 def _sortedb(xs): |
115 return sorted(util.rapply(pycompat.maybebytestr, xs)) | 115 return sorted(pycompat.rapply(pycompat.maybebytestr, xs)) |
116 | 116 |
117 # operator methods | 117 # operator methods |
118 | 118 |
119 def stringset(repo, subset, x, order): | 119 def stringset(repo, subset, x, order): |
120 if not x: | 120 if not x: |