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

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2018, 8:15 p.m.
Message ID <differential-rev-PHID-DREV-pwlzhw5bihdhyytk62to-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26795/
State Superseded
Headers show

Comments

phabricator - Jan. 16, 2018, 8:15 p.m.
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




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

Patch

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")