Commit 2e5418cf authored by Steve Borho's avatar Steve Borho
Browse files

fileview: read symlink contents from revlog when possible

This still doesn't show symlink diffs, but these are not a high priority
for me.
parent 0d8cd9375c43
......@@ -560,8 +560,12 @@ class FileData(object):
self.flabel += u'<b>%s</b>' % hglib.tounicode(wfile)
absfile = repo.wjoin(wfile)
if os.path.islink(absfile):
data = os.readlink(absfile)
if (wfile in ctx and 'l' in ctx.flags(wfile)) or \
if wfile in ctx:
data = ctx[wfile].data()
data = os.readlink(absfile)
self.contents = hglib.tounicode(data)
self.flabel += _(' <i>(is a symlink)</i>')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment