diff --git a/mercurial/copies.py b/mercurial/copies.py
index 97c5d1c22489c69ad3335b800e25d8a7d7cfbc4a_bWVyY3VyaWFsL2NvcGllcy5weQ==..d86875b758388e7952eb2ca59e9e45481a1ab356_bWVyY3VyaWFsL2NvcGllcy5weQ== 100644
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -94,7 +94,7 @@
     ds = repo.dirstate
     c = ds.copies().copy()
     for k in list(c):
-        if ds[k] not in b'anm' or (match and not match(k)):
+        if not ds.get_entry(k).tracked or (match and not match(k)):
             del c[k]
     return c