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

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 3:11 p.m.
Message ID <differential-rev-PHID-DREV-cp47fz6gltraahovncx7-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49500/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 3:11 p.m.
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




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

Patch

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)