# HG changeset patch # User Durham Goode # Date 1494899758 25200 # 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 -r b9135f191d8a -r 7e07d5836063 mercurial/repair.py --- a/mercurial/repair.py Mon May 15 13:29:18 2017 -0700 +++ b/mercurial/repair.py Mon May 15 18:55:58 2017 -0700 @@ -238,12 +238,11 @@ 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.