comparison mercurial/hgweb/webcommands.py @ 51858:607e94e01851

format: add many "missing" comma Black was not adding them until the next changeset introduced a bunch of `from __future__ import annotations` to most file. Since it make the next changeset hard to read we introduce them in advance.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 16 Sep 2024 15:36:38 +0200
parents 3b8d92f71d92
children f4733654f144
comparison
equal deleted inserted replaced
51857:f81e0ce5103a 51858:607e94e01851
172 text=templateutil.mappinggenerator(lines), 172 text=templateutil.mappinggenerator(lines),
173 symrev=webutil.symrevorshortnode(web.req, fctx), 173 symrev=webutil.symrevorshortnode(web.req, fctx),
174 rename=webutil.renamelink(fctx), 174 rename=webutil.renamelink(fctx),
175 permissions=fctx.manifest().flags(f), 175 permissions=fctx.manifest().flags(f),
176 ishead=int(ishead), 176 ishead=int(ishead),
177 **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)) 177 **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)),
178 ) 178 )
179 179
180 180
181 @webcommand(b'file') 181 @webcommand(b'file')
182 def file(web): 182 def file(web):
626 up=webutil.up(abspath), 626 up=webutil.up(abspath),
627 upparity=next(parity), 627 upparity=next(parity),
628 fentries=templateutil.mappinggenerator(filelist), 628 fentries=templateutil.mappinggenerator(filelist),
629 dentries=templateutil.mappinggenerator(dirlist), 629 dentries=templateutil.mappinggenerator(dirlist),
630 archives=web.archivelist(hex(node)), 630 archives=web.archivelist(hex(node)),
631 **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)) 631 **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)),
632 ) 632 )
633 633
634 634
635 @webcommand(b'tags') 635 @webcommand(b'tags')
636 def tags(web): 636 def tags(web):
871 b'filediff', 871 b'filediff',
872 file=path, 872 file=path,
873 symrev=webutil.symrevorshortnode(web.req, ctx), 873 symrev=webutil.symrevorshortnode(web.req, ctx),
874 rename=rename, 874 rename=rename,
875 diff=diffs, 875 diff=diffs,
876 **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)) 876 **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)),
877 ) 877 )
878 878
879 879
880 diff = webcommand(b'diff')(filediff) 880 diff = webcommand(b'diff')(filediff)
881 881
952 leftrev=leftrev, 952 leftrev=leftrev,
953 leftnode=hex(leftnode), 953 leftnode=hex(leftnode),
954 rightrev=rightrev, 954 rightrev=rightrev,
955 rightnode=hex(rightnode), 955 rightnode=hex(rightnode),
956 comparison=comparison, 956 comparison=comparison,
957 **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)) 957 **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)),
958 ) 958 )
959 959
960 960
961 @webcommand(b'annotate') 961 @webcommand(b'annotate')
962 def annotate(web): 962 def annotate(web):
1059 symrev=webutil.symrevorshortnode(web.req, fctx), 1059 symrev=webutil.symrevorshortnode(web.req, fctx),
1060 rename=webutil.renamelink(fctx), 1060 rename=webutil.renamelink(fctx),
1061 permissions=fctx.manifest().flags(f), 1061 permissions=fctx.manifest().flags(f),
1062 ishead=int(ishead), 1062 ishead=int(ishead),
1063 diffopts=templateutil.hybriddict(diffopts), 1063 diffopts=templateutil.hybriddict(diffopts),
1064 **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)) 1064 **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)),
1065 ) 1065 )
1066 1066
1067 1067
1068 @webcommand(b'filelog') 1068 @webcommand(b'filelog')
1069 def filelog(web): 1069 def filelog(web):
1222 latestentry=templateutil.mappinglist(latestentry), 1222 latestentry=templateutil.mappinglist(latestentry),
1223 linerange=linerange, 1223 linerange=linerange,
1224 revcount=revcount, 1224 revcount=revcount,
1225 morevars=morevars, 1225 morevars=morevars,
1226 lessvars=lessvars, 1226 lessvars=lessvars,
1227 **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)) 1227 **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)),
1228 ) 1228 )
1229 1229
1230 1230
1231 @webcommand(b'archive') 1231 @webcommand(b'archive')
1232 def archive(web): 1232 def archive(web):