diff mercurial/context.py @ 47605:a5701ffc10e4

sparse: make sure we adjust the dirstate at the same time as the parent This is more correct and help our API split. Differential Revision: https://phab.mercurial-scm.org/D11028
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 08 Jul 2021 18:59:55 +0200
parents f636dfe83554
children 6975cef3add1
line wrap: on
line diff
--- a/mercurial/context.py	Thu Jul 08 18:51:45 2021 +0200
+++ b/mercurial/context.py	Thu Jul 08 18:59:55 2021 +0200
@@ -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)