Commit 4f182b56 authored by Steve Borho's avatar Steve Borho
Browse files

fileview: safely handle missing added files

parent 79642b1bcfc1
......@@ -602,9 +602,12 @@ class FileData(object):
# TODO: elif check if a subdirectory (for manifest tool)
if status in ('R', '!'):
newdata = ctx.p1()[wfile].data()
self.contents = hglib.tounicode(newdata)
self.flabel += _(' <i>(was deleted)</i>')
if wfile in ctx.p1():
newdata = ctx.p1()[wfile].data()
self.contents = hglib.tounicode(newdata)
self.flabel += _(' <i>(was deleted)</i>')
else:
self.flabel += _(' <i>(was added, now missing)</i>')
return
if status in ('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