darcs

Issue 2699 obliterate and rebase suspend fail to adapt pending to the new state

Title obliterate and rebase suspend fail to adapt pending to the new state
Priority Status resolved
Milestone Resolved in 2.18.1
Superseder Nosy List bfrk
Assigned To
Topics

Created on 2023-02-26.20:26:11 by bfrk, last changed 2023-08-24.20:21:22 by bfrk.

Messages
msg23125 (view) Author: bfrk Date: 2023-02-26.20:26:09
Test case:

darcs init R
cd R
mkdir c
darcs record -lam add-c
darcs move c d
darcs record -am move-c-d
touch d/f
darcs add d/f
darcs obliterate -p move-c-d
cat _darcs/patches/pending
# content: addfile ./d/f instead of ./c/f
darcs whatsnew
# result: rmdir ./d (WTF?)

This bug is only in screened, not in 2.16.5. I suspect this patch to be the 
culprit:

patch 4f9ac2caf52b420538798dddc15f4211c1fdcaa8
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Mar  2 14:13:40 CET 2021
  * obliterate, rebase suspend: pass NoUpdatePending to tentativelyRemovePatches
  
  This avoids the redundant use of the (unsafe) tentativelyAddToPending to
  remove what gets added to pending with YesUpdatePending.

Indeed I have seen strange things when using rebase pull: after suspending 
conflicting patches it sometimes complains about conflicts with unrecorded 
changes even though there are no unrecorded changes in the repo. When I abort 
the operation at this point, I am left with lots of pending changes.
msg23126 (view) Author: bfrk Date: 2023-02-26.22:18:07
The problem I mentioned with rebase pull (conflicts with non-existing 
unrecorded changes) is unrelated, but indeed the same bug as with 
obliterate can be observed with rebase suspend.
msg23128 (view) Author: bfrk Date: 2023-02-26.22:33:33
See patch2285
History
Date User Action Args
2023-02-26 20:26:11bfrkcreate
2023-02-26 22:18:08bfrksetmessages: + msg23126
title: obliterate fails to adapt pending to the new state -> obliterate and rebase suspend fail to adapt pending to the new state
2023-02-26 22:33:33bfrksetstatus: unknown -> has-patch
messages: + msg23128
2023-08-24 20:21:22bfrksetstatus: has-patch -> resolved
resolvedin: 2.18.1