changeset 35707:54074a82e050

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
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 14 Jan 2018 14:39:17 -0800
parents 5748f404dad3
children 03e921942163
files mercurial/repair.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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")