comparison mercurial/revset.py @ 25612:97528adbf74b

revset: ensure we have loaded phases data in '_notpublic()' If we are the very first rev access (or if the phase cache just got invalidated) the phasesets will be None even if we support the native computation. So we explicitly trigger a computation if needed. This was not an issue before because requesting any phase information would have triggered such computation.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 15 Jun 2015 16:16:02 -0700
parents f140d6207cca
children 833fa28cd949
comparison
equal deleted inserted replaced
25611:d89045a66e01 25612:97528adbf74b
1511 return baseset() 1511 return baseset()
1512 1512
1513 # for internal use 1513 # for internal use
1514 def _notpublic(repo, subset, x): 1514 def _notpublic(repo, subset, x):
1515 getargs(x, 0, 0, "_notpublic takes no arguments") 1515 getargs(x, 0, 0, "_notpublic takes no arguments")
1516 repo._phasecache.loadphaserevs(repo) # ensure phase's sets are loaded
1516 if repo._phasecache._phasesets: 1517 if repo._phasecache._phasesets:
1517 s = set() 1518 s = set()
1518 for u in repo._phasecache._phasesets[1:]: 1519 for u in repo._phasecache._phasesets[1:]:
1519 s.update(u) 1520 s.update(u)
1520 # XXX we should turn this into a baseset instead of a set, smartset may 1521 # XXX we should turn this into a baseset instead of a set, smartset may