diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -130,6 +130,8 @@ test-hghave.t test-hgignore.t test-hgk.t +test-hgweb-bundle.t +test-hgweb-descend-empties.t test-hgweb-removed.t test-histedit-arguments.t test-histedit-base.t diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -495,7 +495,7 @@ dirs = {} parity = paritygen(web.stripecount) - if path and path[-1] != "/": + if path and path[-1:] != "/": path += "/" l = len(path) abspath = "/" + path diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -38,9 +38,9 @@ ) def up(p): - if p[0] != "/": + if p[0:1] != "/": p = "/" + p - if p[-1] == "/": + if p[-1:] == "/": p = p[:-1] up = os.path.dirname(p) if up == "/":