mercurial/logcmdutil.py
changeset 36198 7bc10d3f68b4
parent 36196 1abf089a1d70
child 36441 27cd83152d31
equal deleted inserted replaced
36197:db26e6a0a677 36198:7bc10d3f68b4
   897         for type, char, width, coldata in itertools.chain([firstedge], edges):
   897         for type, char, width, coldata in itertools.chain([firstedge], edges):
   898             graphmod.ascii(ui, state, type, char, lines, coldata)
   898             graphmod.ascii(ui, state, type, char, lines, coldata)
   899             lines = []
   899             lines = []
   900     displayer.close()
   900     displayer.close()
   901 
   901 
   902 def graphlog(ui, repo, revs, displayer, getrenamed):
   902 def displaygraphrevs(ui, repo, revs, displayer, getrenamed):
   903     revdag = graphmod.dagwalker(repo, revs)
   903     revdag = graphmod.dagwalker(repo, revs)
   904     displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, getrenamed)
   904     displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, getrenamed)
       
   905 
       
   906 def displayrevs(ui, repo, revs, displayer, getrenamed):
       
   907     for rev in revs:
       
   908         ctx = repo[rev]
       
   909         copies = None
       
   910         if getrenamed is not None and rev:
       
   911             copies = []
       
   912             for fn in ctx.files():
       
   913                 rename = getrenamed(fn, rev)
       
   914                 if rename:
       
   915                     copies.append((fn, rename[0]))
       
   916         displayer.show(ctx, copies=copies)
       
   917         displayer.flush(ctx)
       
   918     displayer.close()
   905 
   919 
   906 def checkunsupportedgraphflags(pats, opts):
   920 def checkunsupportedgraphflags(pats, opts):
   907     for op in ["newest_first"]:
   921     for op in ["newest_first"]:
   908         if op in opts and opts[op]:
   922         if op in opts and opts[op]:
   909             raise error.Abort(_("-G/--graph option is incompatible with --%s")
   923             raise error.Abort(_("-G/--graph option is incompatible with --%s")