mercurial/commands.py
changeset 30519 20a42325fdef
parent 30518 a8b17859684a
child 30524 1ee358c3ed26
equal deleted inserted replaced
30518:a8b17859684a 30519:20a42325fdef
  2628     Completion extends only to the next path segment unless
  2628     Completion extends only to the next path segment unless
  2629     --full is specified, in which case entire paths are used.'''
  2629     --full is specified, in which case entire paths are used.'''
  2630 
  2630 
  2631     def complete(path, acceptable):
  2631     def complete(path, acceptable):
  2632         dirstate = repo.dirstate
  2632         dirstate = repo.dirstate
  2633         spec = os.path.normpath(os.path.join(os.getcwd(), path))
  2633         spec = os.path.normpath(os.path.join(pycompat.getcwd(), path))
  2634         rootdir = repo.root + os.sep
  2634         rootdir = repo.root + os.sep
  2635         if spec != repo.root and not spec.startswith(rootdir):
  2635         if spec != repo.root and not spec.startswith(rootdir):
  2636             return [], []
  2636             return [], []
  2637         if os.path.isdir(spec):
  2637         if os.path.isdir(spec):
  2638             spec += '/'
  2638             spec += '/'