mercurial/cmdutil.py
changeset 33694 93422d0068f8
parent 33666 6f4bc9688ca9
child 33726 ab0c55c2ad9a
equal deleted inserted replaced
33693:db3dc11356ed 33694:93422d0068f8
   464             else:
   464             else:
   465                 return False
   465                 return False
   466         return True
   466         return True
   467 
   467 
   468     def isignoreddir(localpath):
   468     def isignoreddir(localpath):
   469         """
   469         """Return True if `localpath` directory is ignored or contains only
   470         This function checks whether the directory contains only ignored files
   470         ignored files and should hence be considered ignored.
   471         and hence should the directory be considered ignored. Returns True, if
       
   472         that should be ignored otherwise False.
       
   473         """
   471         """
   474         dirpath = os.path.join(root, localpath)
   472         dirpath = os.path.join(root, localpath)
       
   473         if ignorefn(dirpath):
       
   474             return True
   475         for f in os.listdir(dirpath):
   475         for f in os.listdir(dirpath):
   476             filepath = os.path.join(dirpath, f)
   476             filepath = os.path.join(dirpath, f)
   477             if os.path.isdir(filepath):
   477             if os.path.isdir(filepath):
   478                 # recursion here
   478                 # recursion here
   479                 ret = isignoreddir(os.path.join(localpath, f))
   479                 ret = isignoreddir(os.path.join(localpath, f))