diff -r 14cd5290c4e6 -r 6ff8bd691fb8 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Mar 31 23:49:58 2018 +0530 +++ b/mercurial/cmdutil.py Mon Apr 02 23:52:43 2018 -0700 @@ -1058,6 +1058,8 @@ if 'treemanifest' not in repo.requirements: raise error.Abort(_("--dir can only be used on repos with " "treemanifest enabled")) + if not dir.endswith('/'): + dir = dir + '/' dirlog = repo.manifestlog._revlog.dirlog(dir) if len(dirlog): r = dirlog