# HG changeset patch # User Durham Goode # Date 2017-05-16 01:55:58 # Node ID 7e07d583606352bdac8bddaead4063842d48db87 # Parent b9135f191d8a2ebd56322728f53178d694244904 hg: backout optimizing for treemanifests It turns out that the files list is not sufficient to identify with revlogs have changed. In a merge commit, no files could've changed but directories would have. For now let's just backout this optimization. diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -238,12 +238,11 @@ def strip(ui, repo, nodelist, backup=Tru def striptrees(repo, tr, striprev, files): if 'treemanifest' in repo.requirements: # safe but unnecessary # otherwise - treerevlog = repo.manifestlog._revlog - for dir in util.dirs(files): - # If the revlog doesn't exist, this returns an empty revlog and is a - # no-op. - rl = treerevlog.dirlog(dir) - rl.strip(striprev, tr) + for unencoded, encoded, size in repo.store.datafiles(): + if (unencoded.startswith('meta/') and + unencoded.endswith('00manifest.i')): + dir = unencoded[5:-12] + repo.manifestlog._revlog.dirlog(dir).strip(striprev, tr) def rebuildfncache(ui, repo): """Rebuilds the fncache file from repo history.