comparison mercurial/hgweb/webcommands.py @ 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 3a65012be661
children 23bba755cf80
comparison
equal deleted inserted replaced
35094:38fe3fe4bbb6 35095:4bc74bc78efd
1253 desc = templatefilters.firstline(encodestr(ctx.description())) 1253 desc = templatefilters.firstline(encodestr(ctx.description()))
1254 desc = url.escape(templatefilters.nonempty(desc)) 1254 desc = url.escape(templatefilters.nonempty(desc))
1255 user = url.escape(templatefilters.person(encodestr(ctx.user()))) 1255 user = url.escape(templatefilters.person(encodestr(ctx.user())))
1256 branch = url.escape(encodestr(ctx.branch())) 1256 branch = url.escape(encodestr(ctx.branch()))
1257 try: 1257 try:
1258 branchnode = web.repo.branchtip(branch) 1258 branchnode = web.repo.branchtip(ctx.branch())
1259 except error.RepoLookupError: 1259 except error.RepoLookupError:
1260 branchnode = None 1260 branchnode = None
1261 branch = branch, branchnode == ctx.node() 1261 branch = branch, branchnode == ctx.node()
1262 1262
1263 if usetuples: 1263 if usetuples: