Mercurial > hg-stable
changeset 50059:f4eef08575ce
dirstate: drop some very fishy looking piece of code
This piece of code is marking the **real** dirstate file as a temporary
transaction file. This means it get deleted on transaction rollback.
This this quite wrong, especially as the comment points out some
`dirstate.pending` motivation and the `.pending` file should already be fully
managed by the transaction.
The only ready I can think of this behavior not having awful results right now
is because other transaction logic restore backed up content above the one that
got wrongfully deleted.
Let us stop doing this anyway, All tests seems happy.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 06 Feb 2023 01:22:01 +0100 |
parents | e358f6e0e50e |
children | 3c34a224c232 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 0 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue Feb 14 23:05:18 2023 +0100 +++ b/mercurial/dirstate.py Mon Feb 06 01:22:01 2023 +0100 @@ -1527,11 +1527,6 @@ post_finalize=True, ) - # ensure that pending file written above is unlinked at - # failure, even if tr.writepending isn't invoked until the - # end of this transaction - tr.registertmp(filename, location=b'plain') - self._opener.tryunlink(backupname) if self._opener.exists(filename): # hardlink backup is okay because _writedirstate is always called