##// END OF EJS Templates
sparse: make sure we adjust the dirstate at the same time as the parent...
marmoute -
r48405:a5701ffc default
parent child Browse files
Show More
@@ -2022,13 +2022,13 b' class workingctx(committablectx):'
2022 self._repo.dirstate.setparents(node)
2022 self._repo.dirstate.setparents(node)
2023 self._repo._quick_access_changeid_invalidate()
2023 self._repo._quick_access_changeid_invalidate()
2024
2024
2025 sparse.aftercommit(self._repo, node)
2026
2025 # write changes out explicitly, because nesting wlock at
2027 # write changes out explicitly, because nesting wlock at
2026 # runtime may prevent 'wlock.release()' in 'repo.commit()'
2028 # runtime may prevent 'wlock.release()' in 'repo.commit()'
2027 # from immediately doing so for subsequent changing files
2029 # from immediately doing so for subsequent changing files
2028 self._repo.dirstate.write(self._repo.currenttransaction())
2030 self._repo.dirstate.write(self._repo.currenttransaction())
2029
2031
2030 sparse.aftercommit(self._repo, node)
2031
2032 def mergestate(self, clean=False):
2032 def mergestate(self, clean=False):
2033 if clean:
2033 if clean:
2034 return mergestatemod.mergestate.clean(self._repo)
2034 return mergestatemod.mergestate.clean(self._repo)
@@ -646,7 +646,7 b' def importfromfiles(repo, opts, paths, f'
646 The updated sparse config is written out and the working directory
646 The updated sparse config is written out and the working directory
647 is refreshed, as needed.
647 is refreshed, as needed.
648 """
648 """
649 with repo.wlock():
649 with repo.wlock(), repo.dirstate.parentchange():
650 # read current configuration
650 # read current configuration
651 raw = repo.vfs.tryread(b'sparse')
651 raw = repo.vfs.tryread(b'sparse')
652 includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse')
652 includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse')
General Comments 0
You need to be logged in to leave comments. Login now