durin42 created this revision. Herald added a reviewer: pulkit. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY Fixes a couple of hgweb tests. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2661 AFFECTED FILES contrib/python3-whitelist mercurial/hgweb/webcommands.py mercurial/hgweb/webutil.py CHANGE DETAILS 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 == "/": 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/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 To: durin42, pulkit, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel