author | Kevin Bullock <kbullock+mercurial@ringworld.org> |
Fri, 03 Nov 2017 10:32:38 -0500 | |
changeset 34967 | 19ecd39223dc |
parent 34966 | d8c2db6167b3 (current diff) |
parent 34965 | f445b10dc7fb (diff) |
child 34968 | 3649c3f2cd90 |
--- a/mercurial/pathutil.py Fri Nov 03 21:14:57 2017 +0900 +++ b/mercurial/pathutil.py Fri Nov 03 10:32:38 2017 -0500 @@ -184,8 +184,10 @@ try: if cwd != root: canonpath(root, root, myname, auditor) - hint = (_("consider using '--cwd %s'") - % os.path.relpath(root, cwd)) + relpath = util.pathto(root, cwd, '') + if relpath[-1] == pycompat.ossep: + relpath = relpath[:-1] + hint = (_("consider using '--cwd %s'") % relpath) except error.Abort: pass