D1865: repair: filter out unknown revisions from phasecache within transaction

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Jan 16 20:15:49 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1865

AFFECTED FILES
  mercurial/repair.py

CHANGE DETAILS

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -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")



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list