mercurial/logcmdutil.py
changeset 36198 7bc10d3f68b4
parent 36196 1abf089a1d70
child 36441 27cd83152d31
--- a/mercurial/logcmdutil.py	Sun Jan 21 16:04:59 2018 +0900
+++ b/mercurial/logcmdutil.py	Sun Jan 21 16:15:20 2018 +0900
@@ -899,10 +899,24 @@
             lines = []
     displayer.close()
 
-def graphlog(ui, repo, revs, displayer, getrenamed):
+def displaygraphrevs(ui, repo, revs, displayer, getrenamed):
     revdag = graphmod.dagwalker(repo, revs)
     displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, getrenamed)
 
+def displayrevs(ui, repo, revs, displayer, getrenamed):
+    for rev in revs:
+        ctx = repo[rev]
+        copies = None
+        if getrenamed is not None and rev:
+            copies = []
+            for fn in ctx.files():
+                rename = getrenamed(fn, rev)
+                if rename:
+                    copies.append((fn, rename[0]))
+        displayer.show(ctx, copies=copies)
+        displayer.flush(ctx)
+    displayer.close()
+
 def checkunsupportedgraphflags(pats, opts):
     for op in ["newest_first"]:
         if op in opts and opts[op]: