D4875: treemanifests: remove _loadalllazy when doing copies

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Thu Oct 4 08:31:41 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG67b93cd847fb: treemanifests: remove _loadalllazy when doing copies (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4875?vs=11659&id=11674

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

AFFECTED FILES
  mercurial/manifest.py

CHANGE DETAILS

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -957,9 +957,8 @@
         if self._copyfunc is _noop:
             def _copyfunc(s):
                 self._load()
-                # OPT: it'd be nice to not load everything here. Unfortunately
-                # this makes a mess of the "dirty" state tracking if we don't.
-                self._loadalllazy()
+                s._lazydirs = {d: (p, n, r, True) for
+                               d, (p, n, r, c) in self._lazydirs.iteritems()}
                 sdirs = s._dirs
                 for d, v in self._dirs.iteritems():
                     sdirs[d] = v.copy()
@@ -1228,11 +1227,9 @@
                 return ld[1]
             return m._dirs.get(d, emptytree)._node
 
-        # we should have always loaded everything by the time we get here for
-        # `self`, but possibly not in `m1` or `m2`.
-        assert not self._lazydirs
         # let's skip investigating things that `match` says we do not need.
         visit = match.visitchildrenset(self._dir[:-1] or '.')
+        visit = self._loadchildrensetlazy(visit)
         if visit == 'this' or visit == 'all':
             visit = None
         for d, subm in self._dirs.iteritems():



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


More information about the Mercurial-devel mailing list