darcs

Issue 2349 send -O overwrites existing files

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

Created on 2013-12-05.19:47:36 by owst, last changed 2013-12-05.23:01:40 by owst.

Messages
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)

2.9.7
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.
History
Date User Action Args
2013-12-05 19:47:36owstcreate
2013-12-05 23:01:40owstsetmessages: + msg17108