mercurial/cmdutil.py
branchstable
changeset 35022 0ba3b928f9a9
parent 34981 527655a049ee
child 35023 5f40efa472db
--- 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(),