mercurial/changegroup.py
changeset 38806 5742d0428ed9
parent 38794 1d01cf0416a5
child 38835 a232e6744ba3
--- a/mercurial/changegroup.py	Sun Jul 22 15:50:45 2018 +0900
+++ b/mercurial/changegroup.py	Sat Jul 28 14:52:46 2018 -0700
@@ -21,6 +21,7 @@
 from . import (
     dagutil,
     error,
+    manifest,
     match as matchmod,
     mdiff,
     phases,
@@ -589,6 +590,11 @@
 
     # filter any nodes that claim to be part of the known set
     def prune(self, revlog, missing, commonrevs):
+        # TODO this violates storage abstraction for manifests.
+        if isinstance(revlog, manifest.manifestrevlog):
+            if not self._filematcher.visitdir(revlog._dir[:-1] or '.'):
+                return []
+
         rr, rl = revlog.rev, revlog.linkrev
         return [n for n in missing if rl(rr(n)) not in commonrevs]