mercurial/hgweb/webcommands.py
changeset 51696 7f0cb9ee0534
parent 51686 493034cc3265
child 51699 ca7bde5dbafb
equal deleted inserted replaced
51695:bd1483fd7088 51696:7f0cb9ee0534
   599                 b"permissions": mf.flags(full),
   599                 b"permissions": mf.flags(full),
   600             }
   600             }
   601 
   601 
   602     def dirlist(context):
   602     def dirlist(context):
   603         for d in sorted(dirs):
   603         for d in sorted(dirs):
       
   604 
   604             emptydirs = []
   605             emptydirs = []
   605             h = dirs[d]
   606             h = dirs[d]
   606             while isinstance(h, dict) and len(h) == 1:
   607             while isinstance(h, dict) and len(h) == 1:
   607                 k, v = next(iter(h.items()))
   608                 k, v = next(iter(h.items()))
   608                 if v:
   609                 if v:
  1424                 if item[1] == graphmod.CHANGESET
  1425                 if item[1] == graphmod.CHANGESET
  1425             )
  1426             )
  1426         return tree
  1427         return tree
  1427 
  1428 
  1428     def jsdata(context):
  1429     def jsdata(context):
  1429         for id, type, ctx, vtx, edges in fulltree():
  1430         for (id, type, ctx, vtx, edges) in fulltree():
  1430             yield {
  1431             yield {
  1431                 b'node': pycompat.bytestr(ctx),
  1432                 b'node': pycompat.bytestr(ctx),
  1432                 b'graphnode': webutil.getgraphnode(web.repo, ctx),
  1433                 b'graphnode': webutil.getgraphnode(web.repo, ctx),
  1433                 b'vertex': vtx,
  1434                 b'vertex': vtx,
  1434                 b'edges': edges,
  1435                 b'edges': edges,