hgext3rd/evolve/__init__.py
changeset 2349 521a18a10a06
parent 2342 e28026b4d3c1
child 2350 ea816b5c1cf6
equal deleted inserted replaced
2347:24bf0e3d84e3 2349:521a18a10a06
  3286 
  3286 
  3287         succs = successors.get(ctxnode, ())
  3287         succs = successors.get(ctxnode, ())
  3288 
  3288 
  3289         markerfm = fm.nested("debugobshistory.markers")
  3289         markerfm = fm.nested("debugobshistory.markers")
  3290         for successor in sorted(succs):
  3290         for successor in sorted(succs):
  3291             _debugobshistorydisplaymarker(ui, markerfm, repo, successor)
  3291             _debugobshistorydisplaymarker(markerfm, repo, successor)
  3292         markerfm.end()
  3292         markerfm.end()
  3293 
  3293 
  3294         precs = precursors.get(ctxnode, ())
  3294         precs = precursors.get(ctxnode, ())
  3295         nodes.extend(precursor[0] for precursor in sorted(precs))
  3295         nodes.extend(precursor[0] for precursor in sorted(precs))
  3296 
  3296 
  3297 def _debugobshistorydisplaynode(ui, fm, repo, node):
  3297 def _debugobshistorydisplaynode(ui, fm, repo, node):
  3298     ctx = repo.unfiltered()[node]
  3298     if node in repo.unfiltered():
       
  3299         _debugobshistorydisplayctx(fm, repo.unfiltered()[node])
       
  3300     else:
       
  3301         _debugobshistorydisplaymissingctx(fm, node)
       
  3302 
       
  3303 def _debugobshistorydisplayctx(fm, ctx):
  3299     shortdescription = ctx.description().splitlines()[0]
  3304     shortdescription = ctx.description().splitlines()[0]
  3300 
  3305 
  3301     fm.startitem()
  3306     fm.startitem()
  3302     fm.write('debugobshistory.node', '%s', str(ctx),
  3307     fm.write('debugobshistory.node', '%s', str(ctx),
  3303              label="evolve.short_node")
  3308              label="evolve.short_node")
  3309 
  3314 
  3310     fm.write('debugobshistory.shortdescription', '%s', shortdescription,
  3315     fm.write('debugobshistory.shortdescription', '%s', shortdescription,
  3311              label="evolve.short_description")
  3316              label="evolve.short_description")
  3312     fm.plain('\n')
  3317     fm.plain('\n')
  3313 
  3318 
  3314 def _debugobshistorydisplaymarker(ui, fm, repo, marker):
  3319 def _debugobshistorydisplaymissingctx(fm, nodewithoutctx):
       
  3320     hexnode = node.short(nodewithoutctx)
       
  3321     fm.startitem()
       
  3322     fm.write('debugobshistory.node', '%s', hexnode,
       
  3323              label="evolve.short_node evolve.missing_change_ctx")
       
  3324     fm.plain('\n')
       
  3325 
       
  3326 def _debugobshistorydisplaymarker(fm, repo, marker):
  3315     succnodes = marker[1]
  3327     succnodes = marker[1]
  3316     date = marker[4]
  3328     date = marker[4]
  3317     metadata = dict(marker[3])
  3329     metadata = dict(marker[3])
  3318 
  3330 
  3319     fm.startitem()
  3331     fm.startitem()