Patchwork D8827: merge: filter actions before calling _resolvetrivial()

login
register
mail settings
Submitter phabricator
Date July 25, 2020, 10:01 a.m.
Message ID <differential-rev-PHID-DREV-ayaib537iubsuenudirl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46898/
State Superseded
Headers show

Comments

phabricator - July 25, 2020, 10:01 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  In d49e490a9e85252886fd43258803bcad4fc88edb <https://phab.mercurial-scm.org/rHGd49e490a9e85252886fd43258803bcad4fc88edb> I made _resolvetrivial() to be
  called after upadting the sparse checkout.
  
  Looking at the code now, it seems to that me there is no need to even run
  _resolvetrivial() on actions which are filtered away.
  
  So let's update the actions before passing them into _resolvetrivial().

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1133,9 +1133,9 @@ 
     prunedactions = sparse.filterupdatesactions(
         repo, wctx, mctx, branchmerge, mresult.actions
     )
+    mresult.setactions(prunedactions)
     _resolvetrivial(repo, wctx, mctx, ancestors[0], mresult)
 
-    mresult.setactions(prunedactions)
     return mresult