darcs

Issue 2213 last regrets doesn't respect dependencies when going back

Title last regrets doesn't respect dependencies when going back
Priority Status wont-fix
Milestone Resolved in
Superseder Nosy List owst
Assigned To
Topics

Created on 2012-07-21.15:52:05 by owst, last changed 2022-04-12.13:33:20 by bfrk.

Messages
msg15909 (view) Author: owst Date: 2012-07-21.15:52:04
1. Summarise the issue (what were doing, what went wrong?)

lastregrets allows you to "go back" through a list of patches.
Unfortunately, it doesn't respect dependencies (in its presentation to a
user):
$ darcs init --repo R
$ darcs init --repo S
$ cd R
 
$ echo 'a' > file
$ darcs rec -alm a
 
$ echo 'b' > file
$ darcs rec -alm b

$ darcs push ../S
Sat Jul 21 16:27:05 BST 2012  Owen Stephens <darcs@owenstephens.co.uk>
  * a
Shall I push this patch? (1/2)  [ynW...], or ? for more options: n
Will not ask whether to push 1 already decided patch.
Do you want to push these patches? [Yglqk...], or ? for more options: k
Sat Jul 21 16:27:05 BST 2012  Owen Stephens <darcs@owenstephens.co.uk>
  * b
Shall I push this patch? (2/2)  [yNw...], or ? for more options: y
Do you want to push these patches? [Yglqk...], or ? for more options: l
---- Already selected patches ----
Sat Jul 21 16:27:05 BST 2012  Owen Stephens <darcs@owenstephens.co.uk>
  * a
Sat Jul 21 16:27:05 BST 2012  Owen Stephens <darcs@owenstephens.co.uk>
  * b
---- end of already selected patches ----

So darcs adds the depended-on patch to the list of selected patches, but
it asks about b before asking about a - which it didn't do, on first
asking (due to skipping dependencies of a).

2. What behaviour were you expecting instead?

Pressing k above should go straight to a, rather than via b.

3. What darcs version are you using? (Try: darcs --exact-version)

2.9.1 HEAD

4. What operating system are you running?

Ubuntu x86_64
msg22434 (view) Author: bfrk Date: 2020-08-15.19:46:59
This behavior can be surprising, but I find it quite useful, 
especially in combination with --reverse. For instance, suppose you 
push --reverse two patches A and B, and the earlier patch C gets 
added automatically as a dependency. On last regrets you see that C 
would be pushed but this is not what you want. It may not be obvious 
which of A or B depends on C, but if you hit k and then deselect C, 
Darcs will determine this for you: it will automatically deselect 
only whichever patch depends on C.

I am minded to resolve this as wont-fix.
History
Date User Action Args
2012-07-21 15:52:05owstcreate
2020-08-15 19:47:02bfrksetmessages: + msg22434
2022-04-12 13:33:20bfrksetstatus: unknown -> wont-fix