mercurial/dirstate.py
changeset 1562 2f97af0b522c
parent 1559 59b3639df0a9
child 1564 34579a67fa71
equal deleted inserted replaced
1561:9c6d0abdb94e 1562:2f97af0b522c
   303                 names.sort()
   303                 names.sort()
   304                 # nd is the top of the repository dir tree
   304                 # nd is the top of the repository dir tree
   305                 nd = util.normpath(top[len(self.root) + 1:])
   305                 nd = util.normpath(top[len(self.root) + 1:])
   306                 if nd == '.': nd = ''
   306                 if nd == '.': nd = ''
   307                 for f in names:
   307                 for f in names:
   308                     np = os.path.join(nd, f)
   308                     np = util.pconvert(os.path.join(nd, f))
   309                     if seen(np):
   309                     if seen(np):
   310                         continue
   310                         continue
   311                     p = os.path.join(top, f)
   311                     p = os.path.join(top, f)
   312                     # don't trip over symlinks
   312                     # don't trip over symlinks
   313                     st = os.lstat(p)
   313                     st = os.lstat(p)
   314                     if stat.S_ISDIR(st.st_mode):
   314                     if stat.S_ISDIR(st.st_mode):
   315                         ds = os.path.join(nd, f +'/')
   315                         ds = os.path.join(nd, f +'/')
   316                         if statmatch(ds, st):
   316                         if statmatch(ds, st):
   317                             work.append(p)
   317                             work.append(p)
   318                         if statmatch(np, st) and np in dc:
   318                         if statmatch(np, st) and np in dc:
   319                             yield 'm', util.pconvert(np), st
   319                             yield 'm', np, st
   320                     elif statmatch(np, st):
   320                     elif statmatch(np, st):
   321                         if self.supported_type(np, st):
   321                         if self.supported_type(np, st):
   322                             yield 'f', util.pconvert(np), st
   322                             yield 'f', np, st
   323                         elif np in dc:
   323                         elif np in dc:
   324                             yield 'm', util.pconvert(np), st
   324                             yield 'm', np, st
   325 
   325 
   326         known = {'.hg': 1}
   326         known = {'.hg': 1}
   327         def seen(fn):
   327         def seen(fn):
   328             if fn in known: return True
   328             if fn in known: return True
   329             known[fn] = 1
   329             known[fn] = 1