Show More
@@ -3434,22 +3434,10 b' def log(ui, repo, *pats, **opts):' | |||||
3434 | displayer = logcmdutil.changesetdisplayer(ui, repo, opts, differ, |
|
3434 | displayer = logcmdutil.changesetdisplayer(ui, repo, opts, differ, | |
3435 | buffered=True) |
|
3435 | buffered=True) | |
3436 | if opts.get('graph'): |
|
3436 | if opts.get('graph'): | |
3437 | logcmdutil.graphlog(ui, repo, revs, displayer, getrenamed) |
|
3437 | displayfn = logcmdutil.displaygraphrevs | |
3438 | return |
|
3438 | else: | |
3439 |
|
3439 | displayfn = logcmdutil.displayrevs | ||
3440 | for rev in revs: |
|
3440 | displayfn(ui, repo, revs, displayer, getrenamed) | |
3441 | ctx = repo[rev] |
|
|||
3442 | copies = None |
|
|||
3443 | if getrenamed is not None and rev: |
|
|||
3444 | copies = [] |
|
|||
3445 | for fn in ctx.files(): |
|
|||
3446 | rename = getrenamed(fn, rev) |
|
|||
3447 | if rename: |
|
|||
3448 | copies.append((fn, rename[0])) |
|
|||
3449 | displayer.show(ctx, copies=copies) |
|
|||
3450 | displayer.flush(ctx) |
|
|||
3451 |
|
||||
3452 | displayer.close() |
|
|||
3453 |
|
3441 | |||
3454 | @command('manifest', |
|
3442 | @command('manifest', | |
3455 | [('r', 'rev', '', _('revision to display'), _('REV')), |
|
3443 | [('r', 'rev', '', _('revision to display'), _('REV')), |
@@ -899,10 +899,24 b' def displaygraph(ui, repo, dag, displaye' | |||||
899 | lines = [] |
|
899 | lines = [] | |
900 | displayer.close() |
|
900 | displayer.close() | |
901 |
|
901 | |||
902 |
def |
|
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 |
|
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() | |||
|
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]: |
General Comments 0
You need to be logged in to leave comments.
Login now