# HG changeset patch # User Martin von Zweigbergk # Date 2018-01-14 22:39:17 # Node ID 54074a82e050fed818231a4d94e286f446d84d15 # Parent 5748f404dad3d4cc084624e4886c481c4fba8d99 repair: filter out unknown revisions from phasecache within transaction I'm about to add another summary report callback that needs to access phase information. These callbacks run at the end of the transaction and some of them failed because they tried to get the phase for stripped commits. The solution is to filter out unknown revisions before the transaction is closed. Differential Revision: https://phab.mercurial-scm.org/D1865 diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -203,8 +203,8 @@ def strip(ui, repo, nodelist, backup=Tru deleteobsmarkers(repo.obsstore, stripobsidx) del repo.obsstore + repo._phasecache.filterunknown(repo) - repo._phasecache.filterunknown(repo) if tmpbundlefile: ui.note(_("adding branch\n")) f = vfs.open(tmpbundlefile, "rb")