diff -r dffc35a5be9f -r 8a0cac20a1ad mercurial/debugcommands.py --- a/mercurial/debugcommands.py Sat Dec 09 14:22:12 2017 -0800 +++ b/mercurial/debugcommands.py Mon Dec 11 09:27:40 2017 -0800 @@ -225,7 +225,8 @@ def fctxfn(repo, cx, path): if path in filecontent: - return context.memfilectx(repo, path, filecontent[path]) + return context.memfilectx(repo, cx, path, + filecontent[path]) return None if len(ps) == 0 or ps[0] < 0: