changeset 35095:4bc74bc78efd

hgweb: check changeset's original branch in graphdata() This piece of code checks if a changeset is the tip of its branch, but as can be seen above in the context, "branch" was prepared for being displayed in hgweb by making it unicode and passing it through url.escape. It's better to use the original ctx.branch().
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 20 Nov 2017 21:47:11 +0800
parents 38fe3fe4bbb6
children 23bba755cf80
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Sun Nov 19 14:02:50 2017 +0800
+++ b/mercurial/hgweb/webcommands.py	Mon Nov 20 21:47:11 2017 +0800
@@ -1255,7 +1255,7 @@
             user = url.escape(templatefilters.person(encodestr(ctx.user())))
             branch = url.escape(encodestr(ctx.branch()))
             try:
-                branchnode = web.repo.branchtip(branch)
+                branchnode = web.repo.branchtip(ctx.branch())
             except error.RepoLookupError:
                 branchnode = None
             branch = branch, branchnode == ctx.node()