mercurial/sparse.py
changeset 35742 7a1806e0daea
parent 35582 72b91f905065
child 37576 6ef94f24aa82
--- a/mercurial/sparse.py	Sun Jan 14 13:29:15 2018 +0900
+++ b/mercurial/sparse.py	Thu Jan 18 13:33:21 2018 -0800
@@ -294,24 +294,9 @@
             includes, excludes, profiles = patternsforrev(repo, rev)
 
             if includes or excludes:
-                # Explicitly include subdirectories of includes so
-                # status will walk them down to the actual include.
-                subdirs = set()
-                for include in includes:
-                    # TODO consider using posix path functions here so Windows
-                    # \ directory separators don't come into play.
-                    dirname = os.path.dirname(include)
-                    # basename is used to avoid issues with absolute
-                    # paths (which on Windows can include the drive).
-                    while os.path.basename(dirname):
-                        subdirs.add(dirname)
-                        dirname = os.path.dirname(dirname)
-
                 matcher = matchmod.match(repo.root, '', [],
                                          include=includes, exclude=excludes,
                                          default='relpath')
-                if subdirs:
-                    matcher = forceincludematcher(matcher, subdirs)
                 matchers.append(matcher)
         except IOError:
             pass