mq: drop the use of `dirstate.merged`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 18 Jul 2021 22:45:18 +0200
changeset 47743 8c73818c67dd
parent 47742 f51aaa0f1485
child 47744 372ff4638cb4
mq: drop the use of `dirstate.merged` Since mq does not work on merge, we do not need this. Differential Revision: https://phab.mercurial-scm.org/D11185
hgext/mq.py
--- a/hgext/mq.py	Mon Jul 19 00:31:59 2021 +0200
+++ b/hgext/mq.py	Sun Jul 18 22:45:18 2021 +0200
@@ -1090,18 +1090,9 @@
 
             if merge and files:
                 # Mark as removed/merged and update dirstate parent info
-                removed = []
-                merged = []
-                for f in files:
-                    if os.path.lexists(repo.wjoin(f)):
-                        merged.append(f)
-                    else:
-                        removed.append(f)
                 with repo.dirstate.parentchange():
-                    for f in removed:
+                    for f in files:
                         repo.dirstate.update_file_p1(f, p1_tracked=True)
-                    for f in merged:
-                        repo.dirstate.merge(f)
                     p1 = repo.dirstate.p1()
                     repo.setparents(p1, merge)