##// END OF EJS Templates
templatekw: make getrenamed() return only filename, not nodeid...
Martin von Zweigbergk -
r38422:ec37df90 default
parent child Browse files
Show More
@@ -865,7 +865,7 b' def displaygraph(ui, repo, dag, displaye'
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]
@@ -893,7 +893,7 b' def displayrevs(ui, repo, revs, displaye'
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()
@@ -111,7 +111,7 b' def getrenamedfn(repo, endrev=None):'
111 for i in fl:
111 for i in fl:
112 lr = fl.linkrev(i)
112 lr = fl.linkrev(i)
113 renamed = fl.renamed(fl.node(i))
113 renamed = fl.renamed(fl.node(i))
114 rcache[fn][lr] = renamed
114 rcache[fn][lr] = renamed and renamed[0]
115 if lr >= endrev:
115 if lr >= endrev:
116 break
116 break
117 if rev in rcache[fn]:
117 if rev in rcache[fn]:
@@ -120,7 +120,8 b' def getrenamedfn(repo, endrev=None):'
120 # If linkrev != rev (i.e. rev not found in rcache) fallback to
120 # If linkrev != rev (i.e. rev not found in rcache) fallback to
121 # filectx logic.
121 # filectx logic.
122 try:
122 try:
123 return repo[rev][fn].renamed()
123 renamed = repo[rev][fn].renamed()
124 return renamed and renamed[0]
124 except error.LookupError:
125 except error.LookupError:
125 return None
126 return None
126
127
@@ -318,7 +319,7 b' def showfilecopies(context, mapping):'
318 for fn in ctx.files():
319 for fn in ctx.files():
319 rename = getrenamed(fn, ctx.rev())
320 rename = getrenamed(fn, ctx.rev())
320 if rename:
321 if rename:
321 copies.append((fn, rename[0]))
322 copies.append((fn, rename))
322
323
323 copies = util.sortdict(copies)
324 copies = util.sortdict(copies)
324 return compatdict(context, mapping, 'file_copy', copies,
325 return compatdict(context, mapping, 'file_copy', copies,
General Comments 0
You need to be logged in to leave comments. Login now