Comments
Patch
@@ -2243,11 +2243,11 @@
if fullpaths:
addfile(f)
continue
s = f.find(os.sep, speclen)
if s >= 0:
- adddir(f[:s + 1])
+ adddir(f[:s])
else:
addfile(f)
return files, dirs
acceptable = ''
@@ -2264,14 +2264,10 @@
files, dirs = set(), set()
for spec in specs:
f, d = complete(spec, acceptable or 'nmar')
files.update(f)
dirs.update(d)
- if not files and len(dirs) == 1:
- # force the shell to consider a completion that matches one
- # directory and zero files to be ambiguous
- dirs.add(iter(dirs).next() + '.')
files.update(dirs)
ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files)))
ui.write('\n')
@command('debugpushkey', [], _('REPO NAMESPACE [KEY OLD NEW]'))
@@ -303,11 +303,11 @@
Test debugpathcomplete
$ hg debugpathcomplete f
fee
- fie/
+ fie
fo
$ hg debugpathcomplete -f f
fee
fie/dead
fie/live
@@ -315,16 +315,10 @@
$ hg rm Fum
$ hg debugpathcomplete -r F
Fum
-If one directory and no files match, give an ambiguous answer
-
- $ hg debugpathcomplete fi
- fie/
- fie/.
-
Test debuglabelcomplete
$ hg debuglabelcomplete
Fum
default