Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/logcmdutil.py @ 38200:ec37df9042f9
templatekw: make getrenamed() return only filename, not nodeid
No callers cared about the nodeid and I want to make getrenamed() not
look up the node (although it's currently free, I hope to store copy
info in changesets and not include the nodeid).
Differential Revision: https://phab.mercurial-scm.org/D3666
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 26 Mar 2018 10:49:01 -0700 |
parents | 3fe1c9263024 |
children | f2f9bacf0587 |
comparison
equal
deleted
inserted
replaced
38199:cc9aa88792fe | 38200:ec37df9042f9 |
---|---|
863 if getrenamed and ctx.rev(): | 863 if getrenamed and ctx.rev(): |
864 copies = [] | 864 copies = [] |
865 for fn in ctx.files(): | 865 for fn in ctx.files(): |
866 rename = getrenamed(fn, ctx.rev()) | 866 rename = getrenamed(fn, ctx.rev()) |
867 if rename: | 867 if rename: |
868 copies.append((fn, rename[0])) | 868 copies.append((fn, rename)) |
869 edges = edgefn(type, char, state, rev, parents) | 869 edges = edgefn(type, char, state, rev, parents) |
870 firstedge = next(edges) | 870 firstedge = next(edges) |
871 width = firstedge[2] | 871 width = firstedge[2] |
872 displayer.show(ctx, copies=copies, | 872 displayer.show(ctx, copies=copies, |
873 graphwidth=width, **pycompat.strkwargs(props)) | 873 graphwidth=width, **pycompat.strkwargs(props)) |
891 if getrenamed is not None and rev: | 891 if getrenamed is not None and rev: |
892 copies = [] | 892 copies = [] |
893 for fn in ctx.files(): | 893 for fn in ctx.files(): |
894 rename = getrenamed(fn, rev) | 894 rename = getrenamed(fn, rev) |
895 if rename: | 895 if rename: |
896 copies.append((fn, rename[0])) | 896 copies.append((fn, rename)) |
897 displayer.show(ctx, copies=copies) | 897 displayer.show(ctx, copies=copies) |
898 displayer.flush(ctx) | 898 displayer.flush(ctx) |
899 displayer.close() | 899 displayer.close() |
900 | 900 |
901 def checkunsupportedgraphflags(pats, opts): | 901 def checkunsupportedgraphflags(pats, opts): |