comparison mercurial/hgweb/webutil.py @ 35088:a9454beb9dd8

context: add obsolete() method to basefilectx This method is now used in webutils.commonentry(), which adds common data items (commit hash, author, date, etc) for rendering changesets in hgweb. Usually, commonentry() is given a changectx as ctx; but in views related to files (e.g. file view, diff, annotate) it's replaced by a filectx, so the latter also needs to have obsolete() method.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 18 Nov 2017 11:58:57 +0800
parents 35c6a54ec1ff
children bd2743936b56
comparison
equal deleted inserted replaced
35087:dd000a958364 35088:a9454beb9dd8
359 'author': ctx.user(), 359 'author': ctx.user(),
360 'desc': ctx.description(), 360 'desc': ctx.description(),
361 'date': ctx.date(), 361 'date': ctx.date(),
362 'extra': ctx.extra(), 362 'extra': ctx.extra(),
363 'phase': ctx.phasestr(), 363 'phase': ctx.phasestr(),
364 'obsolete': ctx.obsolete(),
364 'branch': nodebranchnodefault(ctx), 365 'branch': nodebranchnodefault(ctx),
365 'inbranch': nodeinbranch(repo, ctx), 366 'inbranch': nodeinbranch(repo, ctx),
366 'branches': nodebranchdict(repo, ctx), 367 'branches': nodebranchdict(repo, ctx),
367 'tags': nodetagsdict(repo, node), 368 'tags': nodetagsdict(repo, node),
368 'bookmarks': nodebookmarksdict(repo, node), 369 'bookmarks': nodebookmarksdict(repo, node),