I have added my DRAFT of an extended test script.
There is one minor hole in this: if we upgrade an old rebase we call
addNamedToRebase which does not contain the rename. So if an old rebase
contains the same suspended patch twice, and we upgrade that rebase state,
we can still end up crashing on unsuspend.
This could be fixed by pulling the renaming into addNamedToRebase. However,
this means we need to do an unsafePerformIO when we convert the old rebase
patch.
2 patches for repository http://darcs.net/screened:
patch 604c0b25e2aefe521e44c7f76906be127263bb8e
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jul 31 11:19:34 CEST 2020
* DRAFT extend tests/rebase-repull.sh to cover issue2445
patch f0161b8c66af3328f2a952251ee068ba9c6b861e
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jul 31 13:11:57 CEST 2020
* resolve issue2445: rename patches on suspend
The fix patch looks fine to me. Just replacing the junk is cleaner than
my approach of using updatePatchHeader.
Could you add some comment somewhere explaining why it's necessary to rename the patch? e.g in this comment:
> + -- | Add 'Named' patches for editing to a 'Suspended'. The patches to be
> + -- suspended are renamed by replacing the junk in their 'Patchinfo'.
Test patch is also fine (assuming you get rid of the DRAFT in the name :-))
Consider this all reviewed once the above is done.
Following up on review and remove the DRAFT from the test script patch and
the ticket title.
3 patches for repository http://darcs.net/screened:
patch f0161b8c66af3328f2a952251ee068ba9c6b861e
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jul 31 13:11:57 CEST 2020
* resolve issue2445: rename patches on suspend
patch 345e7779f120f1601da252341da2ad30bfd8fb5c
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jul 31 21:35:52 CEST 2020
* add comment to addToEditsToSuspended to explain why we rename
patch a6632f4738e292490a2f9c80c260de73ed304e35
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jul 31 11:19:34 CEST 2020
* extend tests/rebase-repull.sh to cover issue2445
> Do you think it is worth to rename patches when we convert and old-
> style rebase patch?
Sorry, forgot to comment on that: no, I don't think it's worth it,
particularly if it requires an unsafePerformIO.
History
Date
User
Action
Args
2020-07-31 11:23:02
bfrk
create
2020-07-31 13:05:30
bfrk
set
title: DRAFT extend tests/rebase-repull.sh to c... (and 1 more) -> DRAFT resolve issue2445: rename patches on suspend