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.
--- 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