diff -r b69c700b6de6 -r 0ba3b928f9a9 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Nov 04 23:40:26 2017 +0900 +++ b/mercurial/cmdutil.py Sat Nov 04 23:45:59 2017 +0900 @@ -3180,12 +3180,11 @@ if path not in filestoamend: return old.filectx(path) + # Return None for removed files. + if path in wctx.removed(): + return None + fctx = wctx[path] - - # Return None for removed files. - if not fctx.exists(): - return None - flags = fctx.flags() mctx = context.memfilectx(repo, fctx.path(), fctx.data(),