Here are my follow-up patches, thanks for the reminder.
As regards what to include in 2.16.4, I think that besides the front-end fix
and the test scripts we should /at least/ include the check/repair fix, so
that people can fix their repos if they are affected.
Repairing means to eliminate the bad moves, which is possible for the same
reason that the bug is, after all, not quite as bad as I thought at first:
since bad move changes are ignored when applying a patch containing them,
they are, effectively, a no-op. In particular, you cannot record anything
that depends on the target of the bad move, which is what the new test
script verifies. It is written so that it works before /and/ after the fix
for issue2674.
With the internal checks added, some commutations that involve bad move
patches will crash darcs. Running 'darcs repair' will fix that.
There is also the question of how and when to repair our own upstream repos.
Compiling a current darcs on darcs.net seems nigh impossible.
Note that the existence of the PInvalid constructor of data PatchMod shows
that the bug was known a long time ago. Indeed the comment mentions the bad
move patch in our darcs repos:
| PInvalid a
-- ^ This is an invalid patch
-- e.g. there is a patch 'Move Autoconf.lhs Autoconf.lhs.in'
-- where there is no Autoconf.lhs in the darcs repo
This kludge is now thankfully obsolete.
4 patches for repository http://darcs.net/screened:
patch ef6ebddbfa74f22df12bfa5109cd5401f3868276
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Mar 14 10:54:26 CET 2021
* add a check/repair rule for bad move patches
This drops a move patch with either non-existing source or existing target.
patch 5e642a9553bd07eb22172bd884ce4c592d95cd96
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Mar 14 11:46:12 CET 2021
* remove PInvalid constructor from data PatchMod
patch 96537ad0338fa352f27e008e2c6c2f2484ed882c
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Mar 14 15:06:22 CET 2021
* test that we cannot record patches that depend on broken moves
patch 36d18cea5159459c77d7e10081cb05f8bca0f5d7
Author: Ben Franksen <ben.franksen@online.de>
Date: Wed Mar 17 08:45:45 CET 2021
* tests/broken_move.sh: if we fail to apply, darcs check should see the bad move
Attachments
|