mercurial/cmdutil.py
changeset 33694 93422d0068f8
parent 33666 6f4bc9688ca9
child 33726 ab0c55c2ad9a
--- a/mercurial/cmdutil.py	Mon Jul 31 09:59:42 2017 +0530
+++ b/mercurial/cmdutil.py	Mon Jul 24 10:34:32 2017 +0200
@@ -466,12 +466,12 @@
         return True
 
     def isignoreddir(localpath):
-        """
-        This function checks whether the directory contains only ignored files
-        and hence should the directory be considered ignored. Returns True, if
-        that should be ignored otherwise False.
+        """Return True if `localpath` directory is ignored or contains only
+        ignored files and should hence be considered ignored.
         """
         dirpath = os.path.join(root, localpath)
+        if ignorefn(dirpath):
+            return True
         for f in os.listdir(dirpath):
             filepath = os.path.join(dirpath, f)
             if os.path.isdir(filepath):