Mercurial > hg
changeset 18210:f730ed2e093d
phases: prepare phase command for filtering
The phase command have some logic to report change made. We ensure this logic
run unfiltered.
With --force the command can change phase of a changeset for public to draft.
Such change can lead to obsolescence marker to apply again and the changeset to
be "hidden". If we do not run the logic unfiltered it could failed to fetch the
phase of a newly filtered changeset.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 24 Dec 2012 11:58:40 +0100 |
parents | 6a91cbb67907 |
children | 518c1403838f |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Dec 24 11:57:48 2012 +0100 +++ b/mercurial/commands.py Mon Dec 24 11:58:40 2012 +0100 @@ -4629,9 +4629,12 @@ phases.retractboundary(repo, targetphase, nodes) finally: lock.release() - newdata = repo._phasecache.getphaserevs(repo) - cl = repo.changelog + # moving revision from public to draft may hide them + # We have to check result on an unfiltered repository + unfi = repo.unfiltered() + newdata = repo._phasecache.getphaserevs(unfi) changes = sum(o != newdata[i] for i, o in enumerate(olddata)) + cl = unfi.changelog rejected = [n for n in nodes if newdata[cl.rev(n)] < targetphase] if rejected: