Show More
@@ -3887,12 +3887,12 def log(ui, repo, *pats, **opts): | |||
|
3887 | 3887 | # then filter the result by logcmdutil._makerevset() and --limit |
|
3888 | 3888 | revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) |
|
3889 | 3889 | |
|
3890 |
get |
|
|
3890 | getcopies = None | |
|
3891 | 3891 | if opts.get('copies'): |
|
3892 | 3892 | endrev = None |
|
3893 | 3893 | if revs: |
|
3894 | 3894 | endrev = revs.max() + 1 |
|
3895 |
get |
|
|
3895 | getcopies = scmutil.getcopiesfn(repo, endrev=endrev) | |
|
3896 | 3896 | |
|
3897 | 3897 | ui.pager('log') |
|
3898 | 3898 | displayer = logcmdutil.changesetdisplayer(ui, repo, opts, differ, |
@@ -3901,7 +3901,7 def log(ui, repo, *pats, **opts): | |||
|
3901 | 3901 | displayfn = logcmdutil.displaygraphrevs |
|
3902 | 3902 | else: |
|
3903 | 3903 | displayfn = logcmdutil.displayrevs |
|
3904 |
displayfn(ui, repo, revs, displayer, get |
|
|
3904 | displayfn(ui, repo, revs, displayer, getcopies) | |
|
3905 | 3905 | |
|
3906 | 3906 | @command('manifest', |
|
3907 | 3907 | [('r', 'rev', '', _('revision to display'), _('REV')), |
@@ -862,7 +862,7 def _graphnodeformatter(ui, displayer): | |||
|
862 | 862 | return templ.renderdefault(props) |
|
863 | 863 | return formatnode |
|
864 | 864 | |
|
865 |
def displaygraph(ui, repo, dag, displayer, edgefn, get |
|
|
865 | def displaygraph(ui, repo, dag, displayer, edgefn, getcopies=None, props=None): | |
|
866 | 866 | props = props or {} |
|
867 | 867 | formatnode = _graphnodeformatter(ui, displayer) |
|
868 | 868 | state = graphmod.asciistate() |
@@ -890,13 +890,7 def displaygraph(ui, repo, dag, displaye | |||
|
890 | 890 | |
|
891 | 891 | for rev, type, ctx, parents in dag: |
|
892 | 892 | char = formatnode(repo, ctx) |
|
893 | copies = None | |
|
894 | if getrenamed: | |
|
895 | copies = [] | |
|
896 | for fn in ctx.files(): | |
|
897 | rename = getrenamed(fn, ctx.rev()) | |
|
898 | if rename: | |
|
899 | copies.append((fn, rename)) | |
|
893 | copies = getcopies(ctx) if getcopies else None | |
|
900 | 894 | edges = edgefn(type, char, state, rev, parents) |
|
901 | 895 | firstedge = next(edges) |
|
902 | 896 | width = firstedge[2] |
@@ -915,16 +909,10 def displaygraphrevs(ui, repo, revs, dis | |||
|
915 | 909 | revdag = graphmod.dagwalker(repo, revs) |
|
916 | 910 | displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, getrenamed) |
|
917 | 911 | |
|
918 |
def displayrevs(ui, repo, revs, displayer, get |
|
|
912 | def displayrevs(ui, repo, revs, displayer, getcopies): | |
|
919 | 913 | for rev in revs: |
|
920 | 914 | ctx = repo[rev] |
|
921 | copies = None | |
|
922 | if getrenamed is not None: | |
|
923 | copies = [] | |
|
924 | for fn in ctx.files(): | |
|
925 | rename = getrenamed(fn, rev) | |
|
926 | if rename: | |
|
927 | copies.append((fn, rename)) | |
|
915 | copies = getcopies(ctx) if getcopies else None | |
|
928 | 916 | displayer.show(ctx, copies=copies) |
|
929 | 917 | displayer.flush(ctx) |
|
930 | 918 | displayer.close() |
General Comments 0
You need to be logged in to leave comments.
Login now