equal
deleted
inserted
replaced
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 += '/' |