Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 50055:c5ef535e274e
status: fix post status writing
With dirstate-v2, the status process itself might update internal states. So we
make sure this get written on disk
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 15 Feb 2023 23:28:20 +0100 |
parents | e333cc169c45 |
children | 1f369ca9e34c |
comparison
equal
deleted
inserted
replaced
50054:e2b89b6d4cdd | 50055:c5ef535e274e |
---|---|
1873 ) | 1873 ) |
1874 else: | 1874 else: |
1875 normal = dirstate.set_clean | 1875 normal = dirstate.set_clean |
1876 for f, pdf in fixup: | 1876 for f, pdf in fixup: |
1877 normal(f, pdf) | 1877 normal(f, pdf) |
1878 # write changes out explicitly, because nesting | 1878 # write changes out explicitly, because nesting |
1879 # wlock at runtime may prevent 'wlock.release()' | 1879 # wlock at runtime may prevent 'wlock.release()' |
1880 # after this block from doing so for subsequent | 1880 # after this block from doing so for subsequent |
1881 # changing files | 1881 # changing files |
1882 tr = self._repo.currenttransaction() | 1882 # |
1883 self._repo.dirstate.write(tr) | 1883 # (This is outside of the (if fixup) block because the |
1884 # status operation itself might have updated some cache | |
1885 # information before.) | |
1886 tr = self._repo.currenttransaction() | |
1887 self._repo.dirstate.write(tr) | |
1884 | 1888 |
1885 if poststatus: | 1889 if poststatus: |
1886 for ps in poststatus: | 1890 for ps in poststatus: |
1887 ps(self, status) | 1891 ps(self, status) |
1888 else: | 1892 else: |