mercurial/dirstate.py
changeset 4200 b5d1eaade333
parent 4182 ba51a8225a60
parent 4193 dd0d9bd91e0a
child 4209 dbc3846c09a1
equal deleted inserted replaced
4182:ba51a8225a60 4200:b5d1eaade333
   384         def imatch(file_):
   384         def imatch(file_):
   385             if file_ not in dc and self.ignore(file_):
   385             if file_ not in dc and self.ignore(file_):
   386                 return False
   386                 return False
   387             return match(file_)
   387             return match(file_)
   388 
   388 
   389         if ignored: imatch = match
   389         ignore = self.ignore
       
   390         if ignored:
       
   391             imatch = match
       
   392             ignore = util.never
   390 
   393 
   391         # self.root may end with a path separator when self.root == '/'
   394         # self.root may end with a path separator when self.root == '/'
   392         common_prefix_len = len(self.root)
   395         common_prefix_len = len(self.root)
   393         if not self.root.endswith(os.sep):
   396         if not self.root.endswith(os.sep):
   394             common_prefix_len += 1
   397             common_prefix_len += 1
   419                         continue
   422                         continue
   420                     p = os.path.join(top, f)
   423                     p = os.path.join(top, f)
   421                     # don't trip over symlinks
   424                     # don't trip over symlinks
   422                     st = os.lstat(p)
   425                     st = os.lstat(p)
   423                     if stat.S_ISDIR(st.st_mode):
   426                     if stat.S_ISDIR(st.st_mode):
   424                         ds = util.pconvert(os.path.join(nd, f +'/'))
   427                         if not ignore(p):
   425                         if imatch(ds):
       
   426                             work.append(p)
   428                             work.append(p)
   427                             if directories:
   429                             if directories:
   428                                 yield 'd', np, st
   430                                 yield 'd', np, st
   429                         if imatch(np) and np in dc:
   431                         if imatch(np) and np in dc:
   430                             yield 'm', np, st
   432                             yield 'm', np, st