[PATCH 2 of 4] revset: ensure we have loaded phases data in '_notpublic()'
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Jun 16 21:09:19 CDT 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1434410162 25200
# Mon Jun 15 16:16:02 2015 -0700
# Node ID 2acfb673a817808b6993ae5e84466a42d4cd63b7
# Parent 377bef13cfb90601c15f19d0109449c5922a3526
revset: ensure we have loaded phases data in '_notpublic()'
If we are the very first revs access (or is the phase cache just got
invalidated) the phasesets will be None even if we supports 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.
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1511,10 +1511,11 @@ def present(repo, subset, x):
return baseset()
# for internal use
def _notpublic(repo, subset, x):
getargs(x, 0, 0, "_notpublic takes no arguments")
+ repo._phasecache.loadphaserevs(repo) # ensure phase's sets are loaded
if repo._phasecache._phasesets:
s = set()
for u in repo._phasecache._phasesets[1:]:
s.update(u)
# XXX we should turn this into a baseset instead of a set, smartset may
More information about the Mercurial-devel
mailing list