mercurial/context.py
changeset 47594 0cef28b121a4
parent 47350 04d1f17f49e7
child 47595 14e2f4bd5f16
--- a/mercurial/context.py	Thu Jul 08 03:03:34 2021 +0200
+++ b/mercurial/context.py	Thu Jul 08 00:58:44 2021 +0200
@@ -1701,12 +1701,8 @@
                         % uipath(f)
                     )
                     rejected.append(f)
-                elif ds[f] in b'amn':
+                elif not ds.set_tracked(f):
                     ui.warn(_(b"%s already tracked!\n") % uipath(f))
-                elif ds[f] == b'r':
-                    ds.normallookup(f)
-                else:
-                    ds.add(f)
             return rejected
 
     def forget(self, files, prefix=b""):