mercurial/dirstate.py
changeset 2061 5987c1eac2ce
parent 2022 a59da8cc35e4
child 2062 5460f0196f77
equal deleted inserted replaced
2030:8d9ec30d58bc 2061:5987c1eac2ce
   338                 top = work.pop()
   338                 top = work.pop()
   339                 names = os.listdir(top)
   339                 names = os.listdir(top)
   340                 names.sort()
   340                 names.sort()
   341                 # nd is the top of the repository dir tree
   341                 # nd is the top of the repository dir tree
   342                 nd = util.normpath(top[len(self.root) + 1:])
   342                 nd = util.normpath(top[len(self.root) + 1:])
   343                 if nd == '.': nd = ''
   343                 if nd == '.':
       
   344                     nd = ''
       
   345                 else:
       
   346                     hg = bisect.bisect_left(names, '.hg')
       
   347                     if hg < len(names) and names[hg] == '.hg':
       
   348                         if os.path.isdir(os.path.join(top, '.hg')):
       
   349                             continue
   344                 for f in names:
   350                 for f in names:
   345                     np = util.pconvert(os.path.join(nd, f))
   351                     np = util.pconvert(os.path.join(nd, f))
   346                     if seen(np):
   352                     if seen(np):
   347                         continue
   353                         continue
   348                     p = os.path.join(top, f)
   354                     p = os.path.join(top, f)