darcs

Issue 691 wish: distinguish between NoArg, OptArgs, and ReqArg in defaults parser

Title wish: distinguish between NoArg, OptArgs, and ReqArg in defaults parser
Priority feature Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, jaredj, kowey, marlowsd, thorkilnaur, tommy
Assigned To dmitry.kurochkin
Topics Confirmed, ProbablyEasy, UI

Created on 2008-02-14.10:43:31 by kowey, last changed 2009-08-27.14:17:58 by admin.

Messages
msg3407 (view) Author: kowey Date: 2008-02-14.10:43:28
I just realised that my recent troubles with darcs may have been due to an error
code id-10-t (i.e. the problem was between the chair and the keyboard).  I had
messed up the darcs defaults syntax horribly, treating it as a sort of command
line than what it really is.

My issue was that I was writing them like this (BAD):
  send --edit-description --unified --sendmail-command="mstmp -t %<"

when in fact, I should have been writing them like this (GOOD):
  send edit-description
  send unified
  send sendmail-command="mstmp -t %<"

Argh, silly eric.  But maybe there is a chance to learn something here. The
reason I persisted in using the wrong syntax is that I was reinforced by darcs
seeming to work and do the right thing.  Particularly, if I entered
 send --edit-description --unified

darcs would appear to "work" (I would get a text editor before sending a patch).
  Of course, the patch would not be unified and I wouldn't notice, except for an
occasional remark by Tommy and me being generally confused.  The only thing that
got me to realise my blunder was noticing that for some reason
  send  --unified --edit-description
did NOT "work"

Because in both cases, darcs just ignored everything that came after the flag.

I would argue that a little bit more inflexibility on darcs's part could be good
for the luser.  Specifically, darcs could perhaps notice that --edit-description
and --unified do NOT accept arguments.  In this particular case, we will get an
error message and perhaps the user would be motivated to go look in that manual
again.  It won't solve all cases of user stupidity, but maybe it will help for
some common ones.
msg3413 (view) Author: markstos Date: 2008-02-14.16:40:30
I second this wish.
msg5993 (view) Author: kowey Date: 2008-09-12.13:51:44
This could make a nice slightly involved but not /too/ difficult starter task.
msg6014 (view) Author: dmitry.kurochkin Date: 2008-09-15.23:16:12
The following patch updated the status of issue691 to be resolved:

* Resolve issue691: distinguish between NoArg and ReqArg in defaults parser.
History
Date User Action Args
2008-02-14 10:43:31koweycreate
2008-02-14 16:40:33markstossetstatus: unread -> deferred
topic: + Confirmed
messages: + msg3413
nosy: + markstos
2008-09-12 13:50:35koweylinkissue1072 superseder
2008-09-12 13:51:50koweysetpriority: wishlist -> feature
status: deferred -> unknown
topic: + ProbablyEasy
messages: + msg5993
nosy: + dagit, marlowsd, jaredj
2008-09-12 14:02:44markstossetnosy: - markstos
2008-09-15 22:46:13dmitry.kurochkinsetnosy: + dmitry.kurochkin
assignedto: dmitry.kurochkin
2008-09-15 23:16:14dmitry.kurochkinsetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, dagit, jaredj, dmitry.kurochkin, marlowsd
messages: + msg6014
2009-04-22 03:27:49twbsetstatus: resolved-in-unstable -> resolved
nosy: + simon, thorkilnaur
2009-08-06 17:54:35adminsetnosy: + markstos, jast, Serware, darcs-devel, zooko, mornfall, - droundy, jaredj, marlowsd
2009-08-06 20:58:18adminsetnosy: - beschmi
2009-08-10 22:15:30adminsetnosy: + marlowsd, jaredj, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:07:11adminsetnosy: - dagit
2009-08-25 17:44:00adminsetnosy: + darcs-devel, - simon
2009-08-27 14:17:58adminsetnosy: tommy, kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, marlowsd