forget: don't report rejected files as forgotten as well
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 11 Jan 2015 23:25:23 -0500
changeset 23838 b95b9fd7ba29
parent 23837 2b79d124a12f
child 23839 ff6b5b058fa0
forget: don't report rejected files as forgotten as well It seems like a mistake to report a file as forgotten and rejected. The forgotten list doesn't seem to be used by anything in core, so no test changes.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Sun Jan 11 23:20:51 2015 -0500
+++ b/mercurial/cmdutil.py	Sun Jan 11 23:25:23 2015 -0500
@@ -2057,7 +2057,7 @@
 
     rejected = wctx.forget(forget, prefix)
     bad.extend(f for f in rejected if f in match.files())
-    forgot.extend(forget)
+    forgot.extend(f for f in forget if f not in rejected)
     return bad, forgot
 
 def remove(ui, repo, m, prefix, after, force, subrepos):