Issue 2349 send -O overwrites existing files

Title send -O overwrites existing files
Priority Status given-up
Milestone Resolved in
Superseder Nosy List owst
Assigned To

Created on 2013-12-05.19:47:36 by owst, last changed 2017-07-31.01:15:35 by gh.

msg17105 (view) Author: owst Date: 2013-12-05.19:47:34
1. Summarise the issue (what were doing, what went wrong?)

I did a send -O on a WIP patch, when I already had wip.dpatch in the
directory. The existing file was overwritten without warning.

2. What behaviour were you expecting instead?

Darcs should rename the file it outputs, rather than overwriting my file.

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

msg17108 (view) Author: owst Date: 2013-12-05.23:01:39
This is slightly tricky to fix.

There's code that does a similar thing in UI/Commands/Unrecord.hs, and
in Util.hs in the same directory, but I suspect the better place would
be in getOuput in ../Arguments.hs, where it can be made to work for all
dpatch-emitting commands, rather than in an ad-hoc fashion.

I should be able to get this done with a bit more thought.
Date User Action Args
2013-12-05 19:47:36owstcreate
2013-12-05 23:01:40owstsetmessages: + msg17108
2017-07-31 01:15:35ghsetstatus: unknown -> given-up