diff -r 1d60ad093792 -r 7b2b82f891bf mercurial/fileset.py --- a/mercurial/fileset.py Thu Feb 01 14:13:41 2018 -0500 +++ b/mercurial/fileset.py Tue Feb 06 23:53:37 2018 -0500 @@ -464,9 +464,10 @@ getargs(x, 0, 0, _("copied takes no arguments")) s = [] for f in mctx.subset: - p = mctx.ctx[f].parents() - if p and p[0].path() != f: - s.append(f) + if f in mctx.ctx: + p = mctx.ctx[f].parents() + if p and p[0].path() != f: + s.append(f) return s @predicate('revs(revs, pattern)')