# HG changeset patch # User Kevin Bullock # Date 1509723158 18000 # Node ID 19ecd39223dcd0383be39f4d240d25db48e147e0 # Parent d8c2db6167b3e819a4d05120354e3fedf093a9bf# Parent f445b10dc7fb3495d24d1c22b0996148864c77f7 merge with stable diff -r d8c2db6167b3 -r 19ecd39223dc mercurial/pathutil.py --- 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