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") |