--- a/mercurial/commands.py Tue Nov 26 14:33:18 2013 -0600
+++ b/mercurial/commands.py Mon Nov 25 12:12:42 2013 -0500
@@ -2245,7 +2245,7 @@
continue
s = f.find(os.sep, speclen)
if s >= 0:
- adddir(f[:s + 1])
+ adddir(f[:s])
else:
addfile(f)
return files, dirs
@@ -2266,10 +2266,6 @@
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')