darcs

Issue 2137 No regrets still prompts when amending a patch, with no changes

Title No regrets still prompts when amending a patch, with no changes
Priority bug Status needs-testcase
Milestone 2.10.0 Resolved in
Superseder Nosy List mndrix, owst
Assigned To
Topics UI

Created on 2012-01-30.00:09:57 by owst, last changed 2012-02-26.08:45:58 by kowey.

Messages
msg15071 (view) Author: owst Date: 2012-01-30.00:09:55
$ darcs --version
2.9.1 (+ 14 patches)

$ darcs amend --edit
Pick patch to amend (newest patch in my case) and then answer 'n' to all
working-dir changes (there was only one in my case)

Now, I get the "Do you want to add these changes?" prompt; if I say 'y',
then I get taken to the message-editor, as desired, but if I answer 'q'
darcs says "add cancelled". 

So, 2 things:
1) If I say n to all patches, then I don't want prompting by
last-regrets since I've not picked anything to add to my patch.
2) If I say q to "Do you want to add these changes" I'd rather darcs
says "amend cancelled" than "add cancelled" (even though I know
technically I'm doing an add at that point, under-the-hood.
msg15163 (view) Author: mndrix Date: 2012-02-24.18:36:55
Regarding (1), answering 'd' to the first working-dir change skips the 
last regrets prompt.  I agree that it should do the same if all answers 
were 'n'.
msg15176 (view) Author: kowey Date: 2012-02-26.08:45:57
This the sort of thing we should have tests for?  Not the language so much 
as the behaviour.  I suspect so, as there could be lots of little edges we 
want to match out for
History
Date User Action Args
2012-01-30 00:09:57owstcreate
2012-02-24 18:36:55mndrixsetmessages: + msg15163
2012-02-24 18:37:42mndrixsetnosy: + mndrix
2012-02-26 08:45:58koweysetpriority: bug
status: unknown -> needs-testcase
topic: + UI
messages: + msg15176
milestone: 2.10.0