mercurial/hgweb/webutil.py
changeset 35485 1721ce06100a
parent 35454 786289423e97
child 35486 4c7ae95e1c71
equal deleted inserted replaced
35484:1853c8677160 35485:1721ce06100a
    30     mdiff,
    30     mdiff,
    31     patch,
    31     patch,
    32     pathutil,
    32     pathutil,
    33     pycompat,
    33     pycompat,
    34     templatefilters,
    34     templatefilters,
       
    35     templatekw,
    35     ui as uimod,
    36     ui as uimod,
    36     util,
    37     util,
    37 )
    38 )
    38 
    39 
    39 def up(p):
    40 def up(p):
   349         raise ErrorResponse(HTTP_BAD_REQUEST, str(exc))
   350         raise ErrorResponse(HTTP_BAD_REQUEST, str(exc))
   350 
   351 
   351 def formatlinerange(fromline, toline):
   352 def formatlinerange(fromline, toline):
   352     return '%d:%d' % (fromline + 1, toline)
   353     return '%d:%d' % (fromline + 1, toline)
   353 
   354 
       
   355 def succsandmarkers(repo, ctx):
       
   356     return templatekw.showsuccsandmarkers(repo, ctx)
       
   357 
   354 def commonentry(repo, ctx):
   358 def commonentry(repo, ctx):
   355     node = ctx.node()
   359     node = ctx.node()
   356     return {
   360     return {
   357         'rev': ctx.rev(),
   361         'rev': ctx.rev(),
   358         'node': hex(node),
   362         'node': hex(node),
   360         'desc': ctx.description(),
   364         'desc': ctx.description(),
   361         'date': ctx.date(),
   365         'date': ctx.date(),
   362         'extra': ctx.extra(),
   366         'extra': ctx.extra(),
   363         'phase': ctx.phasestr(),
   367         'phase': ctx.phasestr(),
   364         'obsolete': ctx.obsolete(),
   368         'obsolete': ctx.obsolete(),
       
   369         'succsandmarkers': lambda **x: succsandmarkers(repo, ctx),
   365         'instabilities': [{"instability": i} for i in ctx.instabilities()],
   370         'instabilities': [{"instability": i} for i in ctx.instabilities()],
   366         'branch': nodebranchnodefault(ctx),
   371         'branch': nodebranchnodefault(ctx),
   367         'inbranch': nodeinbranch(repo, ctx),
   372         'inbranch': nodeinbranch(repo, ctx),
   368         'branches': nodebranchdict(repo, ctx),
   373         'branches': nodebranchdict(repo, ctx),
   369         'tags': nodetagsdict(repo, node),
   374         'tags': nodetagsdict(repo, node),