Mercurial > hg-stable
changeset 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 | be441eb65f09 |
children | e46c3b6a47b5 |
files | contrib/python3-whitelist mercurial/pathutil.py |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/python3-whitelist Sun Jul 08 16:21:26 2018 +0900 +++ b/contrib/python3-whitelist Sun Jul 08 16:31:14 2018 +0900 @@ -2,6 +2,7 @@ test-add.t test-addremove-similar.t test-addremove.t +test-alias.t test-amend-subrepo.t test-amend.t test-ancestor.py
--- a/mercurial/pathutil.py Sun Jul 08 16:21:26 2018 +0900 +++ b/mercurial/pathutil.py Sun Jul 08 16:31:14 2018 +0900 @@ -226,7 +226,7 @@ if cwd != root: canonpath(root, root, myname, auditor) relpath = util.pathto(root, cwd, '') - if relpath[-1] == pycompat.ossep: + if relpath.endswith(pycompat.ossep): relpath = relpath[:-1] hint = (_("consider using '--cwd %s'") % relpath) except error.Abort: