Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/pathutil.py @ 38593:21be76e07148
py3: use bytes.endswith() instead of bytes[n]
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 08 Jul 2018 16:31:14 +0900 |
parents | d3b893ec5f08 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
38592:be441eb65f09 | 38593:21be76e07148 |
---|---|
224 hint = None | 224 hint = None |
225 try: | 225 try: |
226 if cwd != root: | 226 if cwd != root: |
227 canonpath(root, root, myname, auditor) | 227 canonpath(root, root, myname, auditor) |
228 relpath = util.pathto(root, cwd, '') | 228 relpath = util.pathto(root, cwd, '') |
229 if relpath[-1] == pycompat.ossep: | 229 if relpath.endswith(pycompat.ossep): |
230 relpath = relpath[:-1] | 230 relpath = relpath[:-1] |
231 hint = (_("consider using '--cwd %s'") % relpath) | 231 hint = (_("consider using '--cwd %s'") % relpath) |
232 except error.Abort: | 232 except error.Abort: |
233 pass | 233 pass |
234 | 234 |