darcs

Patch 2079 resolve issue2445: rename patches on suspend

Title resolve issue2445: rename patches on suspend
Superseder Nosy List bf
Related Issues
Status accepted Assigned To
Milestone

Created on 2020-07-31.11:23:02 by bf, last changed 2020-07-31.19:43:09 by bf.

Files
File name Status Uploaded Type Edit Remove
draft-extend-tests_rebase_repull_sh-to-cover-issue2445.dpatch dead bf, 2020-07-31.11:23:02 application/x-darcs-patch
patch-preview.txt bf, 2020-07-31.11:23:02 text/x-darcs-patch
patch-preview.txt bf, 2020-07-31.19:31:12 text/x-darcs-patch
resolve-issue2445_-rename-patches-on-suspend.dpatch bf, 2020-07-31.19:31:12 application/x-darcs-patch
unnamed bf, 2020-07-31.11:23:02 text/plain
unnamed bf, 2020-07-31.19:31:12 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg22325 (view) Author: bf Date: 2020-07-31.11:23:02
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
Attachments
msg22327 (view) Author: ganesh Date: 2020-07-31.17:58:14
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.
msg22328 (view) Author: bf Date: 2020-07-31.19:13:34
Do you think it is worth to rename patches when we convert and old-
style rebase patch?
msg22329 (view) Author: bf Date: 2020-07-31.19:31:12
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
Attachments
msg22330 (view) Author: ganesh Date: 2020-07-31.19:36:37
> 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:02bfcreate
2020-07-31 13:05:30bfsettitle: DRAFT extend tests/rebase-repull.sh to c... (and 1 more) -> DRAFT resolve issue2445: rename patches on suspend
2020-07-31 17:58:15ganeshsetmessages: + msg22327
2020-07-31 19:13:34bfsetmessages: + msg22328
2020-07-31 19:31:13bfsetfiles: + patch-preview.txt, resolve-issue2445_-rename-patches-on-suspend.dpatch, unnamed
messages: + msg22329
title: DRAFT resolve issue2445: rename patches on suspend -> resolve issue2445: rename patches on suspend
2020-07-31 19:31:53bfsetstatus: needs-screening -> needs-review
2020-07-31 19:36:37ganeshsetmessages: + msg22330
2020-07-31 19:37:08ganeshsetstatus: needs-review -> accepted-pending-tests
2020-07-31 19:43:09bfsetstatus: accepted-pending-tests -> accepted