Mercurial > hg
changeset 31342:1470b0f771c8
phases: explicitly evaluate list returned by map
On Python 3 map() returns a generator, which bool()s to true even if
it had an empty input set. Work around this by using list() on the
map() result.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 11 Mar 2017 20:53:20 -0500 |
parents | 66f1c244b43a |
children | ff2f90503d64 |
files | mercurial/phases.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/phases.py Sat Mar 11 20:51:09 2017 -0500 +++ b/mercurial/phases.py Sat Mar 11 20:53:20 2017 -0500 @@ -213,7 +213,7 @@ self._phaserevs = revs self._populatephaseroots(repo) for phase in trackedphases: - roots = map(repo.changelog.rev, self.phaseroots[phase]) + roots = list(map(repo.changelog.rev, self.phaseroots[phase])) if roots: for rev in roots: revs[rev] = phase