Commit b3469131 authored by Steve Borho's avatar Steve Borho
Browse files

fileview: recognize symlinks and report accordingly

parent c26d74a8603e
......@@ -559,6 +559,13 @@ class FileData(object):
repo = ctx._repo
self.flabel += u'<b>%s</b>' % hglib.tounicode(wfile)
absfile = repo.wjoin(wfile)
if os.path.islink(absfile):
data = os.readlink(absfile)
self.contents = hglib.tounicode(data)
self.flabel += _(' <i>(is a symlink)</i>')
return
if type(ctx.rev()) == str:
chunks = ctx.thgmqpatchchunks(wfile)
self.diff = '\n'.join(chunks)
......
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