mercurial/hgweb/webcommands.py
changeset 14490 1d3e2349304a
parent 14055 421d56a055fd
child 14514 175e4b9d8a96
equal deleted inserted replaced
14489:3a27faf9a999 14490:1d3e2349304a
   261         template = f in ctx and 'filenodelink' or 'filenolink'
   261         template = f in ctx and 'filenodelink' or 'filenolink'
   262         files.append(tmpl(template,
   262         files.append(tmpl(template,
   263                           node=ctx.hex(), file=f,
   263                           node=ctx.hex(), file=f,
   264                           parity=parity.next()))
   264                           parity=parity.next()))
   265 
   265 
   266     parity = paritygen(web.stripecount)
       
   267     style = web.config('web', 'style', 'paper')
   266     style = web.config('web', 'style', 'paper')
   268     if 'style' in req.form:
   267     if 'style' in req.form:
   269         style = req.form['style'][0]
   268         style = req.form['style'][0]
   270 
   269 
       
   270     parity = paritygen(web.stripecount)
   271     diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style)
   271     diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style)
       
   272 
       
   273     parity = paritygen(web.stripecount)
       
   274     diffstat = lambda: webutil.diffstat(tmpl, ctx, parity)
       
   275 
   272     return tmpl('changeset',
   276     return tmpl('changeset',
   273                 diff=diffs,
   277                 diff=diffs,
   274                 rev=ctx.rev(),
   278                 rev=ctx.rev(),
   275                 node=ctx.hex(),
   279                 node=ctx.hex(),
   276                 parent=webutil.parents(ctx),
   280                 parent=webutil.parents(ctx),
   280                 changesetbranch=showbranch,
   284                 changesetbranch=showbranch,
   281                 author=ctx.user(),
   285                 author=ctx.user(),
   282                 desc=ctx.description(),
   286                 desc=ctx.description(),
   283                 date=ctx.date(),
   287                 date=ctx.date(),
   284                 files=files,
   288                 files=files,
       
   289                 diffstat=diffstat,
   285                 archives=web.archivelist(ctx.hex()),
   290                 archives=web.archivelist(ctx.hex()),
   286                 tags=webutil.nodetagsdict(web.repo, ctx.node()),
   291                 tags=webutil.nodetagsdict(web.repo, ctx.node()),
   287                 bookmarks=webutil.nodebookmarksdict(web.repo, ctx.node()),
   292                 bookmarks=webutil.nodebookmarksdict(web.repo, ctx.node()),
   288                 branch=webutil.nodebranchnodefault(ctx),
   293                 branch=webutil.nodebranchnodefault(ctx),
   289                 inbranch=webutil.nodeinbranch(web.repo, ctx),
   294                 inbranch=webutil.nodeinbranch(web.repo, ctx),