D11185: mq: drop the use of `dirstate.merged

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jul 19 15:11:12 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Since mq does not work on merge, we do not need this.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11185

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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)
 



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list