Patchwork D11028: parse: make sure we adjust the dirstate while adjust the dirstate to parent

login
register
mail settings
Submitter phabricator
Date July 8, 2021, 6:08 p.m.
Message ID <differential-rev-PHID-DREV-7np24de2sencod7auasy-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49342/
State Superseded
Headers show

Comments

phabricator - July 8, 2021, 6:08 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is more correct and help our API split.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2022,13 +2022,13 @@ 
             self._repo.dirstate.setparents(node)
             self._repo._quick_access_changeid_invalidate()
 
+            sparse.aftercommit(self._repo, node)
+
         # write changes out explicitly, because nesting wlock at
         # runtime may prevent 'wlock.release()' in 'repo.commit()'
         # from immediately doing so for subsequent changing files
         self._repo.dirstate.write(self._repo.currenttransaction())
 
-        sparse.aftercommit(self._repo, node)
-
     def mergestate(self, clean=False):
         if clean:
             return mergestatemod.mergestate.clean(self._repo)