D4606: narrow: when writing treemanifests, skip inspecting directories outside narrow

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sun Sep 16 21:48:24 EDT 2018


yuja added a comment.


  Looks good to me. One nit.
  
  >   - a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -1203,7 +1203,7 @@ s._dirty = False self._loadfunc = _load_for_read
  > - def writesubtrees(self, m1, m2, writesubtree): +    def writesubtrees(self, m1, m2, writesubtree, match=None):
  
  Can you remove the unsupported default value `match=None` from inner functions?
  
  > - def add(self, m, transaction, link, p1, p2, added, removed, readtree=None): +    def add(self, m, transaction, link, p1, p2, added, removed, readtree=None, +            match=None): if p1 in self.fulltextcache and util.safehasattr(m, 'fastdelta'):
  >   1. If our first parent is in the manifest cache, we can
  >   2. compute a delta here using properties we know about the @@ -1471,7 +1481,8 @@ assert readtree, "readtree must be set for treemanifest writes" m1 = readtree(self.tree, p1) m2 = readtree(self.tree, p2)
  > - n = self._addtree(m, transaction, link, m1, m2, readtree) +                n = self._addtree(m, transaction, link, m1, m2, readtree, +                                  match=match)
  
  Perhaps, `assert match` or `matchmod.always()` can be added.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list