darcs

Issue 381 darcs send -o message --edit-description doesn't work

Title darcs send -o message --edit-description doesn't work
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, marcot, marnix, thorkilnaur, tommy
Assigned To
Topics

Created on 2007-01-09.12:33:32 by marcot, last changed 2009-08-27.14:06:00 by admin.

Files
File name Uploaded Type Edit Remove
test-for-issue381-support marnix, 2007-01-09.22:07:35 text/plain
Messages
msg1388 (view) Author: marcot Date: 2007-01-09.12:33:23
darcs send -o message --edit-description doesn't open text editor and ask for a
description. It works as if --edit-description was not specified. darcs
--edit-description works fine.
msg1392 (view) Author: marnix Date: 2007-01-09.22:07:53
On 09-01-07 13:33, Marco TĂșlio Gontijo e Silva wrote:

> darcs send -o message --edit-description doesn't open text editor and ask for a
> description. It works as if --edit-description was not specified. darcs
> --edit-description works fine.

I'm not sure whether or not --output + --edit-description should call an 
editor or not.  If not, then this combination should give an error 
message.  But it seems ok to allow opening an editor in this case.

Assuming that we want to call the editor, attached is a patch that adds 
a (currently failing) test for this scenario.

Groetjes,
  <><
Marnix
Attachments
msg1396 (view) Author: droundy Date: 2007-01-09.22:55:12
On Tue, Jan 09, 2007 at 10:17:38PM +0100, Marnix Klooster wrote:
> On 09-01-07 13:33, Marco TĂșlio Gontijo e Silva wrote:
> 
> >darcs send -o message --edit-description doesn't open text editor and ask 
> >for a
> >description. It works as if --edit-description was not specified. darcs
> >--edit-description works fine.
> 
> I'm not sure whether or not --output + --edit-description should call an 
> editor or not.  If not, then this combination should give an error 
> message.  But it seems ok to allow opening an editor in this case.

I suspect we don't open the editor because normally the --output option
doesn't format the output as an email (and this is probably an unintended
side-effect), but I think we ought to do so.  Not format it as an email,
but format it like we format the email (i.e. add a description at top).

> Assuming that we want to call the editor, attached is a patch that adds 
> a (currently failing) test for this scenario.

Thanks for the patch!
-- 
David Roundy
Department of Physics
Oregon State University
msg1801 (view) Author: kowey Date: 2007-07-11.20:34:52
If we do this, we should be careful to not to accidentally create bundles that
we can't parse.  For example, avoid any kind of havoc that might ensue if the
user puts 'New patches:' in the description.

Then again, I suppose dropping characters until we hit the last instance of 'New
patches:' might be ok, so long as nobody happens to be named 'New patches:'
msg1802 (view) Author: kowey Date: 2007-07-11.20:38:53
For what it's worth, we could borrow a trick from the patch decriptions by
sticking a space before every line.  But if we do something that depends on such
trickery, we'll also need to output a warning, telling the user not to edit the
description by hand (which might be very tempting)
msg2551 (view) Author: droundy Date: 2008-01-17.20:27:59
I've implemented this, but without any sort of protection against users entering
in descriptions that will break darcs' parsing of patch bundles.

David
History
Date User Action Args
2007-01-09 12:33:32marcotcreate
2007-01-09 22:07:54marnixsetfiles: + test-for-issue381-support
status: unread -> unknown
messages: + msg1392
nosy: + marnix
2007-01-09 22:55:22droundysetnosy: droundy, marnix, tommy, beschmi, kowey, marcot
messages: + msg1396
2007-07-11 20:34:54koweysetnosy: droundy, marnix, tommy, beschmi, kowey, marcot
messages: + msg1801
2007-07-11 20:38:54koweysetmessages: + msg1802
2008-01-17 20:27:14droundysetstatus: unknown -> resolved-in-unstable
nosy: droundy, marnix, tommy, beschmi, kowey, marcot
2008-01-17 20:28:01droundysetnosy: droundy, marnix, tommy, beschmi, kowey, marcot
messages: + msg2551
2008-09-04 21:30:11adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:37:38adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, marnix, marcot
2009-08-06 20:34:24adminsetnosy: - beschmi
2009-08-10 22:00:26adminsetnosy: + marnix, marcot, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:58:56adminsetnosy: - dagit
2009-08-25 17:51:23adminsetnosy: + darcs-devel, - simon
2009-08-27 14:06:00adminsetnosy: marnix, tommy, kowey, darcs-devel, marcot, thorkilnaur, dmitry.kurochkin