mercurial/manifest.py
changeset 24667 19c5b0913960
parent 24666 3092885b5b32
child 24670 dfb86af18a35
equal deleted inserted replaced
24666:3092885b5b32 24667:19c5b0913960
   223         It also reports nonexistent files by marking them bad with match.bad().
   223         It also reports nonexistent files by marking them bad with match.bad().
   224         '''
   224         '''
   225         fset = set(match.files())
   225         fset = set(match.files())
   226 
   226 
   227         # avoid the entire walk if we're only looking for specific files
   227         # avoid the entire walk if we're only looking for specific files
   228         if fset and not match.anypats():
   228         if fset and not match.anypats() and util.all(fn in self for fn in fset):
   229             if util.all(fn in self for fn in fset):
   229             for fn in sorted(fset):
   230                 for fn in sorted(fset):
   230                 yield fn
   231                     yield fn
   231             raise StopIteration
   232                 raise StopIteration
       
   233 
   232 
   234         for fn in self:
   233         for fn in self:
   235             if fn in fset:
   234             if fn in fset:
   236                 # specified pattern is the exact name
   235                 # specified pattern is the exact name
   237                 fset.remove(fn)
   236                 fset.remove(fn)