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
--- a/mercurial/repair.py Sun Jan 14 23:37:06 2018 -0800
+++ b/mercurial/repair.py Sun Jan 14 14:39:17 2018 -0800
@@ -203,8 +203,8 @@
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")