hgext3rd/evolve/obshistory.py
changeset 4752 8a73a8df63b6
parent 4747 fa6aafa2857d
child 4801 16c1398b0063
child 4823 c16fed4908d8
equal deleted inserted replaced
4750:d9d55e34943c 4752:8a73a8df63b6
    14     error,
    14     error,
    15     graphmod,
    15     graphmod,
    16     patch,
    16     patch,
    17     obsutil,
    17     obsutil,
    18     node as nodemod,
    18     node as nodemod,
       
    19     pycompat,
    19     scmutil,
    20     scmutil,
    20     util,
    21     util,
    21 )
    22 )
    22 
    23 
    23 from mercurial.i18n import _
    24 from mercurial.i18n import _
   421 
   422 
   422     return sorted(seen), nodesucc, nodeprec
   423     return sorted(seen), nodesucc, nodeprec
   423 
   424 
   424 def _debugobshistorygraph(ui, repo, revs, opts):
   425 def _debugobshistorygraph(ui, repo, revs, opts):
   425 
   426 
   426     displayer = obsmarker_printer(ui, repo.unfiltered(), obspatch=True, diffopts=opts, buffered=True)
   427     displayer = obsmarker_printer(ui, repo.unfiltered(), obspatch=True,
       
   428                                   diffopts=pycompat.byteskwargs(opts),
       
   429                                   buffered=True)
   427     edges = graphmod.asciiedges
   430     edges = graphmod.asciiedges
   428     walker = _obshistorywalker(repo.unfiltered(), revs, opts.get('all', False), opts.get('filternonlocal', False))
   431     walker = _obshistorywalker(repo.unfiltered(), revs, opts.get('all', False),
       
   432                                opts.get('filternonlocal', False))
   429     compat.displaygraph(ui, repo, walker, displayer, edges)
   433     compat.displaygraph(ui, repo, walker, displayer, edges)
   430 
   434 
   431 def _debugobshistoryrevs(ui, repo, revs, opts):
   435 def _debugobshistoryrevs(ui, repo, revs, opts):
   432     """ Display the obsolescence history for revset
   436     """ Display the obsolescence history for revset
   433     """
   437     """
   434     fm = ui.formatter('debugobshistory', opts)
   438     fm = ui.formatter('debugobshistory', pycompat.byteskwargs(opts))
   435     precursors = repo.obsstore.predecessors
   439     precursors = repo.obsstore.predecessors
   436     successors = repo.obsstore.successors
   440     successors = repo.obsstore.successors
   437     nodec = repo.changelog.node
   441     nodec = repo.changelog.node
   438     unfi = repo.unfiltered()
   442     unfi = repo.unfiltered()
   439     nodes = [nodec(r) for r in revs]
   443     nodes = [nodec(r) for r in revs]